[FFmpeg-user] How to read out Color primaries (bt709, bt601, fcc) via ffprobe -show_streams

Christoph Gerstbauer christophgerstbauer at gmail.com
Mon Jun 16 15:55:11 CEST 2014


Hello Carl,

how can I read out the information in brackets after the pixel format 
information via ffprobe -show_streams?

When I open a file (eg. XDCAMHD) ffprobe shows me following:

Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 1920x1080 
[SAR 1:1 DAR 16:9], max. 50000 kb/s, 25 fps, 25 tbr, 25 tbn, 50 tbc

I want to get this information with "ffprobe -show_streams": 
*pix_fmt=yuv422p(tv, bt709)*
But when I use this syntax the output shows me only: *pix_fmt=yuv422p*

This happens with every file I am testing. So ffprobe does not have this 
function to show the tv,bt709 information with the -show_streams option, 
I guess.

CL output:

C:\Users\gersti>ffprobe -i 
"I:\_Testfiles\01_SLO_REQUIRED\_fileset1_GREY\XDCAMHD\01_optPROG_MPEG2_YUV422_(tv, 
bt709)__8xMono-PCM24bit__Sony Opt__C0002.MXF" -show_streams
ffprobe version N-63861-g958168d Copyright (c) 2007-2014 the FFmpeg 
developers
   built on Jun  9 2014 22:09:41 with gcc 4.8.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-libcaca --enable-libfreetype --enable-libgme 
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libope
njpeg --enable-libopus --enable-librtmp --enable-libschroedinger 
--enable-libsoxr --enable-libspeex --enable-libtheora 
--enable-libtwolame --enable-libvidstab --enable-libvo-aacenc 
--enable-libvo-amrw
benc --enable-libvorbis --enable-libvpx --enable-libwavpack 
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs 
--enable-libxvid --enable-decklink --enable-zlib
   libavutil      52. 89.100 / 52. 89.100
   libavcodec     55. 66.100 / 55. 66.100
   libavformat    55. 42.101 / 55. 42.101
   libavdevice    55. 13.101 / 55. 13.101
   libavfilter     4.  7.100 /  4.  7.100
   libswscale      2.  6.100 /  2.  6.100
   libswresample   0. 19.100 /  0. 19.100
   libpostproc    52.  3.100 / 52.  3.100
Input #0, mxf, from 
'I:\_Testfiles\01_SLO_REQUIRED\_fileset1_GREY\XDCAMHD\01_optPROG_MPEG2_YUV422_(tv, 
bt709)__8xMono-PCM24bit__Sony Opt__C0002.MXF':
   Metadata:
     uid             : 57a71a00-0864-05c1-020c-08004602023b
     generation_uid  : 57a71a00-0864-05c2-020c-08004602023b
     company_name    : SONY
     product_name    : Opt
     product_version : 1.22
     product_uid     : 060e2b34-0401-0103-0e06-012002010300
     modification_date: 2013-04-26 19:23:51
     timecode        : 02:00:06:01
   Duration: 00:00:37.72, start: 0.000000, bitrate: 60236 kb/s
     Stream #0:0: Video: mpeg2video (4:2:2), yuv422p(tv, bt709), 
1920x1080 [SAR 1:1 DAR 16:9], max. 50000 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_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:3: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:4: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:5: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:6: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:7: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
     Stream #0:8: Audio: pcm_s24le, 48000 Hz, 1 channels, s32, 1152 kb/s
[STREAM]
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
id=N/A
r_frame_rate=25/1
avg_frame_rate=25/1
time_base=1/25
start_pts=0
start_time=0.000000
duration_ts=943
duration=37.720000
bit_rate=N/A
max_bit_rate=50000000
nb_frames=N/A
nb_read_frames=N/A
nb_read_packets=N/A
DISPOSITION:default=0
DISPOSITION:dub=0
DISPOSITION:original=0
DISPOSITION:comment=0
DISPOSITION:lyrics=0
DISPOSITION:karaoke=0
DISPOSITION:forced=0
DISPOSITION:hearing_impaired=0
DISPOSITION:visual_impaired=0
DISPOSITION:clean_effects=0
DISPOSITION:attached_pic=0
[/STREAM]
[STREAM]

bg
Christoph


More information about the ffmpeg-user mailing list