Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- ffmpeg="$1"
- tmp=/tmp/ffi.$$
- $ffmpeg -i "$2" 2> $tmp
- vcodec=`awk '/^ Stream.*: Video:/ { sub(",","",$4); print $4; }' $tmp`
- acodec=`awk '/^ Stream.*: Audio:/ { sub(",","",$4); print $4; }' $tmp`
- duration=`awk '/^ Duration: / { sub(",","",$2); print $2; }' $tmp`
- bitrate=`awk '/^ Duration: / { print $6; }' $tmp`
- size=`ls -l "$2" | awk '{print $5}'`
- echo $vcodec\|$acodec\|$duration\|$bitrate\|$size
- #rm $tmp
- # I've collected ffmpegs from packages
- # and why collect broken links? once theyr proven useful
- #:tmp>:ff
- # ffi ffmpeg ffmpeg.d ffmpeg.i ffmpeg.s ffmpeg.x ffmpeg.x2
- #0:tmp>:ff
- #fi ffmpeg *.AVI
- #mjpeg|pcm_s16le|00:06:36.6|14863|737006768
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement