mencoder video and audio sync problem
i use this code: mencoder tv:// -tv
driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=hw.2:alsa -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o record1.avi
or this code: mencoder tv:// -tv
driver=v4l:width=800:height=600:device=/dev/video0:forceaudio:adevice=hw.2:alsa -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o record1.avi
and it encodes fine but when i play it with mplayer, the video is rushed, it plays super fast while the audio plays normally and is horribly out of sync. video ends way before audio does. what am i doing wrong?
anyone? On Sat, Jan 29, 2011 at 9:27 PM, Claudiu Bucur <h2sammo@gmail.com> wrote:
i use this code:
mencoder tv:// -tv
driver=v4l2:width=640:height=480:device=/dev/video0:forceaudio:adevice=hw.2:alsa -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o record1.avi
or this code:
mencoder tv:// -tv
driver=v4l:width=800:height=600:device=/dev/video0:forceaudio:adevice=hw.2:alsa -ovc lavc -oac mp3lame -lameopts cbr:br=64:mode=3 -o record1.avi
and it encodes fine but when i play it with mplayer, the video is rushed, it plays super fast while the audio plays normally and is horribly out of sync. video ends way before audio does.
what am i doing wrong?
On Sat, Jan 29, 2011 at 21:27:42 -0500, Claudiu Bucur wrote:
and it encodes fine but when i play it with mplayer, the video is rushed, it plays super fast while the audio plays normally and is horribly out of sync. video ends way before audio does.
FPS settings? If in doubt, try setting the correct "fps=" argument for the "-tv" option, and try to add the "-ofps" command line option. You might need both, I don't know. ;-) HTH, Moritz
how do i find out the "correct" fps argument? btw this is encoded from my webcam stream. how would you stream to a file from a webcam? On Mon, Jan 31, 2011 at 5:00 PM, Moritz Barsnick <barsnick@gmx.net> wrote:
On Sat, Jan 29, 2011 at 21:27:42 -0500, Claudiu Bucur wrote:
and it encodes fine but when i play it with mplayer, the video is rushed, it plays super fast while the audio plays normally and is horribly out of sync. video ends way before audio does.
FPS settings? If in doubt, try setting the correct "fps=" argument for the "-tv" option, and try to add the "-ofps" command line option. You might need both, I don't know. ;-)
HTH, Moritz _______________________________________________ MEncoder-users mailing list MEncoder-users@mplayerhq.hu https://lists.mplayerhq.hu/mailman/listinfo/mencoder-users
On Mon, Jan 31, 2011 at 17:15:53 -0500, Claudiu Bucur wrote:
how do i find out the "correct" fps argument?
Good question. I don't really know how to detect what the tuner is currently receiving. But if you're in a PAL region, it's probably safe to add ":fps=25:norm=PAL" to "-tv".
btw this is encoded from my webcam stream. how would you stream to a file from a webcam?
Pretty much the same way, also using "driver=v4l", setting the desired width, height and fps (the combination of which the webcam must support, otherwise is falls back to something else), and omitting nonapplicable stuff like "norm=". Moritz
participants (2)
-
Claudiu Bucur -
Moritz Barsnick