Hi. I want to set VDR to encode edited streams into .avi or .mpeg.
Can someone recommend an encoding type and method?
I have used mplayer's mencode, but never found a good setting for video and audio streams which plays well under WMP.
For good file size and quality (for about 700MB per hour) what should I use?
mp3 audio? or just pcm? divx?
Thanks
Simon
On Mon, May 30, 2005 at 10:43:57AM +0100, Simon Baxter wrote:
Hi. I want to set VDR to encode edited streams into .avi or .mpeg.
Can someone recommend an encoding type and method?
I would strongly advice to try mencoder with something like :
#!/bin/bash Q=800 q=96 MENCODER="nice -n 19 mencoder"
if [ $# == 0 ]; then echo "usage: $0 source" exit fi if [ $# == 1 ]; then mplayer -xineramascreen 1 -vo x11 -vf cropdetect $1 echo "usage: add w:h:x:y for cropping and 4/3 or 16/9" exit fi if [ $# == 2 ]; then echo "usage: one should have added w:h:x:y for cropping and 4/3 or 16/9..." exit fi if [ $# == 3 ]; then w=`echo $2|awk -F ":" '{ print $1 }'` h=`echo $2|awk -F ":" '{ print $2 }'` calcbpp.pl "$w""x""$h" $3 $Q 25 echo "usage: add x:y for scaling or -1:-1 for not scaling" exit fi if [ $# == 4 ]; then mplayer -xineramascreen 1 -vo x11 -vf crop=$2,scale=$4 $1 echo "usage: add file name destination" exit fi if [ $# == 5 ]; then rm -f frameno.avi divx2pass.log $MENCODER -ovc frameno -o frameno.avi -oac faac -faacopts br=$q $1 if [ $4 == "-1:-1" ]; then $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=1 -o /dev/null $1 $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=2 -o /dev/null $1 $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=3 -o $5 $1 else $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=1 -o /dev/null $1 $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=2 -o /dev/null $1 $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=3 -o $5 $1 fi fi txt=`dirname $1`/`basename $1 .mpg`.txt if [ -e $txt ];then mv $txt `dirname $5`/`basename $5 .avi`.txt fi rm -f frameno.avi divx2pass.log
AUDIO=`mplayer -identify -vo null -ao null -frames 0 $1 2>/dev/null|grep ID_AUDIO_ID=1` if [ ! -z $AUDIO ]; then $MENCODER -aid 1 -ovc frameno -o frameno.avi -oac mp3lame -lameopts cbr:br=$q $1 nice -n 19 ogmmerge -o `dirname $1`/`basename $5 .avi`.ogm $5 -D frameno.avi if [-e `dirname $5`/`basename $5 .avi`.txt ];then mv `dirname $5`/`basename $5 .avi`.txt `dirname $1`/ fi echo rm $1 $5 else echo rm $1 fi
I have used mplayer's mencode, but never found a good setting for video and audio streams which plays well under WMP.
Well, no idea what WMP is, so...
For good file size and quality (for about 700MB per hour) what should I use?
mp3 audio? or just pcm? divx?
Bouah... no : aac for audio... and x264 for video :-)
I have used mplayer's mencode, but never found a good setting for video and audio streams which plays well under WMP.
Well, no idea what WMP is, so...
Windows Media Player
For good file size and quality (for about 700MB per hour) what should I use?
mp3 audio? or just pcm? divx?
Bouah... no : aac for audio... and x264 for video :-)
Grégoire Favre
Thanks heaps Grégoire. I gather the you call that bash script from VDR directly? Where do you call it from??
Incidentally, I found the following link which explains mencode quite well : http://www.bunkus.org/dvdripping4linux/en/separate/transcoding.html
Windows Media Player
Oh... I don't have windows here...
When I get my TV-out working on the Linux cube, neither will I !!
Thanks heaps Grégoire. I gather the you call that bash script from VDR directly? Where do you call it from??
No, from a shell :-)
fair enough. It'd be nice to call it directly from the OSD, once a %cut is complete.
Grégoire Favre wrote:
$MENCODER -aid 1 -ovc frameno -o frameno.avi -oac mp3lame -lameopts cbr:br=$q $1
^^^
Bouah... no : aac for audio... and x264 for video :-)
Never used them. What's aac anyway, your script appears to use mp3?
What's the quality (with the same bitrate, of course) of x264 when compared to xvid/mpeg4?
Anssi Hannula wrote:
Grégoire Favre wrote:
$MENCODER -aid 1 -ovc frameno -o frameno.avi -oac mp3lame
-lameopts cbr:br=$q $1
^^^
Bouah... no : aac for audio... and x264 for video :-)
Never used them. What's aac anyway, your script appears to use mp3?
What's the quality (with the same bitrate, of course) of x264 when compared to xvid/mpeg4?
Some info about H264
MPEG-4 AVC/H.264 on Hardware - HD-DVD/Blu-ray
Two organisations (the DVD Forum and the Blu-ray Disc Association) are currently working on the successor of the popular DVD format, which will support so called High Definition content (larger picture sizes than current DVD): HD-DVD and BD-ROM
As reported here the DVD Forum already made the decision that MPEG-4 AVC/H.264 will be used as mandatory video codec for HD-DVD Also the Blu-ray Disc Association has announced the inclusion of MPEG-4 AVC/H.264 as can be read here
It is therefore very likely that AVC/H.264 will be THE upcoming video format, which will be widely used and supported, like it is the case with MPEG-2 (used in DVD) today
http://forum.doom9.org/showpost.php?p=461589&postcount=5 http://forum.doom9.org/showthread.php?s=&threadid=73022#post461589
-josk
ps. I downloaded couple H264 samples and quality was amazing!
I'm having some problems getting this script worked out. I still don't have 'faac' support, 'mplayer compiled without libmp3lame support, and 'x264encopts is not an MEncoder option'.
What syntax do you use?
./script.sh input.file ?? ?? output.file
Sorry - I've been trying, but am still away off getting encoding working!!
Thanks
----- Original Message ----- From: "Grégoire Favre" gregoire.favre@gmail.com To: "Klaus Schmidinger's VDR" vdr@linuxtv.org Sent: Monday, May 30, 2005 3:52 PM Subject: Re: [vdr] encoding streams
On Mon, May 30, 2005 at 10:43:57AM +0100, Simon Baxter wrote:
Hi. I want to set VDR to encode edited streams into .avi or .mpeg.
Can someone recommend an encoding type and method?
I would strongly advice to try mencoder with something like :
#!/bin/bash Q=800 q=96 MENCODER="nice -n 19 mencoder"
if [ $# == 0 ]; then echo "usage: $0 source" exit fi if [ $# == 1 ]; then mplayer -xineramascreen 1 -vo x11 -vf cropdetect $1 echo "usage: add w:h:x:y for cropping and 4/3 or 16/9" exit fi if [ $# == 2 ]; then echo "usage: one should have added w:h:x:y for cropping and 4/3 or 16/9..." exit fi if [ $# == 3 ]; then w=`echo $2|awk -F ":" '{ print $1 }'` h=`echo $2|awk -F ":" '{ print $2 }'` calcbpp.pl "$w""x""$h" $3 $Q 25 echo "usage: add x:y for scaling or -1:-1 for not scaling" exit fi if [ $# == 4 ]; then mplayer -xineramascreen 1 -vo x11 -vf crop=$2,scale=$4 $1 echo "usage: add file name destination" exit fi if [ $# == 5 ]; then rm -f frameno.avi divx2pass.log $MENCODER -ovc frameno -o frameno.avi -oac faac -faacopts br=$q $1 if [ $4 == "-1:-1" ]; then $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=1 -o /dev/null $1 $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=2 -o /dev/null $1 $MENCODER -vf crop=$2 -oac copy -ovc x264 -x264encopts bitrate=$Q:pass=3 -o $5 $1 else $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=1 -o /dev/null $1 $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=2 -o /dev/null $1 $MENCODER -vf crop=$2,scale=$4 -ovc x264 -x264encopts bitrate=$Q:pass=3 -o $5 $1 fi fi txt=`dirname $1`/`basename $1 .mpg`.txt if [ -e $txt ];then mv $txt `dirname $5`/`basename $5 .avi`.txt fi rm -f frameno.avi divx2pass.log
AUDIO=`mplayer -identify -vo null -ao null -frames 0 $1 2>/dev/null|grep ID_AUDIO_ID=1` if [ ! -z $AUDIO ]; then $MENCODER -aid 1 -ovc frameno -o frameno.avi -oac mp3lame -lameopts cbr:br=$q $1 nice -n 19 ogmmerge -o `dirname $1`/`basename $5 .avi`.ogm $5 -D frameno.avi if [-e `dirname $5`/`basename $5 .avi`.txt ];then mv `dirname $5`/`basename $5 .avi`.txt `dirname $1`/ fi echo rm $1 $5 else echo rm $1 fi
I have used mplayer's mencode, but never found a good setting for video and audio streams which plays well under WMP.
Well, no idea what WMP is, so...
For good file size and quality (for about 700MB per hour) what should I use?
mp3 audio? or just pcm? divx?
Bouah... no : aac for audio... and x264 for video :-)
Grégoire Favre
vdr mailing list vdr@linuxtv.org http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr
-- No virus found in this incoming message. Checked by AVG Anti-Virus. Version: 7.0.322 / Virus Database: 267.2.0 - Release Date: 27/05/2005