[FFmpeg-trac] #1859(FFprobe:open): feature request: making skip_stream work with ffprobe
FFmpeg
trac at avcodec.org
Sun Oct 28 15:47:51 CET 2012
#1859: feature request: making skip_stream work with ffprobe
-------------------------------------+-----------------------------------
Reporter: vineet156 | Owner:
Type: enhancement | Status: open
Priority: wish | Component: FFprobe
Version: git-master | Resolution:
Keywords: skip_frame | Blocked By:
Blocking: | Reproduced by developer: 1
Analyzed by developer: 0 |
-------------------------------------+-----------------------------------
Comment (by vineet156):
Thanks, but "-skip_frame nokey" does not work even with ffmpeg!
When I run following command:[[BR]]
ffprobe -select_streams v -show_frames -print_format json
1280x720_Shinkarenko-Gonzalez.mp4 > allframe-info.txt
{{{
ffprobe version 1.0.git Copyright (c) 2007-2012 the FFmpeg developers
built on Oct 28 2012 09:10:45 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --prefix=/usr/local --enable-libx264 --enable-libfaac
--enable-gpl --enable-shared --enable-nonfree --enable-libvorbis --enable-
libvpx --disable-ffserver --disable-doc --enable-bzlib --enable-zlib
libavutil 52. 0.100 / 52. 0.100
libavcodec 54. 69.100 / 54. 69.100
libavformat 54. 34.100 / 54. 34.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 20.105 / 3. 20.105
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1280x720_Shinkarenko-
Gonzalez.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.94.0
Duration: 00:07:36.22, start: 0.000000, bitrate: 3470 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 3298 kb/s, 29.97 fps, 29.97 tbr, 30k tbn,
59.94 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
s16, 165 kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
}}}
My allframe-info.txt has info has 13673 frames info in following json
format:
{{{
"frames": [
{
"media_type": "video",
"key_frame": 1,
"pkt_pts": 0,
"pkt_pts_time": "0.000000",
"pkt_dts": 0,
"pkt_dts_time": "0.000000",
"pkt_duration": 1001,
"pkt_duration_time": "0.033367",
"pkt_pos": "48",
"width": 1280,
"height": 720,
"pix_fmt": "yuv420p",
"sample_aspect_ratio": "1:1",
"pict_type": "I",
"coded_picture_number": 0,
"display_picture_number": 0,
"interlaced_frame": 0,
"top_field_first": 0,
"repeat_pict": 0,
"reference": 3
},
{
"media_type": "video",
"key_frame": 0,
"pkt_pts": 1001,
"pkt_pts_time": "0.033367",
"pkt_dts": 1001,
"pkt_dts_time": "0.033367",
"pkt_duration": 1001,
"pkt_duration_time": "0.033367",
"pkt_pos": "121676",
"width": 1280,
"height": 720,
"pix_fmt": "yuv420p",
"sample_aspect_ratio": "1:1",
"pict_type": "B",
"coded_picture_number": 2,
"display_picture_number": 0,
"interlaced_frame": 0,
"top_field_first": 0,
"repeat_pict": 0,
"reference": 0
},
....
....
....
]
}
}}}
[[BR]]
And there are 55 video frames where "key_frame": 1 in the json data file.
By this logic using "-skip_frame nokey" additional parameter to above
command, I should get only those 55 keyframes' json info in my text file
so my command line becomes:
ffprobe -skip_frame nokey -select_streams v -show_frames -print_format
json 1280x720_Shinkarenko-Gonzalez.mp4 > keyframe-info.txt
{{{
ffprobe version 1.0.git Copyright (c) 2007-2012 the FFmpeg developers
built on Oct 28 2012 09:10:45 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --prefix=/usr/local --enable-libx264 --enable-libfaac
--enable-gpl --enable-shared --enable-nonfree --enable-libvorbis --enable-
libvpx --disable-ffserver --disable-doc --enable-bzlib --enable-zlib
libavutil 52. 0.100 / 52. 0.100
libavcodec 54. 69.100 / 54. 69.100
libavformat 54. 34.100 / 54. 34.100
libavdevice 54. 3.100 / 54. 3.100
libavfilter 3. 20.105 / 3. 20.105
libswscale 2. 1.101 / 2. 1.101
libswresample 0. 16.100 / 0. 16.100
libpostproc 52. 1.100 / 52. 1.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '1280x720_Shinkarenko-
Gonzalez.mp4':
Metadata:
major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
creation_time : 1970-01-01 00:00:00
encoder : Lavf52.94.0
Duration: 00:07:36.22, start: 0.000000, bitrate: 3470 kb/s
Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1280x720 [SAR 1:1 DAR 16:9], 3298 kb/s, 29.97 fps, 29.97 tbr, 30k tbn,
59.94 tbc
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : VideoHandler
Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
s16, 165 kb/s
Metadata:
creation_time : 1970-01-01 00:00:00
handler_name : SoundHandler
}}}
But my keyframe-info.txt file again contains 13673 frames instead of 55
keyframes
So "skip_frame nokey" is not working. Is this a bug?
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/1859#comment:2>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list