[MPlayer-users] A-V sync with mencoder/mplayer
"Ing. Daniel Rozsnyó"
daniel at rozsnyo.com
Thu Dec 10 21:05:14 CET 2009
Hi Ken,
If it helps, here is my VHS->NETWORK script. You can see that it makes
an 10mbit MPEG2 + 320kbit mp3 tracks (which are intended as a temporary
high quality dump), and then offers it as http streaming.
--------------
#!/bin/sh
vlc v4l2:///dev/video0:width=720:height=576:standard=PAL:input=1:fps=25 \
-v \
--intf dummy \
--sout
'#transcode{vcodec=mp2v,vb=10000,acodec=mp3,ab=320}:std{access=http,mux=ts,dst=0.0.0.0:8888}'
--------------
The recording is just a plain:
mplayer -cache 32 -dumpstream -dumpfile 'vhs.ts' 'http://videopc:8888'
--------------
The tapes I captured have a/v sync, and can be played back, but I had
problem re-encoding them to more suitable and compact form (h264) -
again the problem with dropped frames. Please let me know what command
you use to recode the TS to something different and if you get the sync
correctly.
When that is solved, you can try to apply filters. Basically you can
use downsampling to 50% in horizontal direction - see the specification
for SVCD - it has non-square pixels and the resolution is "narrow". With
correct aspect ratio setting you can get back you source image, but
using only 50% of storage. Also try to use some filters to reduce
grain/noise - it helps to compress better.
Daniel
Ken Bass wrote:
> Daniel,
>
> Thank you very much for explaining WHY I was getting the sync problem.
> Things make much more sense to me now. These tapes are 25+ years old, and
> the player is at least 15, without being tuned up for many years. Too bad
> nobody else could give me that answer (and I have posted on MANY different
> lists/sites for a long time).
>
> I did try mplayer -dumpstream, but I kept getting a core dump, and nothing
> in any log (any that I know of).
>
> With VLC, I do get A-V in sync, but I can't get the video resolution and
> quality that I got with mencoder. That was mainly (I believe) from the "-tv"
> options "mjpeg" and "decimation", which did the mjpeg compression on the
> card's hardware, and also gave a 704x480 screen. When I watch the VLC
> captured video in full screen (especially with a good video card and nice
> monitor) I see some pixelation (with VLC) that I didn't with mencoder.
>
> I do get a lot of XRuns, though with VLC. Any ideas?
>
> But, at least it is capturing in sync now :-).
>
> If you have any suggestions for re-processing the captured video (via
> mencoder perhaps) to improve the VHS image/sound, I would love to know.
>
> Thanks again.
>
> ken
>
> 2009/12/9 "Ing. Daniel Rozsnyó" <daniel at rozsnyo.com>
>
>> Hi,
>>
>> Ken Bass wrote:
>>> Hi all, newbie here - so please bear with me :-)
>>>
>>> In short, I am trying to capture video from vhs, via a tv capture card.
>> But
>>> the A-V is out of sync - audio lags video. Actually, it becomes
>>> progresssively worse as the recording goes on.
>> I've tried the same thing - recording from VHS. The problem is that
>> with a bad vhs tape (or a slow motor) you get rather a variable frame
>> rate video than an exact 25 (or 30) fps one.
>>
>> I've solved this by running VLC as a capture and encoding to mpeg2 ts
>> and using mplayer -dumpstream to record the stream. Both on different
>> computers, to avoid problems with disk buffers, etc..
>>
>> With mplayer I can not get recorded analog television either, and the
>> signal was better than on vhs.
>>
>> Daniel
>>
>> But no luck.
>>> I have been fighting with this for a long time. So any help/pointers will
>> be
>>> greatly appreciated.
>>>
>>> TIA
>>>
>>> ken
>>> _______________________________________________
>>> MPlayer-users mailing list
>>> MPlayer-users at mplayerhq.hu
>>> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>> _______________________________________________
>> MPlayer-users mailing list
>> MPlayer-users at mplayerhq.hu
>> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
>>
> _______________________________________________
> MPlayer-users mailing list
> MPlayer-users at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
More information about the MPlayer-users
mailing list