or
from subprocess import Popen, PIPE
probe = Popen(("mplayer ", "-identify", "-frames", "0", "-ao", "null",
ip_file), stdout=PIPE, stderr=PIPE).co mmunicate()[0]
First one uses transcode the second one uses mplayer. I normally follow
these with a regexp search on "probe" for the data I want.
I have found mplayer to be more accurate than transcode which seems to have
a problem with some files notably MPEG program streams although it seems to
work fine for elementary streams.
Comment