Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#5646 closed defect (fixed)

Wrong duration reported for XDCAM-HD422 file

Reported by: t.rapp Owned by:
Priority: important Component: undetermined
Version: git-master Keywords: codecpar regression mpeg2video mxf
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

The duration reported by ffmpeg/ffprobe on one of my XDCAM-HD422 sample files has changed. FFmpeg version 3.0 reports the correct duration, latest version from git reports an incorrect duration (approx. 2sec/20% more).

From narrowing down the relevant commit with git bisect it appears the problematic commit is 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994 (large).

Correct duration (11.1sec, commit 60b75186b2c878b6257b43c8fcc0b1356ada218e):

% ./ffmpeg -i xdcamhd422-sample05.mxf
ffmpeg version N-79284-g60b7518 Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --cc='ccache gcc' --enable-debug --disable-optimizations --disable-doc --enable-libfreetype
  libavutil      55. 20.100 / 55. 20.100
  libavcodec     57. 34.100 / 57. 34.100
  libavformat    57. 32.100 / 57. 32.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 41.100 /  6. 41.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
[mxf @ 0x26d9240] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Input #0, mxf, from 'xdcamhd422-sample05.mxf':
  Metadata:
    application_platform: Omneon Media Api (mach)
    uid             : 0ee54bde-6141-e311-87e0-98fe944f6c6c
    generation_uid  : 44e64bde-6141-e311-a12a-98fe944f6c6c
    company_name    : Omneon Inc.
    product_name    : Omneon Media Subsystem
    modification_date: 2013-10-30 12:50:34
    product_version : Omneon libommedia 7,3,0,2 10-01-2013 16:01:28,ex={0,-1},rng={0,-1,0},trimAu,exPre
    product_uid     : 00000000-0000-0010-8000-050e0b010606
    material_package_umid: 0x060A2B340101010501010D231300F0EA2CF94BDE6141E311828298FE944F6C6C
    timecode        : 00:00:00:00
  Duration: 00:00:11.16, start: 0.000000, bitrate: 59225 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32 (24 bit), 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
At least one output file must be specified

Incorrect duration (13.2sec, commit 6f69f7a8bf6a0d013985578df2ef42ee6b1c7994):

% ./ffmpeg -i xdcamhd422-sample05.mxf
ffmpeg version N-79286-g6f69f7a Copyright (c) 2000-2016 the FFmpeg developers
  built with gcc 4.8 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
  configuration: --cc='ccache gcc' --enable-debug --disable-optimizations --disable-doc --enable-libfreetype
  libavutil      55. 20.100 / 55. 20.100
  libavcodec     57. 34.100 / 57. 34.100
  libavformat    57. 32.100 / 57. 32.100
  libavdevice    57.  0.101 / 57.  0.101
  libavfilter     6. 41.100 /  6. 41.100
  libswscale      4.  1.100 /  4.  1.100
  libswresample   2.  0.101 /  2.  0.101
[mxf @ 0x33b9240] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.1 : mono
Guessed Channel Layout for  Input Stream #0.2 : mono
Guessed Channel Layout for  Input Stream #0.3 : mono
Guessed Channel Layout for  Input Stream #0.4 : mono
Guessed Channel Layout for  Input Stream #0.5 : mono
Guessed Channel Layout for  Input Stream #0.6 : mono
Guessed Channel Layout for  Input Stream #0.7 : mono
Guessed Channel Layout for  Input Stream #0.8 : mono
Input #0, mxf, from 'xdcamhd422-sample05.mxf':
  Metadata:
    application_platform: Omneon Media Api (mach)
    uid             : 0ee54bde-6141-e311-87e0-98fe944f6c6c
    generation_uid  : 44e64bde-6141-e311-a12a-98fe944f6c6c
    company_name    : Omneon Inc.
    product_name    : Omneon Media Subsystem
    modification_date: 2013-10-30 12:50:34
    product_version : Omneon libommedia 7,3,0,2 10-01-2013 16:01:28,ex={0,-1},rng={0,-1,0},trimAu,exPre
    product_uid     : 00000000-0000-0010-8000-050e0b010606
    material_package_umid: 0x060A2B340101010501010D231300F0EA2CF94BDE6141E311828298FE944F6C6C
    timecode        : 00:00:00:00
  Duration: 00:00:13.22, start: 0.000000, bitrate: 50008 kb/s
    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 [SAR 1:1 DAR 16:9], 50000 kb/s, 25 fps, 25 tbr, 25 tbn
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:2: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
    Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
    Metadata:
      file_package_umid: 0x060A2B340101010501010D231300D2F3E2FC4BDE6141E3119C9B98FE944F6C6C
At least one output file must be specified

Attachments (2)

debug_mpegvideo_parser.c.diff (566 bytes) - added by t.rapp 3 years ago.
debug_mpegvideo_parser.log (8.2 KB) - added by t.rapp 3 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 3 years ago by t.rapp

Sample file can be downloaded using:

% wget -O xdcamhd422-sample05.mxf "https://cerebrum.noa-archive.com/noacloud/public.php?service=files&t=b387c1da37a65e9d9be53e4839cac554&download"

Sidenote: During git bisect I stumbled over commit 3c461eecd48ba2cf7616d98e6f99954de3ad4b06 which fixes the issue. Apparently this commit has had other side-effects and thus was reverted later in commit 2691a8399f57cb22f18dfb13e3575dc44bebd22e.

Last edited 3 years ago by t.rapp (previous) (diff)

comment:2 Changed 3 years ago by cehoyos

  • Keywords codecpar added

comment:3 Changed 3 years ago by cehoyos

  • Keywords mpeg2video mxf added
  • Priority changed from normal to important
  • Reproduced by developer set

Could be related to the incorrect mpeg2video bitrate.

comment:4 Changed 3 years ago by cehoyos

Maybe related to ticket #1862.

Changed 3 years ago by t.rapp

Changed 3 years ago by t.rapp

comment:5 Changed 3 years ago by t.rapp

Inspired from ticket #1862 I added some debug log output to function mpegvideo_extract_headers() in file libavcodec/mpegvideo_parser.c. See attachment:debug_mpegvideo_parser.c.diff for the code change and attachment:debug_mpegvideo_parser.log for the log output.

comment:6 Changed 3 years ago by michael

  • Resolution set to fixed
  • Status changed from new to closed

comment:7 Changed 3 years ago by t.rapp

Tested and fix confirmed. Thanks!

Note: See TracTickets for help on using tickets.