0

I need to get video audio stream information in separate form.

I have tried ffprobe and mediainfo, but they give full information which needs to be parsed.

I think there could be option like, where I do not need to parse the full information and get required data.

$ffprobe -XXX audio channels 8

$ffprobe -YYY video_resolution 512x288

Can anybody help with this.

1 Answers1

0

ffprobe includes support for a variety of output formats, so you shouldn't need an especially intelligent parser:

$ ffprobe -loglevel error -show_streams test.avi | grep channels | cut -d= -f2
2
$
$ ffprobe -loglevel error -show_streams test.avi | egrep "width|height" | cut -d= -f2
704
400
$

Other output formats include json, xml, csv.

blahdiblah
  • 33,069
  • 21
  • 98
  • 152