[Mplayer-felhasznalok] darabolas

lo szerafin loszerafin at freemail.hu
Tue Dec 16 18:46:54 CET 2003


batyu at vehok.vein.hu írta:
> neked az a celod, h pl tv-rol 650 megas avikat csinalj
szepen sorban, akkor nem

Ha érdekel olyan megoldás, ami percre működik, akkor az
alábbi script
60 perces darabokra vágva vesz fel a tv-ből:

-----------------------------------------------------------------------------
#!/bin/bash
/usr/bin/aumix -L -f /home/peter/.aumixrc_tvrec > /dev/null

channel=$1
minutes=$2
name=$3 # ! dont use suffix ! Default is .avi
pth=/download/tv
if [ "$name" == "" ]; then
fn=$pth/`date +%S%M%H-%y%m%d`
else
fn=$pth/$name
fi;

# if the record takes more then 150 minutes, we cut it 1
hour parts

if [ $minutes -gt 150 ]; then
    let "endpos = 60 * 60";                     # 1 hour in secs
    let "hours = (( $minutes + 59 ) / 60)";     # how many hours
    part=-1;    # minus is only for the '-' sign between the
name and partnum
else
    let "endpos = 60 * $minutes";
    hours=1;
    part='';
fi;

h=1;
while [ $h -le $hours ]; do
/usr/local/bin/mencoder tv://$channel \
 -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=800\
 -oac mp3lame \
 -endpos $endpos\
 -o ${fn}${part}.avi
 let "part = $part - 1"
 let "h = $h + 1"
done
-------------------------------------------------------------------------


El kell menteni pl. rectv neven, es igy kell meghivni:
rectv 1 170 filmneve
Ekkor az 1-es csatornarol 170 percet vesz fel filmneve-1.avi
és filmneve-2.avi  néven.

Lószerafin





More information about the MPlayer-felhasznalok mailing list