docstr: Image tensors of various formats can be saved as mp4
docstr_tok: ["Image","tensors","of","various","formats","can","be","saved","as","mp4"]
code: def test_valid_video_muxer_and_codecs(self, src_format, size):
      """Image tensors of various formats can be saved as mp4"""
      ext = "mp4"
      frame_rate = 10
      width, height = size
  
      path = self.get_dst(f"test.{ext}")
      s = StreamWriter(path, format=ext)
      s.add_video_stream(frame_rate, width, height, format=src_format)
  
      chunk = get_video_chunk(
          src_format, frame_rate, width=width, height=height
      )
      with s.open():
          s.write_video_chunk(0, chunk)
  
imports: import io
  import math
  import torch
  import torchaudio
  from parameterized import parameterized, parameterized_class
  from torchaudio.io import CodecConfig, StreamReader, StreamWriter
  from torchaudio_unittest.common_utils import get_asset_path, get_sinusoid, nested_params, rgb_to_yuv_ccir, skipIfNoFFmpeg, skipIfNoModule, TempDirMixin, TorchaudioTestCase
  from .common import lt42
label_desc: Use image node_id 8 for calling the StreamWriterInterfaceTest obj's underlying member method code with example usage: obj.test_valid_video_muxer_and_codecs(src_format, size) without return types