[FFmpeg-user] using show_entries returns more results that specified
Stefano Sabatini
stefasab at gmail.com
Wed Dec 11 20:24:11 CET 2013
On date Wednesday 2013-12-11 04:24:49 -0800, RealBumba wrote:
> for example, if I wish to return just duration,size from format, and
> width,height from streams with query
>
> /ffprobe -v quiet -show_streams -select_streams v -show_entries
> format=size,duration:stream=width,height -print_format json -i test.mp4/
>
> It will return what I wanted removing most excess, but there are still some
> other entries, such as *tags*(in both streams and format wrapper), along
> with *disposition* in the streams wrapper.
> why is this being returned when I am not asking for it?
Yes, this is the expected behavior.
When you select -show_streams, you select all stream local entries and
their subsections, and is the equivalent of "-show_entries streams".
You can explicitly disable the elements in subsections, by doing:
"stream_tags=:stream_disposition="
(see ffprobe -sections for the complete list of sections).
or enabling through -show_entries only the local entries you're
interested in:
ffprobe -select_streams v -show_entries format=size,duration:stream=width,height -print_format json INPUT
Quoting the manual:
|If section name is specified but is followed by no "=", all entries
|are printed to output, together with all the contained
|sections. Otherwise only the entries specified in the local section
|entries list are printed. In particular, if "=" is specified but the
|list of local entries is empty, then no entries will be shown for
|that section.
More information about the ffmpeg-user
mailing list