Search code examples
ffmpegcodecffprobempeg-2.mov

ffmpeg options for encoding a video mpeg2video but with .mov extension


I just finished a project, and need to produce an output in the specific format, should be exactly the same as the format of the video I received. The best way for me to identify the source format was to use ffprobe. Here was the output of that:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mov':
  Metadata:
    creation_time   : 2020-02-27T04:15:23.000000Z
  Duration: 00:00:22.13, start: 0.000000, bitrate: 111320 kb/s
    Stream #0:0(eng): Video: mpeg2video (4:2:2) (xd5c / 0x63356478), yuv422p(tv, bt709, top coded first (swapped)), 1920x1080 [SAR 1:1 DAR 16:9], 109779 kb/s, 54.94 fps, 54.94 tbr, 5494 tbn, 50 tbc (default)
    Metadata:
      creation_time   : 2020-02-27T04:15:23.000000Z
      handler_name    : Gestor de contenido de v?deo Apple
      encoder         : XDCAM HD422 1080i50 (50 Mb/s)
    Stream #0:1(eng): Audio: pcm_s16be (twos / 0x736F7774), 48000 Hz, 2 channels, s16, 1536 kb/s (default)
    Metadata:
      creation_time   : 2020-02-27T04:15:23.000000Z
      handler_name    : Gestor de contenido de sonido Apple

I did a lot of video work on the above file, and as part of my pipeline, I converted the file to ProRes4444. Now I need to get this video into the same format as above.

Couple of questions on the format, if I understand it correctly, mpeg2video is mpeg2, this would not normally appear as .mov file, but the source is as mov container. Why?

Does the encoder from the input format matter? specifically the XDCAM?

Alternative to solving my problem would be to use media encoder, but even that application doesn't seem to give me options at mov + mpeg2, and if it is mov, it almost forces to use Apple ProRes to keep high resolution. Also, none of the options allow me to set fps at the source level, which is 54.94, and the closest option I have is 59.94.

Please help,


Solution

  • ffmpeg -i "input.mov" -vcodec mpeg2video -b:v 110000k -maxrate 110000k -minrate 110000k -r 50 -top 1 -c:a copy -pix_fmt yuv422p -vtag xd5c "output.mov"

    This pretty much sets all the atributes to match the source requirement. If I could simplify any of the above, please post it here.