Get ffmpeg information in friendly way
Posted
by
JBernardo
on Stack Overflow
See other posts from Stack Overflow
or by JBernardo
Published on 2011-10-10T03:50:47Z
Indexed on
2011/11/19
1:50 UTC
Read the original article
Hit count: 133
Every time I try to get some information about my video files with ffmpeg, it pukes a lot of useless information mixed with good things.
I'm using ffmpeg -i name_of_the_video.mpg
.
There are any possibilities to get that in a friendly way? I mean JSON would be great (and even ugly XML is fine).
By now, I made my application parse the data with regex but there are lots of nasty corners that appear on some specific video files. I fixed all that I encountered, but there may be more.
I wanted something like:
{
"Stream 0": {
"type": "Video",
"codec": "h264",
"resolution": "720x480"
},
"Stream 1": {
"type": "Audio",
"bitrate": "128 kbps",
"channels": 2
}
}
© Stack Overflow or respective owner