View previous topic :: View next topic |
Author |
Message |
nickel Apprentice
Joined: 21 Oct 2005 Posts: 192 Location: Germany
|
Posted: Tue Aug 15, 2006 2:56 pm Post subject: problem with a/v sync using mplayer |
|
|
Hi!
I encoded a movie (dvd) with mencoder using the codec x264. Great quality!
It`s in german. And i wanted a english sound, so i dumped the audio using:
# mplayer -dvd-device pathtodvd dvd://1 -alang en -vf null -vo null -ao pcm:fast:file=en.wav //the dvd is in the harddrive
then i converted the large en.wav into en.mp3:
# lame --abr 112 --scale 8 -b 112 -h en.wav en.mp3 //i'm almost thef
So, i played then the movie with mplayer:
# mplayer -vo gl -audiofile en.mp3 movie.avi //xv doesnt work. I have to check the xorg.conf
and the a/v sync is a mess! At the beginning is little and at end is worse! I tried audio delay during playback, and no matter how many times i try, it doesnt synchronise.
I tried encoding the same movie in english and dumping the audio stream directly from the encoded movie, which has no a/v sync problems at all, and still doesnt work!
# mplayer movieen.avi -dumpaudio -dumpfile en.mp2 //or .ac3 or whatever!
I tried everything: encoding using lavc and xvid (in windows using dvdx) and same results.
I tried autosync 0,1,...255, bps, nobps.
Pls, help me
P.s. when i tried to encode using mc 0 or/and -noskip, the sound in the movie is desynchronized! |
|
Back to top |
|
|
repolho n00b
Joined: 30 Jun 2006 Posts: 26
|
Posted: Tue Aug 15, 2006 4:54 pm Post subject: |
|
|
Maybe your output is in a different framerate than the dvd?
Verify that and if that's the case, you can try to encode with -fps (input framerate, in case mplayer got it wrong) and -ofps (output framerate). |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Tue Aug 15, 2006 11:01 pm Post subject: |
|
|
Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Fri Aug 25, 2006 7:00 pm Post subject: |
|
|
beandog wrote: | Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? | wouldn't this be a problem if I want to use the mkvmerge to use the MKV container? I have a feeling that what repolho said is probably what is happening. OP could try -pulldown for video step if it is found that material is variable frame rate. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Fri Aug 25, 2006 7:03 pm Post subject: |
|
|
devsk wrote: | beandog wrote: | Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? | wouldn't this be a problem if I want to use the mkvmerge to use the MKV container? |
not at all. You can *optionally* merge them seperately, but you don't have to.
Code: | mkvmerge foo.avi -o foo.mkv |
_________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 3003 Location: Bay Area, CA
|
Posted: Fri Aug 25, 2006 7:30 pm Post subject: |
|
|
beandog wrote: | devsk wrote: | beandog wrote: | Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? | wouldn't this be a problem if I want to use the mkvmerge to use the MKV container? |
not at all. You can *optionally* merge them seperately, but you don't have to.
Code: | mkvmerge foo.avi -o foo.mkv |
| You mean I can take an existing, well synced avi container file and put it in MKV container with added chaptors and subtitles? That's neat... |
|
Back to top |
|
|
nickel Apprentice
Joined: 21 Oct 2005 Posts: 192 Location: Germany
|
Posted: Thu Aug 31, 2006 12:59 pm Post subject: |
|
|
sorry, i didnt respond in a long time. I didnt have an internet connection.
I tried with -fps in mplayer, and it didnt work. I've googled a little, didnt find much, but i think the problem is the dumpaudio, so perhaps with mencoder and -ofps will work.
I live in germany, so all the movies are pal.
beandog wrote: | Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? |
I'm sorry, i think, you havent understand me or i dont understand your question. I want to have a second language and so far i know, you cant mux 2 audiostreams in an avi using mencoder.
I've watched once a movie in german and then used -audiofile en.mp3 and it worked flawless! Of course, i didnt encode nor the audiostreams or the video, so i dont know how was it done, but i know it works. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Thu Aug 31, 2006 7:01 pm Post subject: |
|
|
nickel wrote: |
beandog wrote: | Also, why are you dumping the audio and doing it seperately? Why not just mencoder to do them both? |
I'm sorry, i think, you havent understand me or i dont understand your question. I want to have a second language and so far i know, you cant mux 2 audiostreams in an avi using mencoder. |
Right. You can't in AVI. You can in Matroska (MKV). That's why we were bringing that up.
Then you wouldnt have to have separate audio files just to listen to different languages. You could mux them all into the same file.
Code: | mkvmerge english.mp3 german.mp3 italian.mp3 video.avi -o movie.mkv |
_________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
nickel Apprentice
Joined: 21 Oct 2005 Posts: 192 Location: Germany
|
Posted: Mon Sep 04, 2006 1:36 pm Post subject: |
|
|
thanks beandog!
the sound tracks merged into mkv works perfecly!
Ive a question, though:
How can i merge vobsub into mkv? I googled a bit, and found that is doable, but i cant find a howto! With mkvmerge works only srt subs.
and another (hehe):
to process movies with the h264, should i installed another programm or is there a way to merge it? it comes a error message, saying that matroska doesnt support h264. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Mon Sep 04, 2006 4:20 pm Post subject: |
|
|
nickel wrote: | thanks beandog!
the sound tracks merged into mkv works perfecly!
Ive a question, though:
How can i merge vobsub into mkv? I googled a bit, and found that is doable, but i cant find a howto! With mkvmerge works only srt subs.
and another (hehe):
to process movies with the h264, should i installed another programm or is there a way to merge it? it comes a error message, saying that matroska doesnt support h264. |
Im actually not sure how to do subtitles with Matroska (vobsub or srt) since I've never had much luck with them anyway.
As far as h264, try the latest versions of libebml, libmatroska and mkvtoolnix. That may help. I think all but one of the packages are the latest releases anyway. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
|