[FFmpeg-user] Levels and Primaries

Rio Kierkels riokierkels at gmail.com
Mon Feb 3 21:14:22 CET 2014


Below you'll find the original logs for the color bar test.
The dpx file is number 75 from this image sequence in this zip file (image
sequence zip file<https://drive.google.com/file/d/0B9hzJJkCcuUrMmdHdmFodHFiVjQ/edit?usp=sharing>
).

I hope this is clear enough. Thank you Carl and Lou for pointing this out.

Now I lets get back to the main topic: Is ffmpeg's mxf and waveform output
color accurate?


> On 3 February 2014 17:24, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:
>
>> Rio Kierkels <riokierkels <at> gmail.com> writes:
>>
>> > I'm not posting the logs in text form directly in the mail
>>
>> How are we supposed to reproduce the problem then?
>> (External resources tend to disappear.)
>
>
> All right, fair enough. Here is the output for creating the mxf file from
> the dpx,  the ffprobe output of that mxf and the waveforms generated from
> the mxf in that order.
> I'll ask our Studio to generate a 1 second mxf file using the usual
> methods from the same colorbar dpx that is attached to this mail for
> reference.
>
> #### DPX to MXF: #####
>
> [render at render07 ~]$ ffmpeg -i "color_sequence.%4d.dpx" -i "audio.aif"
> -map 0:0 -c:0:0 mpeg2video -b:0:0 50M -g 12 -bf 3 -pix_fmt yuv422p
> -color_range 1 -colorspace 1 -color_primaries 1 -color_trc 1 -filter:0:0
> "scale=w=1920:h=1080,setdar=1.77777777778,colormatrix=bt601:bt709" -flags
> +ildct+ilme -top 1 -map 1:a:0 -map_channel 1.0.0:0.1 -map 1:a:0
> -map_channel 1.0.1:0.2 -map 1:a:0 -map_channel -1:0.3 -map 1:a:0
> -map_channel -1:0.4 -c:1:0 pcm_s24le -b:1:0 240000 "out.mxf"
> ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
>   built on Dec 23 2013 14:19:36 with gcc 4.4.6 (GCC) 20120305 (Red Hat
> 4.4.6-4)
>   configuration: --prefix=/ffmpeg/build/ --enable-gpl --enable-version3
> --enable-nonfree --disable-ffplay --disable-ffserver --enable-libx264
> --enable-libvpx --enable-libopenjpeg --enable-libtheora
> --enable-libvo-aacenc --enable-libvorbis --enable-libmp3lame
> --extra-cflags=-I/ffmpeg/build/include --extra-ldflags=-L/ffmpeg/build/lib
>   libavutil      52. 48.101 / 52. 48.101
>   libavcodec     55. 39.101 / 55. 39.101
>   libavformat    55. 19.104 / 55. 19.104
>   libavdevice    55.  5.100 / 55.  5.100
>   libavfilter     3. 90.100 /  3. 90.100
>   libswscale      2.  5.101 /  2.  5.101
>   libswresample   0. 17.104 /  0. 17.104
>   libpostproc    52.  3.100 / 52.  3.100
> Input #0, image2, from 'color_sequence.%4d.dpx':
>   Duration: 00:00:19.00, start: 0.000000, bitrate: N/A
>     Stream #0:0: Video: dpx, gbrp10le, 1920x1080 [SAR 1:1 DAR 16:9], 25
> tbr, 25 tbn, 25 tbc
> Guessed Channel Layout for  Input Stream #1.0 : stereo
> Input #1, aiff, from 'audio.aif':
>   Duration: 00:00:20.00, start: 0.000000, bitrate: 2304 kb/s
>     Stream #1:0: Audio: pcm_s24be, 48000 Hz, stereo, s32, 2304 kb/s
> File 'out.mxf' already exists. Overwrite ? [y/N] y
> -map_channel is forwarded to lavfi similarly to -af pan=0x4:c0=c0.
> [pan @ 0x3492340] This syntax is deprecated. Use '|' to separate the list
> items.
> [pan @ 0x3492340] Pure channel mapping detected: 0
> -map_channel is forwarded to lavfi similarly to -af pan=0x4:c0=c1.
> [pan @ 0x3659f60] This syntax is deprecated. Use '|' to separate the list
> items.
> [pan @ 0x3659f60] Pure channel mapping detected: 1
> -map_channel is forwarded to lavfi similarly to -af pan=0x4.
> [pan @ 0x3663920] Pure channel mapping detected: M
> -map_channel is forwarded to lavfi similarly to -af pan=0x4.
> [pan @ 0x36772c0] Pure channel mapping detected: M
> Output #0, mxf, to 'out.mxf':
>   Metadata:
>     encoder         : Lavf55.19.104
>     Stream #0:0: Video: mpeg2video, yuv422p(tv, bt709), 1920x1080 [SAR 1:1
> DAR 16:9], q=2-31, 50000 kb/s, 25 tbn, 25 tbc
>     Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
>     Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
>     Stream #0:3: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
>     Stream #0:4: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (dpx -> mpeg2video)
>   Stream #1:0 -> #0:1 (pcm_s24be -> pcm_s24le)
>   Stream #1:0 -> #0:2 (pcm_s24be -> pcm_s16le)
>   Stream #1:0 -> #0:3 (pcm_s24be -> pcm_s16le)
>   Stream #1:0 -> #0:4 (pcm_s24be -> pcm_s16le)
> Press [q] to stop, [?] for help
> frame=  475 fps=7.4 q=0.0 Lsize=   28926kB time=00:00:20.00
> bitrate=11847.9kbits/s
> video:19992kB audio:8438kB subtitle:0 global headers:0kB muxing overhead
> 1.743244%
>
> #### generated MXF ffprobe output: ####
>
> [render at render07 ~]$ ffprobe out.mxf -show_streams -show_format
> -print_format json > out_probe.txt
> ffprobe version 2.1.1 Copyright (c) 2007-2013 the FFmpeg developers
>   built on Dec 23 2013 14:19:36 with gcc 4.4.6 (GCC) 20120305 (Red Hat
> 4.4.6-4)
>   configuration: --prefix=/ffmpeg/build/ --enable-gpl --enable-version3
> --enable-nonfree --disable-ffplay --disable-ffserver --enable-libx264
> --enable-libvpx --enable-libopenjpeg --enable-libtheora
> --enable-libvo-aacenc --enable-libvorbis --enable-libmp3lame
> --extra-cflags=-I/ffmpeg/build/include --extra-ldflags=-L/ffmpeg/build/lib
>   libavutil      52. 48.101 / 52. 48.101
>   libavcodec     55. 39.101 / 55. 39.101
>   libavformat    55. 19.104 / 55. 19.104
>   libavdevice    55.  5.100 / 55.  5.100
>   libavfilter     3. 90.100 /  3. 90.100
>   libswscale      2.  5.101 /  2.  5.101
>   libswresample   0. 17.104 /  0. 17.104
>   libpostproc    52.  3.100 / 52.  3.100
> Input #0, mxf, from 'out.mxf':
>   Metadata:
>     uid             : adab4424-2f25-4dc7-92ff-29bd000b0000
>     generation_uid  : adab4424-2f25-4dc7-92ff-29bd000b0001
>     company_name    : FFmpeg
>     product_name    : OP1a Muxer
>     product_version : 55.19.104
>     product_uid     : adab4424-2f25-4dc7-92ff-29bd000b0002
>     modification_date: 0-01-01 00:00:00
>     timecode        : 00:00:00:00
>   Duration: 00:00:19.00, start: 0.000000, bitrate: 12471 kb/s
>     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR
> 1:1 DAR 16:9], max. 104857 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
>     Stream #0:1: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
>     Stream #0:2: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
>     Stream #0:3: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
>     Stream #0:4: Audio: pcm_s16le, 48000 Hz, 1 channels, s16, 768 kb/s
> {
>     "streams": [
>         {
>             "index": 0,
>             "codec_name": "mpeg2video",
>             "codec_long_name": "MPEG-2 video",
>             "profile": "4:2:2",
>             "codec_type": "video",
>             "codec_time_base": "1/50",
>             "codec_tag_string": "[0][0][0][0]",
>             "codec_tag": "0x0000",
>             "width": 1920,
>             "height": 1080,
>             "has_b_frames": 1,
>             "sample_aspect_ratio": "1:1",
>             "display_aspect_ratio": "16:9",
>             "pix_fmt": "yuv422p",
>             "level": 2,
>             "timecode": "00:00:00:00",
>             "r_frame_rate": "25/1",
>             "avg_frame_rate": "25/1",
>             "time_base": "1/25",
>             "start_pts": 0,
>             "start_time": "0.000000",
>             "duration_ts": 475,
>             "duration": "19.000000",
>             "disposition": {
>                 "default": 0,
>                 "dub": 0,
>                 "original": 0,
>                 "comment": 0,
>                 "lyrics": 0,
>                 "karaoke": 0,
>                 "forced": 0,
>                 "hearing_impaired": 0,
>                 "visual_impaired": 0,
>                 "clean_effects": 0,
>                 "attached_pic": 0
>             }
>         },
>         {
>             "index": 1,
>             "codec_name": "pcm_s24le",
>             "codec_long_name": "PCM signed 24-bit little-endian",
>             "codec_type": "audio",
>             "codec_time_base": "1/48000",
>             "codec_tag_string": "[0][0][0][0]",
>             "codec_tag": "0x0000",
>             "sample_fmt": "s32",
>             "sample_rate": "48000",
>             "channels": 1,
>             "bits_per_sample": 24,
>             "r_frame_rate": "0/0",
>             "avg_frame_rate": "0/0",
>             "time_base": "1/48000",
>             "start_pts": 0,
>             "start_time": "0.000000",
>             "duration_ts": 912000,
>             "duration": "19.000000",
>             "bit_rate": "1152000",
>             "disposition": {
>                 "default": 0,
>                 "dub": 0,
>                 "original": 0,
>                 "comment": 0,
>                 "lyrics": 0,
>                 "karaoke": 0,
>                 "forced": 0,
>                 "hearing_impaired": 0,
>                 "visual_impaired": 0,
>                 "clean_effects": 0,
>                 "attached_pic": 0
>             }
>         },
>         {
>             "index": 2,
>             "codec_name": "pcm_s16le",
>             "codec_long_name": "PCM signed 16-bit little-endian",
>             "codec_type": "audio",
>             "codec_time_base": "1/48000",
>             "codec_tag_string": "[0][0][0][0]",
>             "codec_tag": "0x0000",
>             "sample_fmt": "s16",
>             "sample_rate": "48000",
>             "channels": 1,
>             "bits_per_sample": 16,
>             "r_frame_rate": "0/0",
>             "avg_frame_rate": "0/0",
>             "time_base": "1/48000",
>             "start_pts": 0,
>             "start_time": "0.000000",
>             "duration_ts": 912000,
>             "duration": "19.000000",
>             "bit_rate": "768000",
>             "disposition": {
>                 "default": 0,
>                 "dub": 0,
>                 "original": 0,
>                 "comment": 0,
>                 "lyrics": 0,
>                 "karaoke": 0,
>                 "forced": 0,
>                 "hearing_impaired": 0,
>                 "visual_impaired": 0,
>                 "clean_effects": 0,
>                 "attached_pic": 0
>             }
>         },
>         {
>             "index": 3,
>             "codec_name": "pcm_s16le",
>             "codec_long_name": "PCM signed 16-bit little-endian",
>             "codec_type": "audio",
>             "codec_time_base": "1/48000",
>             "codec_tag_string": "[0][0][0][0]",
>             "codec_tag": "0x0000",
>             "sample_fmt": "s16",
>             "sample_rate": "48000",
>             "channels": 1,
>             "bits_per_sample": 16,
>             "r_frame_rate": "0/0",
>             "avg_frame_rate": "0/0",
>             "time_base": "1/48000",
>             "start_pts": 0,
>             "start_time": "0.000000",
>             "duration_ts": 912000,
>             "duration": "19.000000",
>             "bit_rate": "768000",
>             "disposition": {
>                 "default": 0,
>                 "dub": 0,
>                 "original": 0,
>                 "comment": 0,
>                 "lyrics": 0,
>                 "karaoke": 0,
>                 "forced": 0,
>                 "hearing_impaired": 0,
>                 "visual_impaired": 0,
>                 "clean_effects": 0,
>                 "attached_pic": 0
>             }
>         },
>         {
>             "index": 4,
>             "codec_name": "pcm_s16le",
>             "codec_long_name": "PCM signed 16-bit little-endian",
>             "codec_type": "audio",
>             "codec_time_base": "1/48000",
>             "codec_tag_string": "[0][0][0][0]",
>             "codec_tag": "0x0000",
>             "sample_fmt": "s16",
>             "sample_rate": "48000",
>             "channels": 1,
>             "bits_per_sample": 16,
>             "r_frame_rate": "0/0",
>             "avg_frame_rate": "0/0",
>             "time_base": "1/48000",
>             "start_pts": 0,
>             "start_time": "0.000000",
>             "duration_ts": 912000,
>             "duration": "19.000000",
>             "bit_rate": "768000",
>             "disposition": {
>                 "default": 0,
>                 "dub": 0,
>                 "original": 0,
>                 "comment": 0,
>                 "lyrics": 0,
>                 "karaoke": 0,
>                 "forced": 0,
>                 "hearing_impaired": 0,
>                 "visual_impaired": 0,
>                 "clean_effects": 0,
>                 "attached_pic": 0
>             }
>         }
>     ],
>     "format": {
>         "filename": "out.mxf",
>         "nb_streams": 5,
>         "nb_programs": 0,
>         "format_name": "mxf",
>         "format_long_name": "MXF (Material eXchange Format)",
>         "start_time": "0.000000",
>         "duration": "19.000000",
>         "size": "29619781",
>         "bit_rate": "12471486",
>         "probe_score": 100,
>         "tags": {
>             "uid": "adab4424-2f25-4dc7-92ff-29bd000b0000",
>             "generation_uid": "adab4424-2f25-4dc7-92ff-29bd000b0001",
>             "company_name": "FFmpeg",
>             "product_name": "OP1a Muxer",
>             "product_version": "55.19.104",
>             "product_uid": "adab4424-2f25-4dc7-92ff-29bd000b0002",
>             "modification_date": "0-01-01 00:00:00",
>             "timecode": "00:00:00:00"
>         }
>     }
> }
>
> #### MXF to waveform: ####
>
> [render at render07 ~]$ ffmpeg -i dpx_to_mxf.mxf -filter:v
> "histogram=mode=waveform:display_mode=overlay:waveform_mirror=1:waveform_mode=column"
> dpx_to_mxf_waveform.%04d.png
> ffmpeg version 2.1.1 Copyright (c) 2000-2013 the FFmpeg developers
>   built on Dec 23 2013 14:19:36 with gcc 4.4.6 (GCC) 20120305 (Red Hat
> 4.4.6-4)
>   configuration: --prefix=/ffmpeg/build/ --enable-gpl --enable-version3
> --enable-nonfree --disable-ffplay --disable-ffserver --enable-libx264
> --enable-libvpx --enable-libopenjpeg --enable-libtheora
> --enable-libvo-aacenc --enable-libvorbis --enable-libmp3lame
> --extra-cflags=-I/ffmpeg/build/include --extra-ldflags=-L/ffmpeg/build/lib
>   libavutil      52. 48.101 / 52. 48.101
>   libavcodec     55. 39.101 / 55. 39.101
>   libavformat    55. 19.104 / 55. 19.104
>   libavdevice    55.  5.100 / 55.  5.100
>   libavfilter     3. 90.100 /  3. 90.100
>   libswscale      2.  5.101 /  2.  5.101
>   libswresample   0. 17.104 /  0. 17.104
>   libpostproc    52.  3.100 / 52.  3.100
> 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
> Input #0, mxf, from 'dpx_to_mxf.mxf':
>   Metadata:
>     uid             : adab4424-2f25-4dc7-92ff-29bd000b0000
>     generation_uid  : adab4424-2f25-4dc7-92ff-29bd000b0001
>     company_name    : FFmpeg
>     product_name    : OP1a Muxer
>     product_version : 55.19.104
>     product_uid     : adab4424-2f25-4dc7-92ff-29bd000b0002
>     modification_date: 0-01-01 00:00:00
>     timecode        : 00:00:00:00
>   Duration: 00:00:19.00, start: 0.000000, bitrate: 12471 kb/s
>     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv), 1920x1080 [SAR
> 1:1 DAR 16:9], max. 104857 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc
>     Stream #0:1: Audio: pcm_s24le, 48000 Hz, mono, s32, 1152 kb/s
>     Stream #0:2: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
>     Stream #0:3: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
>     Stream #0:4: Audio: pcm_s16le, 48000 Hz, mono, s16, 768 kb/s
> Output #0, image2, to 'dpx_to_mxf_waveform/dpx_to_mxf_waveform.%04d.png':
>   Metadata:
>     uid             : adab4424-2f25-4dc7-92ff-29bd000b0000
>     generation_uid  : adab4424-2f25-4dc7-92ff-29bd000b0001
>     company_name    : FFmpeg
>     product_name    : OP1a Muxer
>     product_version : 55.19.104
>     product_uid     : adab4424-2f25-4dc7-92ff-29bd000b0002
>     modification_date: 0-01-01 00:00:00
>     timecode        : 00:00:00:00
>     encoder         : Lavf55.19.104
>     Stream #0:0: Video: png, rgb24, 1920x256 [SAR 1:1 DAR 15:2], q=2-31,
> 200 kb/s, 90k tbn, 25 tbc
> Stream mapping:
>   Stream #0:0 -> #0:0 (mpeg2video -> png)
> Press [q] to stop, [?] for help
> frame=  475 fps= 19 q=0.0 Lsize=N/A time=00:00:19.00 bitrate=N/A
> video:100153kB audio:0kB subtitle:0 global headers:0kB muxing overhead
> -100.000021%
>
> --
> 42
>
-- 
42


More information about the ffmpeg-user mailing list