Dear visitor, welcome to VDR Portal. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.
|
|
Source code |
1 2 3 4 5 6 7 8 9 10 |
#!/bin/bash
umask 077
tmpdir=${TMPDIR-/tmp}/externremux-${RANDOM:-$$}
FIFO=$tmpdir/out.avi
OUTLOG=$tmpdir/out.log
mkdir -p $tmpdir || exit 1
mkfifo $FIFO
(cat $FIFO; rm -rf $tmpdir) &
# mencoder <OPTIONEN> -o $FIFO -- - &>$OUTLOG
mencoder -vf harddup,softskip,scale -zoom -xy 320 -oac mp3lame -lameopts br=16:q=5:mode=3 -ovc x264 -x264encopts bitrate=200:vbv_maxrate=250:vbv_bufsize=300:log=0 -o $FIFO -- - &>$OUTLOG
|
This post has been edited 3 times, last edit by "vel_tins" (Sep 7th 2009, 4:50pm)
Location: Magdeburg/Wolfsburg
Occupation: Dipl.-Wirtsch.Inf, Spez. Data-Warehousing - Business Intelligence
Homepage

|
|
Source code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
#!/bin/bash
#
# externremux.sh
# CONFIG START
TMP=/tmp/externremux-${RANDOM:-$$}
STREAMQUALITY="H264_200_25"
# CONFIG END
mkdir -p $TMP
mkfifo $TMP/out.avi
(trap "fuser -k $TMP/out.avi; rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &
#(trap "rm -rf $TMP" EXIT HUP INT TERM ABRT; cat $TMP/out.avi) &
case ${1:-$STREAMQUALITY} in
"H264_200_15") exec mencoder -ovc x264 -srate 22050 -ofps 15 -x264encopts bitrate=200:vbv_maxrate=250:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_150_25") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=150:vbv_maxrate=180:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_200_25") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=200:vbv_maxrate=250:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_250_25") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=250:vbv_maxrate=280:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_400_25") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=400:vbv_maxrate=450:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_500_25") exec mencoder -ovc x264 -srate 44100 -x264encopts bitrate=500:vbv_maxrate=550:vbv_bufsize=600:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_600_25") exec mencoder -ovc x264 -srate 44100 -x264encopts bitrate=600:vbv_maxrate=650:vbv_bufsize=600:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 480 -o $TMP/out.avi -- - &>$TMP/out.log ;;
"H264_800_25") exec mencoder -ovc x264 -srate 22050 -x264encopts bitrate=800:vbv_maxrate=850:vbv_bufsize=300:ratetol=0.1:threads=3 -oac mp3lame -lameopts cbr:br=16:q=2:mode=3 -vf pp=ci,scale -zoom -xy 320 -o $TMP/out.avi -- - &>$TMP/out.log ;;
*) touch $TMP/out.avi ;;
esac
|
This post has been edited 1 times, last edit by "vel_tins" (Feb 19th 2010, 12:18pm)