[FFmpeg-user] How can I set in a D10 MXF (IMX50) file the flags for output color_range, -space, -transfer and primaries?
Christoph Gerstbauer
christophgerstbauer at gmail.com
Wed Apr 29 23:22:14 CEST 2015
I found out that a IMX50 mxf file encoded with FFmbc and the IMX50 mxf file encoded with actual ffmpeg builds are different in these mxf metadata flags (by reading out via ffprobe - show_streams)
FFMBC IMX FILE stream 0:0:
color_range=tv
color_space=smpte170m
color_transfer=bt709
color_primaries=bt470bg
FFMPEG IMX FILE stream 0:0:
color_range=tv
color_space=unknown
color_transfer=unknown
color_primaries=unknown
I want to set these metadata flags to the same values, but with FFmpeg.
How can I produce the same output like ffmbc with these 4 metadata flags?
I didnt found a answer to that in the ffmpeg documentation :/
Best Regards
CHristoph
COMMAND LINE OUTPUT:
FFmbc encoding:
ffmbc -i I:\IMX_tests\IMX50_CARBON.avi -target imx50 -acodec pcm_s24le
I:\IMX_tests\_FFMBC_PAL_IMX_24bit_2.mxf -loglevel debug
FFmbc version 0.7-rc7
Copyright (c) 2008-2012 Baptiste Coudurier and the FFmpeg developers
Input #0, avi, from 'I:\IMX_tests\IMX50_CARBON.avi':
Metadata:
encoder: Lavf55.0.100
ISMP: 00:00:00:00
Duration: 00:00:20.00, start: 0.000000, bitrate: 113291 kb/s
Stream #0.0(und): Video: ffvhuff, yuv422p, 720x608p, PAR 152:135
DAR 4:3, 25.00 fps
Stream #0.1(und): Audio: pcm_s24le, 48000 Hz, stereo, s32, 2304 kb/s
[buffer @ 00000000002EFF60] w:720 h:608 pixfmt:yuv422p tb:1/1000000
sar:152/135 sws_param:
Warning, QMAT_SHIFT is larger than 21, overflows possible
Last message repeated 1 times
Output #0, mxf_d10, to 'I:\IMX_tests\_FFMBC_PAL_IMX_24bit_2.mxf':
Metadata:
encoder: FFmbc 0.7
Stream #0.0(und), 0, 1/25: Video: mpeg2video, yuv422p, 720x608i tff
[PAR 152:135 DAR 4:3], tbc 1/25, cbr, 50000 kb/s, 25.00 fps
Stream #0.1(und), 0, 1/48000: Audio: pcm_s24le, 48000 Hz, stereo,
s32, 2304 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Stream #0.1 -> #0.1
Press [q] to stop, [?] for help
[mxf_d10 @ 00000000003BF460] package type:1
[mxf_d10 @ 00000000003BF460] package type:2
[mxf_d10 @ 00000000003BF460] edit units count 0
frame= 341 fps= 25 q=3.0 size= 103570kB time=00:00:13.60
bitrate=62385.4kbits/s eta=00:00:06.41
-------------------------------------------------------------
FFMPEG encoding:
ffmpegnew -i I:\IMX_tests\IMX50_CARBON.avi -map 0:v -map 0:a -c:v
mpeg2video -r 25 -pix_fmt yuv422p -aspect 4:3 -minrate 50000k -maxrate
50000k -b:v 50000k -intra -flags +ildct+low_del
ay -intra_vlc 1 -non_linear_quant 1 -ps 1 -qmin 1 -qmax 3 -top 1 -dc 10
-bufsize 2000000 -rc_init_occupancy 2000000 -rc_max_vbv_use 1
-rc_min_vbv_use 1 -c:a pcm_s24le -ar 48000 -f mxf_d10 I:\IMX_tests
\_FFMPEGNEW_PAL_IMX_24bit_2.mxf
ffmpeg version N-71727-g46778ab Copyright (c) 2000-2015 the FFmpeg
developers
built with gcc 4.9.2 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libblu
ray --enable-libbs2b --enable-libcaca --enable-libdcadec
--enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc
--enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus
--enable-librtmp --enable-libschroedinger --enable-libsoxr
--enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --ena
ble-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis
--enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264
--enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
libavutil 54. 23.101 / 54. 23.101
libavcodec 56. 35.101 / 56. 35.101
libavformat 56. 31.100 / 56. 31.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 14.100 / 5. 14.100
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100
libpostproc 53. 3.100 / 53. 3.100
Input #0, avi, from 'I:\IMX_tests\IMX50_CARBON.avi':
Metadata:
encoder : Lavf55.0.100
timecode : 00:00:00:00
Duration: 00:00:20.00, start: 0.000000, bitrate: 113291 kb/s
Stream #0:0: Video: ffvhuff (FFVH / 0x48564646), yuv422p, 720x608,
111196 kb/s, SAR 152:135 DAR 4:3, 25 fps, 25 tbr, 25 tbn, 25 tbc
Stream #0:1: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 48000 Hz,
stereo, s32 (24 bit), 2304 kb/s
File 'I:\IMX_tests\_FFMPEGNEW_PAL_IMX_24bit_2.mxf' already exists.
Overwrite ? [y/N] y
Output #0, mxf_d10, to 'I:\IMX_tests\_FFMPEGNEW_PAL_IMX_24bit_2.mxf':
Metadata:
timecode : 00:00:00:00
encoder : Lavf56.31.100
Stream #0:0: Video: mpeg2video, yuv422p, 720x608 [SAR 152:135 DAR
4:3], q=1-3, 50000 kb/s, 25 fps, 25 tbn, 25 tbc
Metadata:
encoder : Lavc56.35.101 mpeg2video
Stream #0:1: Audio: pcm_s24le, 48000 Hz, stereo, s32 (24 bit), 2304
kb/s
Metadata:
encoder : Lavc56.35.101 pcm_s24le
Stream mapping:
Stream #0:0 -> #0:0 (ffvhuff (native) -> mpeg2video (native))
Stream #0:1 -> #0:1 (pcm_s24le (native) -> pcm_s24le (native))
Press [q] to stop, [?] for help
[mxf_d10 @ 00000000003bf240] the number of audio channels shall be 4 or
8 : the output will not comply to MXF D-10 specs, use -d10_channelcount
to fix this
frame= 500 fps=347 q=1.6 Lsize= 152756kB time=00:00:20.00
bitrate=62568.9kbits/s
video:122070kB audio:5625kB subtitle:0kB other streams:0kB global
headers:0kB muxing overhead: 19.625412%
More information about the ffmpeg-user
mailing list