booljayj
April 25th, 2008, 02:37 AM
I need an easy way to back up dvds to my computer, and in the past I have done so by encoding Xvid/aac stereo in an avi container using mplayer. However, the resulting avi can only be played using mplayer because it is technically an invalid file. I want proper avc/aac mp4 files, and I want to preserve the 5.1 surround sound playback. I have managed to construct these scripting parameters using bits of information from all around:
#VIDEO Section
mencoder $TITLE.vob\
-nosound\
-vf crop=$CROP,dsize=$ASPECT,scale,harddup\
-ovc x264 -x264encopts qp=26:subq=5:frameref=1:bframes=4:b_pyramid:weight _b:pass=1:bitrate=2000:turbo=1\
-ofps 24000/1001 -of rawvideo\
-o /dev/null
mencoder $TITLE.vob\
-nosound\
-vf pp=de,crop=720:480:0:0,dsize=$ASPECT,scale,hqdn3d= 2:1:2,harddup\
-ovc x264 -x264encopts qp=26:subq=6:frameref=3:me=hex:partitions=all:bfra mes=4:b_pyramid:8x8dct:pass=2:bitrate=2000\
-ofps 24000/1001 -of rawvideo\
-o $TITLE.h264
#AUDIO Section
mkfifo audiodump.pcm
faac -q 100 -I 5,6 -P -R 48000 -C 6 -X audiodump.pcm -o $TITLE.mp4 & mplayer $TITLE.vob\
-aid $AID -vc dummy -vo null -ao pcm:nowaveheader -channels 6
rm audiodump.pcm
#MUXING Section
mp4creator -create=$TITLE.h264 -rate=23.976 $TITLE.mp4
The resulting mp4 file is garbage in terms of audio. Playing the resulting movie mp4 results in weird screeches and silences, while the video plays on perfectly. Playing the audio only mp4 file contains the entire movie soundtrack- except that it is like 5 times too fast. A two hour movie worth of audio is contained in a 30-minute file. Plus, it's stereo.
The main concern to me is fixing the audio encoding section. The output currently is a garbage stereo aac file in an mp4 container. I got all my information for the audio conversion from this: http://forum.doom9.org/archive/index.php/t-75222.html
Please, any help whatsoever would be so great. If you know anything about faac or pcm or mplayer at all, your input would be welcome.
#VIDEO Section
mencoder $TITLE.vob\
-nosound\
-vf crop=$CROP,dsize=$ASPECT,scale,harddup\
-ovc x264 -x264encopts qp=26:subq=5:frameref=1:bframes=4:b_pyramid:weight _b:pass=1:bitrate=2000:turbo=1\
-ofps 24000/1001 -of rawvideo\
-o /dev/null
mencoder $TITLE.vob\
-nosound\
-vf pp=de,crop=720:480:0:0,dsize=$ASPECT,scale,hqdn3d= 2:1:2,harddup\
-ovc x264 -x264encopts qp=26:subq=6:frameref=3:me=hex:partitions=all:bfra mes=4:b_pyramid:8x8dct:pass=2:bitrate=2000\
-ofps 24000/1001 -of rawvideo\
-o $TITLE.h264
#AUDIO Section
mkfifo audiodump.pcm
faac -q 100 -I 5,6 -P -R 48000 -C 6 -X audiodump.pcm -o $TITLE.mp4 & mplayer $TITLE.vob\
-aid $AID -vc dummy -vo null -ao pcm:nowaveheader -channels 6
rm audiodump.pcm
#MUXING Section
mp4creator -create=$TITLE.h264 -rate=23.976 $TITLE.mp4
The resulting mp4 file is garbage in terms of audio. Playing the resulting movie mp4 results in weird screeches and silences, while the video plays on perfectly. Playing the audio only mp4 file contains the entire movie soundtrack- except that it is like 5 times too fast. A two hour movie worth of audio is contained in a 30-minute file. Plus, it's stereo.
The main concern to me is fixing the audio encoding section. The output currently is a garbage stereo aac file in an mp4 container. I got all my information for the audio conversion from this: http://forum.doom9.org/archive/index.php/t-75222.html
Please, any help whatsoever would be so great. If you know anything about faac or pcm or mplayer at all, your input would be welcome.