[FFmpeg-user] Get RFC6381 codecs representation using ffmpeg/ffprobe

Claudiu Rad jazzman at misalpina.net
Mon Oct 24 17:27:35 EEST 2016


On 10/24/2016 4:33 PM, Carl Eugen Hoyos wrote:
> 2016-10-24 15:26 GMT+02:00 Claudiu Rad <jazzman at misalpina.net>:
>> Hello all,
>>
>> So I have whatever video and I need to obtain the RFC6381
>> representation  of its codecs: https://tools.ietf.org/html/rfc6381
>>
>> For example:
>> "avc1.640028" means: H.264/AVC video, High Profile, Level 40
>> "mp4a.40.2" means: AAC-LC
> (It isn't clear to me what is provided and what you need - left or right?)

I can get right by parsing the commands output, but I need left.

>
>> I assume ffmpeg knows very well about those things but I've run both
>> ffmpeg/ffprobe on the video but can't find any trace of those things in
>> the output. Or am I missing something?
> Please provide the ffmpeg command line you have tested and the
> complete, uncut console output.

Ok, sorry. Where can I find for example a representation like 
"avc1.64??29" (High profile means 100=0x64, level 41=0x29) for the video 
stream in the below outputs?

ffmpeg -i bunny1080p.mp4
ffmpeg version N-82092-g89ec4ad-static http://johnvansickle.com/ffmpeg/  
Copyright (c) 2000-2016 the FFmpeg developers
   built with gcc 5.4.1 (Debian 5.4.1-2) 20160904
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gray --enable-libass --enable-libebur128 
--enable-libfreetype --enable-libfribidi --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr 
--enable-libspeex --enable-libtheora --enable-libvidstab 
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx 
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid 
--enable-libzimg
   libavutil      55. 33.100 / 55. 33.100
   libavcodec     57. 63.103 / 57. 63.103
   libavformat    57. 53.100 / 57. 53.100
   libavdevice    57.  0.103 / 57.  0.103
   libavfilter     6. 64.100 /  6. 64.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  2.100 /  2.  2.100
   libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny1080p.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     creation_time   : 2013-12-16T17:44:39.000000Z
     title           : Big Buck Bunny, Sunflower version
     artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
     comment         : Creative Commons Attribution 3.0 - 
http://bbb3d.renderfarming.net
     genre           : Animation
     composer        : Sacha Goedegebure
   Duration: 00:10:34.53, start: 0.000000, bitrate: 3481 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc 
(default)
     Metadata:
       creation_time   : 2013-12-16T17:44:39.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, 
s16p, 160 kb/s (default)
     Metadata:
       creation_time   : 2013-12-16T17:44:42.000000Z
       handler_name    : GPAC ISO Audio Handler
     Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 
5.1(side), fltp, 320 kb/s (default)
     Metadata:
       creation_time   : 2013-12-16T17:44:42.000000Z
       handler_name    : GPAC ISO Audio Handler
     Side data:
       audio service type: main
At least one output file must be specified

ffprobe -print_format json -show_format -show_streams -show_programs 
-show_chapters bunny1080p.mp4
ffprobe version N-82092-g89ec4ad-static 
http://johnvansickle.com/ffmpeg/  Copyright (c) 2007-2016 the FFmpeg 
developers
   built with gcc 5.4.1 (Debian 5.4.1-2) 20160904
   configuration: --enable-gpl --enable-version3 --enable-static 
--disable-debug --disable-ffplay --disable-indev=sndio 
--disable-outdev=sndio --cc=gcc-5 --enable-fontconfig --enable-frei0r 
--enable-gnutls --enable-gray --enable-libass --enable-libebur128 
--enable-libfreetype --enable-libfribidi --enable-libmp3lame 
--enable-libopencore-amrnb --enable-libopencore-amrwb 
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsoxr 
--enable-libspeex --enable-libtheora --enable-libvidstab 
--enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx 
--enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid 
--enable-libzimg
   libavutil      55. 33.100 / 55. 33.100
   libavcodec     57. 63.103 / 57. 63.103
   libavformat    57. 53.100 / 57. 53.100
   libavdevice    57.  0.103 / 57.  0.103
   libavfilter     6. 64.100 /  6. 64.100
   libswscale      4.  1.100 /  4.  1.100
   libswresample   2.  2.100 /  2.  2.100
   libpostproc    54.  0.100 / 54.  0.100
{
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'bunny1080p.mp4':
   Metadata:
     major_brand     : isom
     minor_version   : 1
     compatible_brands: isomavc1
     creation_time   : 2013-12-16T17:44:39.000000Z
     title           : Big Buck Bunny, Sunflower version
     artist          : Blender Foundation 2008, Janus Bager Kristensen 2013
     comment         : Creative Commons Attribution 3.0 - 
http://bbb3d.renderfarming.net
     genre           : Animation
     composer        : Sacha Goedegebure
   Duration: 00:10:34.53, start: 0.000000, bitrate: 3481 kb/s
     Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 
1920x1080 [SAR 1:1 DAR 16:9], 2998 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc 
(default)
     Metadata:
       creation_time   : 2013-12-16T17:44:39.000000Z
       handler_name    : GPAC ISO Video Handler
     Stream #0:1(und): Audio: mp3 (mp4a / 0x6134706D), 48000 Hz, stereo, 
s16p, 160 kb/s (default)
     Metadata:
       creation_time   : 2013-12-16T17:44:42.000000Z
       handler_name    : GPAC ISO Audio Handler
     Stream #0:2(und): Audio: ac3 (ac-3 / 0x332D6361), 48000 Hz, 
5.1(side), fltp, 320 kb/s (default)
     Metadata:
       creation_time   : 2013-12-16T17:44:42.000000Z
       handler_name    : GPAC ISO Audio Handler
     Side data:
       audio service type: main
     "programs": [

     ],
     "streams": [
         {
             "index": 0,
             "codec_name": "h264",
             "codec_long_name": "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10",
             "profile": "High",
             "codec_type": "video",
             "codec_time_base": "1/60",
             "codec_tag_string": "avc1",
             "codec_tag": "0x31637661",
             "width": 1920,
             "height": 1080,
             "coded_width": 1920,
             "coded_height": 1080,
             "has_b_frames": 2,
             "sample_aspect_ratio": "1:1",
             "display_aspect_ratio": "16:9",
             "pix_fmt": "yuv420p",
             "level": 41,
             "chroma_location": "left",
             "refs": 1,
             "is_avc": "true",
             "nal_length_size": "4",
             "r_frame_rate": "30/1",
             "avg_frame_rate": "30/1",
             "time_base": "1/30000",
             "start_pts": 2000,
             "start_time": "0.066667",
             "duration_ts": 19036000,
             "duration": "634.533333",
             "bit_rate": "2998715",
             "bits_per_raw_sample": "8",
             "nb_frames": "19036",
             "disposition": {
                 "default": 1,
                 "dub": 0,
                 "original": 0,
                 "comment": 0,
                 "lyrics": 0,
                 "karaoke": 0,
                 "forced": 0,
                 "hearing_impaired": 0,
                 "visual_impaired": 0,
                 "clean_effects": 0,
                 "attached_pic": 0
             },
             "tags": {
                 "creation_time": "2013-12-16T17:44:39.000000Z",
                 "language": "und",
                 "handler_name": "GPAC ISO Video Handler"
             }
         },
         {
             "index": 1,
             "codec_name": "mp3",
             "codec_long_name": "MP3 (MPEG audio layer 3)",
             "codec_type": "audio",
             "codec_time_base": "1/48000",
             "codec_tag_string": "mp4a",
             "codec_tag": "0x6134706d",
             "sample_fmt": "s16p",
             "sample_rate": "48000",
             "channels": 2,
             "channel_layout": "stereo",
             "bits_per_sample": 0,
             "r_frame_rate": "0/0",
             "avg_frame_rate": "0/0",
             "time_base": "1/48000",
             "start_pts": 0,
             "start_time": "0.000000",
             "duration_ts": 30441600,
             "duration": "634.200000",
             "bit_rate": "160000",
             "nb_frames": "26425",
             "disposition": {
                 "default": 1,
                 "dub": 0,
                 "original": 0,
                 "comment": 0,
                 "lyrics": 0,
                 "karaoke": 0,
                 "forced": 0,
                 "hearing_impaired": 0,
                 "visual_impaired": 0,
                 "clean_effects": 0,
                 "attached_pic": 0
             },
             "tags": {
                 "creation_time": "2013-12-16T17:44:42.000000Z",
                 "language": "und",
                 "handler_name": "GPAC ISO Audio Handler"
             }
         },
         {
             "index": 2,
             "codec_name": "ac3",
             "codec_long_name": "ATSC A/52A (AC-3)",
             "codec_type": "audio",
             "codec_time_base": "1/48000",
             "codec_tag_string": "ac-3",
             "codec_tag": "0x332d6361",
             "sample_fmt": "fltp",
             "sample_rate": "48000",
             "channels": 6,
             "channel_layout": "5.1(side)",
             "bits_per_sample": 0,
             "dmix_mode": "-1",
             "ltrt_cmixlev": "-1.000000",
             "ltrt_surmixlev": "-1.000000",
             "loro_cmixlev": "-1.000000",
             "loro_surmixlev": "-1.000000",
             "r_frame_rate": "0/0",
             "avg_frame_rate": "0/0",
             "time_base": "1/48000",
             "start_pts": 0,
             "start_time": "0.000000",
             "duration_ts": 30438912,
             "duration": "634.144000",
             "bit_rate": "320000",
             "nb_frames": "19817",
             "disposition": {
                 "default": 1,
                 "dub": 0,
                 "original": 0,
                 "comment": 0,
                 "lyrics": 0,
                 "karaoke": 0,
                 "forced": 0,
                 "hearing_impaired": 0,
                 "visual_impaired": 0,
                 "clean_effects": 0,
                 "attached_pic": 0
             },
             "tags": {
                 "creation_time": "2013-12-16T17:44:42.000000Z",
                 "language": "und",
                 "handler_name": "GPAC ISO Audio Handler"
             },
             "side_data_list": [
                 {
                     "side_data_type": "Audio Service Type",
                     "side_data_size": 4
                 }
             ]
         }
     ],
     "chapters": [

     ],
     "format": {
         "filename": "bunny1080p.mp4",
         "nb_streams": 3,
         "nb_programs": 0,
         "format_name": "mov,mp4,m4a,3gp,3g2,mj2",
         "format_long_name": "QuickTime / MOV",
         "start_time": "0.000000",
         "duration": "634.533333",
         "size": "276134947",
         "bit_rate": "3481424",
         "probe_score": 100,
         "tags": {
             "major_brand": "isom",
             "minor_version": "1",
             "compatible_brands": "isomavc1",
             "creation_time": "2013-12-16T17:44:39.000000Z",
             "title": "Big Buck Bunny, Sunflower version",
             "artist": "Blender Foundation 2008, Janus Bager Kristensen 
2013",
             "comment": "Creative Commons Attribution 3.0 - 
http://bbb3d.renderfarming.net",
             "genre": "Animation",
             "composer": "Sacha Goedegebure"
         }
     }
}

-- 
Claudiu



More information about the ffmpeg-user mailing list