OESF Portables Forum
Everything Else => Sharp Zaurus => Model Specific Forums => Distros, Development, and Model Specific Forums => Archived Forums => Cxx0 General discussions => Topic started by: Rodre on January 08, 2007, 12:39:24 pm
-
Hello,
I have a C760 running Cacko 1.23. I have encoded a DVD using mencoder and various other retail dvd encoders from pinnacle, Intervideo, and 123 Copy DVD. My problem is that when I play the ripped/encoded dvd file on my desktop the audio and video are synced perfectly, but when I play the video on my Z in mplayer the audio is 2-3 seconds faster than the video. What gives? How are others playing video on their Z? I have also encoded a .mpg file shot with my handycam and it does the same thing.
It appears that mplayer has the ability to resync the audio using either the + and - keys or by using a '-delay' switch on startup, but it appears that the mplayer for the Z either doesn't support this or doesn't have the input key mapping file. Does anyone know about this file?
~Rodre
-
AFAIK mplayer has troubles with variable bitrate mp3 audio in libmad decoder. See more details and a link in the first post from this thread: https://www.oesf.org/forums/index.php?showt...ndpost&p=148188 (https://www.oesf.org/forums/index.php?showtopic=22280&view=findpost&p=148188)
You can try encoding constant bitrate audio or use '-ac ffmp3' decoder. Please report if that information helped to resolve your issue.
-
Hi Serge, thanks for your response.
I tried the '-ac ffmp3' flag in kino2's "preferences" (File -> Preferences... -> Options for mplayer) and that didn't work. I am a newbie when it comes to encoding video. Can you tell me what mencoder flags I can use to encode the audio stream with a constant bitrate? I am looking to get the best quality sound and video as file size doesn't matter to me because I have a 4GB SD card.
Also, is there any way to get mplayer to accept the - and + keys so that I could adjust the lag on the fly? The "o" for on screen display works, but not many of the other ones. Thanks.
~Rodre
-
I tried the '-ac ffmp3' flag in kino2's "preferences" (File -> Preferences... -> Options for mplayer) and that didn't work.
Did it refuse to run with this option? Or you still have this audio sync problem? Also please report what version of mplayer are you using.
I am a newbie when it comes to encoding video. Can you tell me what mencoder flags I can use to encode the audio stream with a constant bitrate? I am looking to get the best quality sound and video as file size doesn't matter to me because I have a 4GB SD card.
man mencoder, search for 'lameopts' there.
-
Hi Serge,
It ran but the audio was still faster than the video. mplayer version is:
MPlayer 1.0pre7-3.4.2 for Zaurus 1.1.5
I will check the lameopts for constant bit rate and re-encode and see what happens.
~Rod
-
Well, don't know then, ffmp3 decoder should have correct audio/video sync. This problem could be also audio driver related, but as I don't have zaurus myself, I can't help much here. Anyway, did you try playing this movie using mplayer on desktop pc just to check if this problem is really zaurus specific (and not a result of bad encoding)?
-
Hi Serge,
Yes the file plays fine on my deskyop using mplayer. I am pretty sure that you are on the right track because I re-encoded the file using windows media encoder 9 (blah) and the audio/video rates were synced, but I lost a lot of the video quality. Is there a way I can have my mplayer on zaurus tell me what -ac audio decoders it supports?
~Rodre
-
Well, now I think everything can have quite a simple explanation Your zaurus is just not fast enough to process video and audio in real time. So it is able to process audio, but can't also decode video in time so it lags behind. Did you get error messages from mplayer about your system being too slow to play this video? Adding -framedrop option can help to fix this problem at the cost of dropping some frames, but only if mplayer is still able to decode video in time (without displaying and scaling it).
You can do some benchmarking to get more information about how much cpu is used for decoding video, showing it to screen and audio (see -benchmark option in mplayer man).
-
I Encoded it using these instructions:
https://www.oesf.org/index.php?title=Mencoder_Encoding (https://www.oesf.org/index.php?title=Mencoder_Encoding)
Specifically:
mencoder dvd://1 -srate 24000 -vop scale=320:240 -o office_space.avi -oac mp3lame -lameopts preset=15:mode=3 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=150 -ofps 15 -sws 2
and it does the same thing.
I still have to try and re-encode using CBR. I guess I'll see what happens then.
Thanks for your advice, it still really helped me.
~Rodre
-
I Encoded it using these instructions:
https://www.oesf.org/index.php?title=Mencoder_Encoding (https://www.oesf.org/index.php?title=Mencoder_Encoding)
Specifically:
mencoder dvd://1 -srate 24000 -vop scale=320:240 -o office_space.avi -oac mp3lame -lameopts preset=15:mode=3 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=150 -ofps 15 -sws 2
and it does the same thing.
I still have to try and re-encode using CBR. I guess I'll see what happens then.
Thanks for your advice, it still really helped me.
~Rodre
[div align=\"right\"][a href=\"index.php?act=findpost&pid=150782\"][{POST_SNAPBACK}][/a][/div]
Rodre,
any luck? I've got the exact same issue: audio faster than video (out of sync) issues with my c700.
I've been trying a bunch of different encoding options in ffmpeg and mencoder and haven't quite go t it yet. please let me know if you find the magical encoder combination.
I'll post if I stumble on the answer.
bubox
-
Rodre,
I've got video playing on my c700 with audio and vid in sync. Thanks to Serge for his last post about the cpu not being fast enough. My previous attempt involved finding the perfect codec, but what I really needed to do was crunch the vid down a little more.
Once I cut the fps down to 15 things got better sync-wise. It's still faily viewable. The -b parameter is bitrate, so first try that at 300 or 400 and see if it will work, then work your way down.
Here's what working for my c700:
ffmpeg -i infile.avi -b 200 -s 320x240 -r 15 -vcodec mpeg4 out.avi
add this:
-ss 00:00:00 -t 00:00:30
to encode the first 30 seconds only as a test.
questions:
is mono audio less cpu intensive?
is two-pass encoding more cpu intensive?
I think I can eek out a bit more quality without pushing the cpu with some two-pass encoding. That's next.
regards,
bubox