ffmpeg question

Csaba Molnar csabamolnar at gmail.com
Tue Apr 18 16:07:42 UTC 2006


2006. April 18. 17:58 dátummal R. B. Riddick ezt írta:
> --- Joe Auty <joe at netmusician.org> wrote:
> > Nothing, except the files are very large... Since I plan to record
> > every night, this space consumption will add up quickly.
>
> I personnally use this command (and arguments) to compress my PVR250 movies
>   mencoder -ovc lavc -oac mp3lame -noaspect -lavcopts vbitrate=1111
> -lameopts abr:preset=50 -o $2 $1
>
> $1 denotes the input file or "-" for standard input (e. g. cat /dev/cxm0 |
> mencoder..., but this is a little bit risky, when the mencoder process
> needs more time than the pipe-buffer can compensate; so u should write
> little chunks (4GB or so - est. 1h) to ur harddisc before u compress them)
> $2 denotes the output file
>
I use this to capture. Bitrate is very high of course, but usually I don't 
know if I want to keep the captured programme or not. This produces very good 
quality captures. If the captured programme is a keeper, I use another script 
to reencode it to mpeg4.

#/bin/sh!
echo "Enter time in minutes"
echo "Setting mixer values to: "
mixer =rec line
mixer vol 75
mixer pcm 75
mixer line 00
mixer rec 60
mixer ogain 40
if [ -z "$1" ] || [ -z "$2" ]; then
        echo ""
        echo "usage: tvrec_ffmpeg.sh <time in minutes> <output filename>"
        echo ""
        echo "For example, this will record for 12 minutes, and filename"
        echo "of the captured programme will be test.mpg"
        echo ""
        echo "tvrec_ffmpeg 12 test"
        echo ""
else
        lenght=$(($1 * 60))
        ffmpeg -b 6000 -s 720x540 -bf 2 -vcodec mpeg2video -acodec mp3 -ab 
96 -vd /dev/bktr0 -ad /dev/dsp0.8 -ac 1 -tvstd PAL -f mpeg -r 25 -t 
$lenght "$2".mpg
fi

Recode script:

[molnarcs at mcsaba /usr/home/molnarcs]$ cat /usr/local/bin/recode_tv.sh
#/bin/sh!
if [ -z "$1" ] || [ -z "$2" ]; then
        echo ""
        echo "usage: recode_tv.sh <input filename> <output filename>"
        echo "                          WARNING!"
        echo "<output filename> doesn't need the extension, just the name."
        echo ""
        echo "example: recode_tv.sh input.mpg output"
        echo "will create an output.avi file"
        echo ""
        echo ""
else
        mencoder $1 -oac copy -ovc lavc -lavcopts 
vcodec=mpeg4:vbitrate=704:vratetol=500:v4mv:vhq:keyint=125 -vf 
crop=672:504,pp=lb/dr/hb/vb/tn/al,hqdn3d,scale=384:288 -sws 2 -o $2.avi
fi

This gives me 800 Kbit/s (96 audio + 704 video) and results in a small but 
good quality file. Don't let the low resolution (384x288) mislead you. Try it 
out.


More information about the freebsd-multimedia mailing list