[Techtalk] video, audio codecs
Miriam English
mim at miriam-english.org
Sat Sep 24 09:58:29 UTC 2011
hi folks,
Like most people I have built up, over the years, a collection of videos
-- personal videos, quirky stuff from online, science videos, my
re-encoded DVDs (I keep my fragile DVDs as archives). I have no problem
viewing these on my computer, but if I want to use a standalone video
player I've found they're very restricted in the codecs they will
recognise. So it would be nice to be easily able to tell if a file will
play or if I need to re-encode it.
I can use the "properties" GUI of my ROX file manager to show info about
the video, but this is slow and a hassle. I've managed to cobble
together a simple script that lists the info using mplayer. It works,
but it's not great. Does anybody know of a shell program that will do
the job?
By the way my simple script is:
#! /bin/sh
cd "$1"
for f in *
do
echo "[31m$f[0m"
mplayer "$f" -v -ao null -vo null -frames 0 2>/dev/null | grep "audio
codec:"
mplayer "$f" -v -ao null -vo null -frames 0 2>/dev/null | grep "VIDEO:"
echo
done
It gives output like this (but with the filenames colored red):
Annie_Oakley_shooting_glass_balls,_1894_video.ogm
VIDEO: [theo] 320x240 0bpp 29.970 fps 0.0 kbps ( 0.0 kbyte/s)
my_niece_sophie_eyes.asf
Selected audio codec: [ffadpcmimawav] afm: ffmpeg (FFmpeg WAV IMA ADPCM
audio)
VIDEO: [M4S2] 320x240 24bpp 1000.000 fps 0.0 kbps ( 0.0 kbyte/s)
Thornton Grover - quantum entanglement.flv
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
VIDEO: [VP6F] 320x240 0bpp 29.917 fps 409.6 kbps (50.0 kbyte/s)
TShirtFolding.mpg
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
VIDEO: MPEG1 320x240 (aspect 1) 29.970 fps 608.0 kbps (76.0 kbyte/s)
water droplet bouncing on superhydrophobic carbon nanotube array.flv
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
VIDEO: [H264] 640x480 0bpp 59.750 fps 284.7 kbps (34.8 kbyte/s)
--
If you don't have any failures then you're not trying hard enough.
- Dr. Charles Elachi, director of NASA's Jet Propulsion Laboratory
-----
Website: http://miriam-english.org
Blogs: http://miriam-e.dreamwidth.org
http://miriam-e.livejournal.com
More information about the Techtalk
mailing list