Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
Is there a quick way to determine if a file is video or audio with mediainfo, without reading all the properties? So I could write
if [ file is video ]
mediainfo --video-options file
elif [ file is audio ]
mediainfo --audio-options file
mediainfo "--Inform=General;%VideoCount%" file
mediainfo "--Inform=General;%AudioCount%" file
return a value superior or egal to 1 if there is a video (or an audio) stream, else empty.
You need to "transform" yourself such returned value to true/false
Add --ParseSpeed=0, it is fast parsing and you don't need "advanced" values, so what is not present in the output (e.g. GOP size) is not a problem for you.
Ok, it works a bit faster. Thank you.
For about a hundred files
mediainfo --ParseSpeed=0 --Inform='General;%VideoCount%'
But these options are not documented in mediainfo --help. =)
I have v0.7.61. Is there any other documentation?
--Output and --Inform are same, sorry, I forgot to trash "inform" word.
I am a bit disappointed about speed improvement, it does not help a lot with your files.
Documentation definitely sucks, I'll write it when people stop to request new features for yesterday.
The speed impact is really not large. Bug generally I'm quite satisfied with the performance. Anyway, your program works very fast.