[FFmpeg-devel] [PATCH] avformat/mxfdec: Detect field_order based on video_line_map

Tobias Rapp t.rapp at noa-archive.com
Tue Oct 18 13:23:14 EEST 2016

On 11.10.2016 10:40, Tobias Rapp wrote:
> Read video_line_map from MXF generic picture essence descriptor and use
> it to derive the coded field order. Use field_dominance to derive the
> display field order from coded field order. If field_dominance is not
> available the default value "1" is used as defined in SMPTE S377-1.
> Fixes field_order detection for a bunch of DV/DVCPRO files. The heuristic
> for deriving coded field order from video_line_map is inspired by
> MediaInfo.
> Signed-off-by: Tobias Rapp <t.rapp at noa-archive.com>
> ---
>  libavformat/mxfdec.c | 75 +++++++++++++++++++++++++++++++++++++++++-----------
>  1 file changed, 60 insertions(+), 15 deletions(-)

Ping. Example files can be found at [1]. To debug the detected field 
order I used ffprobe plus the patch in [2]:

./ffprobe -show_streams -select_streams v -i $INPUT_FILE 2>/dev/null | 
grep field_order

For file "Avid-00005.mxf" [3] the result is:
field_order=tt (without patch)
field_order=bb (with patch)

For file "OpenCube-00003.mxf" [4] the result is:
field_order=unknown (without patch)
field_order=bb (with patch)


[1] http://mxf.irt.de/files/filter.php?action=query&filter=manufacturers
[2] https://ffmpeg.org/pipermail/ffmpeg-devel/2016-October/200607.html

More information about the ffmpeg-devel mailing list