[MEncoder-users] Using mplayer/mencoder to detect broken media...
Joe Emenaker
joe at emenaker.com
Fri Mar 2 05:30:36 CET 2007
Probably more of a mplayer question, but I like to live life on the
edge, so I'm posting it to the mencoder list (and also because it's the
list I follow daily).
I have an ext3 partition with a lot of avi's/mov's/avf's/wmv's... and it
had a nasty filesystem corruption last night... with lots of problems
which were "fixed" in the sense that the filesystem is now coherent
again, but the data in some or many of the videos is now corrupt.
I'd *like* to avoid watching every frame of each one for tiny glitches.
I'd rather run a script that will check them all for me.
Googling turned up the prospect of doing: "mplayer -vo null -ao null
-speed <speed> <file>", but this outputs a lot of text that must be
looked through for errors. What I'm after is a command-line that will
output nothing *unless* there is some kind of demuxer/decoder error or
warning. Then, I can toss the file into a "suspected good" or "suspected
bad" folder, depending upon whether or not any text was produced by mplayer.
What I've come up with so far is this:
mplayer -benchmark -nosound -vo null -msglevel all=2:lirc=-1:input=0
hosed.avi
"-benchmark" and "-nosound" just tells mplayer to go as fast as it can,
which seems a better option, to me, than "-speed".
For the message levels: "all=2" gets rid of a lot of the boilerplate like:
> Playing hosed.avi.
> AVI file format detected.
> VIDEO: [XVID] 320x240 24bpp 25.000 fps 1302.7 kbps (159.0 kbyte/s)
> ...
"lirc=-1" gets rid of "Failed to open LIRC support. You will not be able
to use your remote control."
"input=0" gets rid of "Can't open joystick device /dev/input/js0: No
such file or directory" and "Can't init input joystick"
So, what I'm left with is 6 lines reading:
> MPlayer dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2007 MPlayer Team
> CPU: AMD Athlon(tm) (Family: 6, Model: 10, Stepping: 0)
> CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
> Compiled with runtime CPU detection.
> mplayer: could not connect to socket
> mplayer: No such file or directory
Strangely, "cpudetect=-1" and/or "global=-1" and/or "cplayer=-1" all
fail to eliminate any of these six lines.
Before I go an try *every* message type listed in "-msglevel help", does
anybody know, off the top of their head, what I should use?
- Joe
More information about the MEncoder-users
mailing list