LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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


Reply
  Search this Thread
Old 01-05-2007, 03:51 PM   #1
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Rep: Reputation: 30
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"
 
Old 01-06-2007, 09:05 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
From the man page for mencoder:
Quote:
GENERAL ENCODING OPTIONS (MENCODER ONLY)


-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.
Have you tried this?
 
Old 01-07-2007, 01:53 PM   #3
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
Ok thanks, but how do i work what delay to use ??
 
Old 01-07-2007, 02:04 PM   #4
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
Load your movie into MPlayer and use - and + to adjust.
 
Old 01-07-2007, 02:07 PM   #5
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
What + and - keys ??
 
Old 01-07-2007, 06:25 PM   #6
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
the ones on the keypad... or the 2nd from top row of the keyboard (you have to use shift to get the + though)

maybe try it with constant bitrate audio(? idk just guessing). Not sure why ABR/VBR would start being a problem all of a sudden, but you never know.
 
Old 01-08-2007, 10:31 AM   #7
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
Ok i will try thanks. Also i noticed that the new encoded version is realy quiet how can i solve this (ie what option in mencoder do i use ??
 
Old 01-09-2007, 06:32 AM   #8
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
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.

have a look through the MPlayer/Mencoder manual for more options.
 
Old 01-11-2007, 02:56 AM   #9
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
Yeah that sound prommosing, Its just that my iriver dosent use mplayer . I will try the encoding method.
 
Old 02-08-2007, 04:03 AM   #10
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
Thanks, the vol option worked, and I used diffrent encoding optons to get it in sync, many thanks.
 
Old 02-08-2007, 05:28 AM   #11
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I used diffrent encoding optons to get it in sync
It would be useful to tell us what those options were!
 
Old 02-08-2007, 05:59 AM   #12
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
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.
 
Old 02-08-2007, 12:01 PM   #13
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Thank you!
 
Old 03-03-2007, 03:18 AM   #14
kernel_geek
Member
 
Registered: Jan 2007
Location: UK
Distribution: Ubuntu/Arch
Posts: 161

Original Poster
Rep: Reputation: 30
I have improved the script loads:



Code:
#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
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
k3b: "error decoding audio tracks" and "could not unlock cd driver" lefty.crupps Linux - Software 7 10-13-2005 11:29 AM
Automatic "hands free" ripping?? alan_h404 Linux - Software 4 04-13-2005 11:12 AM
K audio creator + "lame" ripping jimjamjahaa Linux - Newbie 2 03-05-2005 11:03 AM
Ripping "protected" CD's r_jensen11 Linux - Software 0 02-20-2004 08:15 PM
Divx Ripping: "MP3 Support" in MPlayer error from AcidRip The_fuzzy_cow Linux - Software 6 12-16-2003 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration