[FFmpeg-user] ffprobe only the first frame

Mark Himsley mark at mdsh.com
Sun Jun 10 21:23:09 CEST 2012

On 10/06/2012 20:00, Nicolas George wrote:
> Le tridi 23 prairial, an CCXX, Mark Himsley a écrit :
>> I'd like to probe a file to get interlaced_frame="1"
>> top_field_first="1" - which I believe is only available in
>> -show_frames.
>> My file is 30 minutes log - I only want the data from the first frame.
> Just stop reading and close your pipe from ffprobe when you have the info
> you need; ffprobe will die of a SIGPIPE as it should.

Yep - that works for a pipe: input to ffprobe, but not for a file: type. 
So that trick can only work for some types of source file. Other types 
of file will require Stefano's "trim the file *physically* in order to 
reduce the amount of data to be decoded" trick - so my wish for a 
-vframes type parameter to ffprobe would still be a great aid there.



More information about the ffmpeg-user mailing list