ffprobe show_entries with an entry name that uses a semicolon

5

2

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.

Benjamin

Posted 2015-03-19T22:58:23.820

Reputation: 153

Answers

7

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

$ 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.

  • I added -of default=noprint_wrappers=1 to omit the section headers and footers.

llogan

Posted 2015-03-19T22:58:23.820

Reputation: 31 929