[FFmpeg-devel] [PATCH] doc/bitstream_filters: document imx_dump_header

Dave Rice dave at dericed.com
Tue Jun 10 20:26:24 CEST 2014


On Jun 10, 2014, at 2:18 PM, Michael Niedermayer <michaelni at gmx.at> wrote:

> On Tue, Jun 10, 2014 at 02:04:29PM -0400, Dave Rice wrote:
>> 
>> On Jun 10, 2014, at 12:51 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>>> On Tue, Jun 10, 2014 at 11:38:56AM -0400, Dave Rice wrote:
>>>> 
>>>> On Jun 9, 2014, at 5:46 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
>>>>> On Mon, Jun 09, 2014 at 12:24:12PM -0800, Lou Logan wrote:
>>>>>> Signed-off-by: Lou Logan <lou at lrcd.com>
>>>>>> ---
>>>>>> Example is untested:
>>>>>> 
>>>>>> * I have no IMX in MXF sample to test.
>>>>>> * I don't have Final Cut Pro.
>>>>> 
>>>>> i would suggest this is checked to be still needed before applying this
>>>>> patch.
>>>> 
>>>> I tested this with this sample http://www.opencubetech.com/userdoc/mxf_samples_files/xdcamimx-30mbps-ntsc.mxf using ffmpeg 2.2.3.
>>>> 
>>>> If I run as suggested:
>>>> ffmpeg -i xdcamimx-30mbps-ntsc.mxf -c copy -bsf:v imx_dump_header xdcamimx-30mbps-ntsc.mov
>>>> ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
>>>> built on Jun  9 2014 21:32:57 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
>>>> configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libx265 --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
>>>> libavutil      52. 66.100 / 52. 66.100
>>>> libavcodec     55. 52.102 / 55. 52.102
>>>> libavformat    55. 33.100 / 55. 33.100
>>>> libavdevice    55. 10.100 / 55. 10.100
>>>> libavfilter     4.  2.100 /  4.  2.100
>>>> libavresample   1.  2.  0 /  1.  2.  0
>>>> libswscale      2.  5.102 /  2.  5.102
>>>> libswresample   0. 18.100 /  0. 18.100
>>>> libpostproc    52.  3.100 / 52.  3.100
>>>> Guessed Channel Layout for  Input Stream #0.1 : 7.1
>>>> Input #0, mxf, from 'xdcamimx-30mbps-ntsc.mxf':
>>>> Metadata:
>>>>   uid             : 5dac9960-28f4-11e2-8a50-00195b542ed4
>>>>   generation_uid  : 5dac9960-28f4-11e2-8a51-00195b542ed4
>>>>   company_name    : OC  
>>>>   product_name    : OCTk
>>>>   product_version : 2.5 
>>>>   product_uid     : 109c5440-d21d-b211-8029-001111ebc476
>>>>   modification_date: 2012-11-07 17:01:18
>>>>   timecode        : 00:06:58;29
>>>> Duration: 00:00:05.27, start: 0.000000, bitrate: 42616 kb/s
>>>>   Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 720x512 [SAR 128:135 DAR 4:3], max. 30000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
>>>>   Stream #0:1: Audio: pcm_s16le, 48000 Hz, 7.1, s16, 6144 kb/s
>>>> Unknown bitstream filter imx_dump_header
>>>> Conversion failed!
>>>> 
>>>> I didn't see imx_dump_header in git. Is there a patch I'm missing? Also I don't think the original documentation would work in Final Cut properly unless you set the vtag to mx[3,4,5][n,p] as imx.
>>> 
>>> it seems to be called "imxdump"
>> 
>> ffmpeg -i xdcamimx-30mbps-ntsc.mxf -c copy -bsf:v imxdump -y xdcamimx-30mbps-ntsc.mov
>> ffmpeg version 2.2.3 Copyright (c) 2000-2014 the FFmpeg developers
>>  built on Jun  9 2014 21:32:57 with Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
>>  configuration: --prefix=/usr/local/Cellar/ffmpeg/2.2.3 --enable-shared --enable-pthreads --enable-gpl --enable-version3 --enable-nonfree --enable-hardcoded-tables --enable-avresample --enable-vda --cc=clang --host-cflags= --host-ldflags= --enable-libx264 --enable-libfaac --enable-libmp3lame --enable-libxvid --enable-ffplay --enable-libx265 --enable-libopenjpeg --extra-cflags='-I/usr/local/Cellar/openjpeg/1.5.1_1/include/openjpeg-1.5 '
>>  libavutil      52. 66.100 / 52. 66.100
>>  libavcodec     55. 52.102 / 55. 52.102
>>  libavformat    55. 33.100 / 55. 33.100
>>  libavdevice    55. 10.100 / 55. 10.100
>>  libavfilter     4.  2.100 /  4.  2.100
>>  libavresample   1.  2.  0 /  1.  2.  0
>>  libswscale      2.  5.102 /  2.  5.102
>>  libswresample   0. 18.100 /  0. 18.100
>>  libpostproc    52.  3.100 / 52.  3.100
>> Guessed Channel Layout for  Input Stream #0.1 : 7.1
>> Input #0, mxf, from 'xdcamimx-30mbps-ntsc.mxf':
>>  Metadata:
>>    uid             : 5dac9960-28f4-11e2-8a50-00195b542ed4
>>    generation_uid  : 5dac9960-28f4-11e2-8a51-00195b542ed4
>>    company_name    : OC  
>>    product_name    : OCTk
>>    product_version : 2.5 
>>    product_uid     : 109c5440-d21d-b211-8029-001111ebc476
>>    modification_date: 2012-11-07 17:01:18
>>    timecode        : 00:06:58;29
>>  Duration: 00:00:05.27, start: 0.000000, bitrate: 42616 kb/s
>>    Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 720x512 [SAR 128:135 DAR 4:3], max. 30000 kb/s, 29.97 fps, 29.97 tbr, 29.97 tbn, 59.94 tbc
>>    Stream #0:1: Audio: pcm_s16le, 48000 Hz, 7.1, s16, 6144 kb/s
>> Output #0, mov, to 'xdcamimx-30mbps-ntsc.mov':
>>  Metadata:
>>    uid             : 5dac9960-28f4-11e2-8a50-00195b542ed4
>>    generation_uid  : 5dac9960-28f4-11e2-8a51-00195b542ed4
>>    company_name    : OC  
>>    product_name    : OCTk
>>    product_version : 2.5 
>>    product_uid     : 109c5440-d21d-b211-8029-001111ebc476
>>    modification_date: 2012-11-07 17:01:18
>>    timecode        : 00:06:58;29
>>    encoder         : Lavf55.33.100
>>    Stream #0:0: Video: mpeg2video (m2v1 / 0x3176326D), yuv422p, 720x512 [SAR 128:135 DAR 4:3], q=2-31, max. 30000 kb/s, 29.97 fps, 30k tbn, 29.97 tbc
>>    Stream #0:1: Audio: pcm_s16le (sowt / 0x74776F73), 48000 Hz, 7.1, 6144 kb/s
>> Stream mapping:
>>  Stream #0:0 -> #0:0 (copy)
>>  Stream #0:1 -> #0:1 (copy)
>> Press [q] to stop, [?] for help
>> frame=  158 fps=0.0 q=-1.0 Lsize=   23268kB time=00:00:05.27 bitrate=36155.2kbits/s    
>> video:19306kB audio:3954kB subtitle:0 data:0 global headers:0kB muxing overhead 0.030963%
>> 
>> The output plays in QuickTime 7 though with the wrong aperature (720x512 is visible instead of 720x486 and VANC is visible). Final Cut plays it the same way. Both QuickTime and Final Cut identify the file as mpeg2 rather than imx. QuickTime X does not play the file correctly but shows colorful decoding artifacts on every frame.
>> 
> 
>> If I add -vtag mx3n to the command, then QuickTime 7, QuickTime X, and Final Cut play the file properly. But if I use -vtag mx3n and do not use the bitstream filter the output also well in the 3 apps as well.
> 
> so the bsf seems obsolete

I moved both a "-bsf:v imxdump -vtag mx3n" output and a "-vtag mx3n" output to an omneon broadcast server (which is usually more picky about imx than final cut), and both played out correctly.
Dave Rice


More information about the ffmpeg-devel mailing list