ffprobe show_entries with an entry name that uses a semicolon

I'm probing a video file to get some basic information. For example, the following uses the show_entries flag to specify the necessary data.

> ffprobe -v error -show_entries format=size,duration:stream=codec_name,bit_rate video.mp4 

I also need to get the TAG:rotate entry, but this does not working as the semicolon mixes with the syntax of the show_entries flag.

> ffprobe -v error -show_entries format=size,duration:stream=codec_name,bit_rate,TAG:rotate output.mp4 No match for section 'rotate' Failed to set value 'format=size,duration:stream=codec_name,bit_rate,TAG:rotate' for option 'show_entries': Invalid argument 

Is there a way to fix the syntax? The only other solution is not to specify the individual entries and just get all the data.

1 Answer

You can use stream_tags for metadata tags stored in the stream:

Some examples and results:

ffprobe -v error -show_entries stream_tags=rotate -of csv=p=0 input.mp4 90 ffprobe -v error -show_entries stream_tags=rotate -of default=noprint_wrappers=1 input.mp4 TAG:rotate=90 ffprobe -v error -show_entries stream_tags=rotate:format=size,duration:stream=codec_name,bit_rate -of default=noprint_wrappers=1 input.mp4 codec_name=h264 bit_rate=39761 TAG:rotate=90 duration=5.000000 size=27114 

In addition there is format_tags for metadata tags stored in the container (global metadata).

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like