[FFmpeg-user] XDcam MXF wrong field order

Bouke bouke at editb.nl
Tue May 18 12:51:47 EEST 2021


Trying to make broadcast compliant (XDcam style) MXF files, but those fail on wrong field order, if the source is progressive.
This used to work fine. (ffmpeg version 3.2.2 has no issues with this, and has done literally thousands of good / compliant files)

FFmpeg always reports "top coded first (swapped))", and MediaInfo says:
Scan order                               : Bottom Field First

If I swap out -top 1 for -field_order tt it does not help at all.

Now, it ’should’ not be an issue, except that Baton / pre baton scripts bitch about it, and the files get rejected.


Bouke

Stripped down line: (To indicate the problem, this will not make a compliant file, I know.)

/Applications/ffmpeg -i /Volumes/Data/17-05-2021_14-34-56_1.mov -c:v mpeg2video -b:v 50000k -maxrate 50000k -bufsize 3835k -minrate 50000k -r 25 -flags +ilme+ildct -top 1 -pix_fmt yuv422p -profile:v 0 -level:v 2 -t 1 /Volumes/Data/interlacetest.mxf -y 

ffmpeg version 4.4-tessus  https://evermeet.cx/ffmpeg/  Copyright (c) 2000-2021 the FFmpeg developers
  built with Apple clang version 11.0.0 (clang-1100.0.33.17)
  configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-version=tessus --enable-avisynth --enable-fontconfig --enable-gpl --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libfreetype --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libmysofa --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvmaf --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-version3 --pkg-config-flags=--static --disable-ffplay
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Volumes/Data/17-05-2021_14-34-56_1.mov':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.65.101
  Duration: 00:00:15.20, start: 0.000000, bitrate: 276385 kb/s
  Stream #0:0: Video: prores (HQ) (apch / 0x68637061), yuv422p10le(tv, top coded first (swapped)), 1920x1080, 274850 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      encoder         : Lavc58.117.101 prores
      timecode        : 12:34:59:00
  Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
  Stream #0:2(eng): Data: none (tmcd / 0x64636D74), 0 kb/s
    Metadata:
      handler_name    : TimeCodeHandler
      timecode        : 12:34:59:00
Stream mapping:
  Stream #0:0 -> #0:0 (prores (native) -> mpeg2video (native))
  Stream #0:1 -> #0:1 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, mxf, to '/Volumes/Data/interlacetest.mxf':
  Metadata:
    major_brand     : qt  
    minor_version   : 512
    compatible_brands: qt  
    encoder         : Lavf58.76.100
  Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, progressive), 1920x1080, q=2-31, 50000 kb/s, 25 fps, 25 tbn (default)
    Metadata:
      handler_name    : VideoHandler
      vendor_id       : FFMP
      timecode        : 12:34:59:00
      encoder         : Lavc58.134.100 mpeg2video
    Side data:
      cpb: bitrate max/min/avg: 50000000/50000000/50000000 buffer size: 3835000 vbv_delay: N/A
  Stream #0:1: Audio: pcm_s16le, 48000 Hz, stereo, s16, 1536 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
      vendor_id       : [0][0][0][0]
      encoder         : Lavc58.134.100 pcm_s16le
frame=    1 fps=0.0 q=0.0 size=       0kB time=00:00:00.16 bitrate=   0.0kbits/sframe=   24 fps=0.0 q=2.0 size=    5632kB time=00:00:00.96 bitrate=48059.7kbits/frame=   25 fps=0.0 q=1.6 Lsize=    6216kB time=00:00:00.96 bitrate=53043.7kbits/s speed=1.79x    
video:5986kB audio:188kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.681476%


More information about the ffmpeg-user mailing list