Audio not in "sync" after ripping dvd using acidrip
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Audio not in "sync" after ripping dvd using acidrip
Hi i have been ripping dvds for some time and whenever i play them back in mplayer or a re-encoded version for my mp4, the audio is out of sync, about a second. Any idears how to help this ?? This is one of the commands acid rip was using to encode (wallace and gromit , those of you who live in UK): mencoder dvd://16 -dvd-device /dev/dvd -alang English -info srcform="DVD ripped by acidrip.sf.net" -oac mp3lame -lameopts abr:br=128 -ovc lavc -lavcopts vcodec=mpeg4:vhq:v4mv:vqmin=2:vbitrate=2736 -vf pp=de,scale=800:-2 -o "/home/chris/wallace_and_gromit.avi"
-audio-delay <any floating-point number>
Delays either audio or video by setting a delay field in the header (default: 0.0). This does not delay either stream while encoding, but the player will see the delay field and compensate accordingly. Positive values delay the audio, and negative values delay the video. Note that this is the exact opposite of the -delay option. For example, if a video plays correctly with -delay 0.2, you can fix the video with MEncoder by using -audio-delay -0.2.
Currently, this option only works with the default muxer (-of avi). If you are using a different muxer, then you must use -delay instead.
normalizing the audio might do the trick, but I wouldn't want to do that. It says here there is a an option for input gain (at least for lame), -vol=<0-10>. I just learned about this option now, when I read it on that page, so I can only say it looks promising.
If you use the software mixer in MPlayer, you can increase the maximum volume to any degree you wish.
mplayer -softvol -softvol-max 200 file.avi will make the max volume 200% of normal. The only drawback is less precise volume control, as the volume up/down keys increase or decrease the volume by a percentage of the max volume. Really though, it's not much of a drawback.
Ok well this is what I used I think to convert a dvd or file , to watch on my iriver u10 (a little script I made)
Quote:
#!/bin/bash
#This script will convert video files to work on an iriver u10
#This script was created by kernel_geek
echo "Are you encoding a DVD or file ? [DVD/file]"
read dvd
case "$dvd" in
DVD)
echo "Type the chapter you want to encode [1/2/3..."
read chapter
echo "Where do you want to saye the file ? [/home/fredrick/ferris_bulers_day_off.avi]"
read output
echo "I will now encode the file"
echo "Encoding..."
sleep 1
#Mencoder
mencoder -alang en -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:240 -ffourcc XVID -o $output dvd://$chapter > /dev/null
;;
file)
echo "Please type the location of your input file eg, /home/bob/myvideo.avi"
read input
echo "Please type the name of the output file eg, /home/fred/myu10video.avi"
read output
echo "Encoding..."
sleep 1
#Mencoder stuff
mencoder -alang en -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:240 -ffourcc XVID -o $output $input > /dev/null
;;
*)
echo "type DVD or file"
;;
esac
echo "Encoding completed"
echo "File was saved at $output"
Last edited by kernel_geek; 02-08-2007 at 03:59 PM.
#Script will encode file for iriver u10
#Script created by kernel_geek
echo "*************************************"
echo "*1:Encode a 4:3 dvd for iriver u10 *"
echo "*2:Encode a 16:9 dvd for iriver u10 *"
echo "*3:Encode a 4:3 file for iriver u10 *"
echo "*4:Encode a 16:9 file for iriver u10*"
echo "*************************************"
echo "Type the corospondig number:"
read command
case $command in
1)
echo "Type the dvd device [/dev/hdc]"
read device
echo "Type the chapter [1,2,1-1..."
read chapter
echo "Where would you like to save the file ? [/home/bob/myfile.avi]"
read output
echo "You can specify any extra option here [-alang english, -chapter 1-6...]"
read options
echo "I will encode chapter $chapter of $device to $output"
echo "Is this ok ? [y/n]"
read ok
case $ok in
y)
echo -e "\e[0;33m"
echo "Encoding..."
echo -e "\e[0;0m"
sleep 1
mencoder $options -dvd-device $device -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:240 -ffourcc XVID -o $output dvd://$chapter > ~/.mentemp 2>&1
;;
n)
clear
echo "Exiting"
sleep 1
clear
exit
;;
*)
echo "type y or n"
exit
;;
esac
echo "Encoding completed"
echo "Would you like to see the log ? [y/n]"
read log
case $log in
y)
cat ~/.mentemp
rm ~/.mentemp
;;
n)
rm ~/.mentemp
;;
*)
echo "Response "$log" not understood. Deleting log file"
rm ~/.mentemp
;;
esac
;;
2)
echo "Type the dvd device [/dev/hdc]"
read device
echo "Type the chapter [1,2,1-1..."
read chapter
echo "Where would you like to save the file ? [/home/bob/myfile.avi]"
read output
echo "You can specify any extra option here [-alang english, -chapter 1-6...]"
read options
echo "I will encode chapter $chapter of $device to $output"
echo "Is this ok ? [y/n]"
read ok
case $ok in
y)
echo -e "\e[0;33m"
echo "Encoding..."
echo -e "\e[0;0m"
sleep 1
mencoder $options -dvd-device $device -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:180 -vf-add expand=:240 -ffourcc XVID -o $output dvd://$chapter > ~/.mentemp 2>&1
;;
n)
clear
echo "Exiting"
sleep 1
clear
exit
;;
*)
echo "type y or n"
exit
;;
esac
echo "Encoding completed"
echo "Would you like to see the log ? [y/n]"
read log
case $log in
y)
cat ~/.mentemp
rm ~/.mentemp
;;
n)
rm ~/.mentemp
;;
*)
echo "Response "$log" not understood. Deleting log file"
rm ~/.mentemp
;;
esac
;;
3)
echo "Type the input file [/home/bob/my_video.avi]"
read input
echo "Where would you like to save the file ? [/home/bob/myfile.avi]"
read output
echo "You can specify any extra option here [-alang english, -chapter 1-6...]"
read options
echo "I will encode $input to $output"
echo "Is this ok ? [y/n]"
read ok
case $ok in
y)
echo -e "\e[0;33m"
echo "Encoding..."
echo -e "\e[0;0m"
sleep 1
mencoder $options -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:240 -ffourcc XVID -o $output $input > ~/.mentemp 2>&1
;;
n)
clear
echo "Exiting"
sleep 1
clear
exit
;;
*)
echo "type y or n"
exit
;;
esac
echo "Encoding completed"
echo "Would you like to see the log ? [y/n]"
read log
case $log in
y)
cat ~/.mentemp
rm ~/.mentemp
;;
n)
rm ~/.mentemp
;;
*)
echo "Response "$log" not understood. Deleting log file"
rm ~/.mentemp
;;
esac
;;
4)
echo "Type the input file [/home/bob/my_video.avi]"
read input
echo "Where would you like to save the file ? [/home/bob/myfile.avi]"
read output
echo "You can specify any extra option here [-alang english, -chapter 1-6...]"
read options
echo "I will encode $input to $output"
echo "Is this ok ? [y/n]"
read ok
case $ok in
y)
echo -e "\e[0;33m"
echo "Encoding..."
echo -e "\e[0;0m"
sleep 1
mencoder $options -ofps 15 -ovc lavc -oac mp3lame -lameopts vol=10:cbr:mode=2:br=128 -lavcopts vcodec=mpeg4:mbd=2:cbp:trell:vbitrate=350 -af resample=44100 -srate 44100 -vf scale=320:180 -vf-add expand=:240 -ffourcc XVID -o $output $input > ~/.mentemp 2>&1
;;
n)
clear
echo "Exiting"
sleep 1
clear
exit
;;
*)
echo "type y or n"
exit
;;
esac
echo "Encoding completed"
echo "Would you like to see the log ? [y/n]"
read log
case $log in
y)
cat ~/.mentemp
rm ~/.mentemp
;;
n)
rm ~/.mentemp
;;
*)
echo "Response "$log" not understood. Deleting log file"
rm ~/.mentemp
;;
esac
;;
*)
echo "You must type 1,2,3 or 4"
;;
esac
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.