I use this to get resolution and fps data about videos.
Code:
$ mplayer -identify -frames 0 file.mkv
Actually have a little script that does it and makes a table for multiple input files. It isn't perfect - only 1 audio track is shown and no SRT or subs are listed. Ran out of room inside my normal terminal width. ;(
For example:
Code:
Type h:m:s VCodec WxH Aspect VRate ACodec AChan Filename
-------- -------- ------ --------- ---- ----- ------ ----- --------
lavfpref 44:11 h264 1280:720 0.00 59.94 ac3 2 Firefly-101-The_Train_Job.mkv
lavfpref 44:22 h264 1280:720 0.00 59.94 ac3 2 Firefly-102-Bushwacked.mkv
lavfpref 44:17 h264 1280:720 0.00 59.94 ac3 2 Firefly-103-Our_Mrs_Reynolds.mkv
Also use mkvinfo to grab data from mkv containers.
Code:
$ mkvi.sh Firefly-101-The_Train_Job.mkv
===[ Firefly-101-The_Train_Job.mkv ]===
| + Duration: 2651.746s (00:44:11.746)
| + Codec ID: V_MPEG4/ISO/AVC
| + CodecPrivate, length 45 (h.264 profile: High @L3.2)
| + Codec ID: A_AC3
| + Channels: 6
That one is much simpler. Just highly selective egreps. The code:
Code:
$ more ~/bin/mkvi.sh
#!/bin/bash
for filename in "$@"; do
echo "
===[ $filename ]===
"
mkvinfo $filename | egrep 'Duration:|CodecPrivate|Language:|Codec ID:|Channels:' | egrep -v und
done
Anyway - lots of ways to get information about video files from a shell.
Bookmarks