[MPlayer-users] Digitizing VHS tapes with mencoder
Miroslav Rovis
m.rovis at inet.hr
Fri Apr 16 03:35:06 CEST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello Marton and other who participated in this thread
I'd like to just add a note to this old thread, which I haven't had time
to follow in the recommendation 10 lines below until today:
> > mencoder tv:// -tv
> > driver=v4l2:input=1:width=768:height=576:outfmt=yuy2:norm=pal:buffersize=100:forceaudio:alsa:adevice=hw.0,0,0:amode=1:immediatemode=0 \
> > -oac copy -ovc copy -of avi -ofps 25 -o video.avi
No, not that really. That, on my card: Hauppauge HVR-4000, produces 1GB
per minute file... My solution, for my hardware, is different. Read on.
> > But this complains really often about duplicated frames and dropped frames.
> > I am somewhat concerned about those error messages. Will this have a big
> > impact on recording quality?
> Yes, because you will pointlessly get duplicate frames and skipped frames.
> Redefine MAX_SKEW_DELTA in stream/tvi_v4l2.c to 0.02 and recompile
mencoder. That fixed the problem for me.
> Regards,
> Marton
I participated in the thread on VHS digitizing under different subjects,
e.g. "composite input a/v sync issue":
http://lists.mplayerhq.hu/pipermail/mplayer-users/2009-November/078110.html
and other places on this list.. Not searching now, I'm finally done with
this myself, thanks to redifining
MAX_SKEW_DELTA in stream/tvi_v4l2.c to 0.02
I only wanted to ask Marton where was he to tell me that back in 2009
when I asked about duplicate frames, and worse, the lost, badly lost sync...
I'm only joking, how could you guys have known that a few other poor
guys didn't know what you knew and what would save them from despair...
:-) LOL.
I'll post here my know-how after several days of capturing VHS tapes on
the Composite input of Hauppauge HVR-4000 in different periods during
last few months.
For the benefit of those who might need it, including myself if I will
not be at home but say in a cyber cafe and discussing things on this
issue some day in the future...
The profile that works just great after that MAX_SKEW_DELTA fix above:
# cat ~/.mplayer/mencoder
[mpeg4_capt]
profile-desc="mpeg4 capture"
tv=input=1:driver=v4l2:device=/dev/video0:normid=3:input=1:alsa=1:adevice=hw.0:audiorate=48000:amode=1:width=768:height=576
ovc=lavc=1
lavcopts=vcodec=mpeg4:autoaspect=1:vqscale=4:vb_strategy=1:vmax_b_frames=2:mbd=0:turbo=1
vf=softskip,harddup
mc=0
[mpeg4_capt_MP3]
profile=mpeg4_capt
oac=mp3lame=1
lameopts=cbr=1:preset=standard
So the command I need to issue is:
# mencoder tv:// -profile mpeg4_capt -profile mpeg4_capt_MP3 -o
Compo_`date +%Y%m%d_%H%M`.avi
That command started tonight writing the file: Compo_20100416_0251.avi.
See below the important final step.
And that is not 1GB per minute file, but much leaner and meaner, and no
noticeable loss of quality, of some 20MB per minute.
And here is the important thing to do *before* hitting Ctrl-C to kill
mencoder capture (say when the tape is over):
In another console do:
# mencoder -forceidx -ovc copy -oac copy Compo_20100416_0251.avi -o
Compo_20100416_0251_IDX.avi
So The mencoder command that does the capturing wrote
Compo_20100416_0251.avi, but before it finished writing it, I reindexed
it, or, if it was a larger file, started reindexing it and killed the
mencoder capturing process. Seems to work fine even on large files, I
believe but cannot try tonight, even on a whole 3 hrs VHS capture files
(that would be 180GB by the method on top, right? And 50 or so times
less (say 10GB) with mpeg4 profile line that I use...
Run both files with mplayer, and you'll see why reindexing.
Compo_20100416_0251.avi will be out of sync, and
Compo_20100416_0251_IDX.avi will be synced just fine...
- ----------------------------------------------------------------------
A note for Gentoo users on how to recompile mplayer to rid of those
duplicate/skipped frames that would give jerky movements on the captured
file...
It is fine to start by issuing:
emerge -av mplayer
But when it says source unpacked in
/var/tmp/portage/media-video/mplayer-1.0_rc4_p20091026-r1/work
hit Ctrl-Z.
Needs to be done timely.
Then open
/var/tmp/portage/media-video/mplayer-1.0_rc4_p20091026-r1/work/mplayer-1.0_rc4_p20091026/stream/tvi_v4l2.c
in vi or emacs and find the line:
#define MAX_SKEW_DELTA 0.6
Change it so it reads:
#define MAX_SKEW_DELTA 0.02
And now go back to where mplayer is about to be compiled (emerged).
Issue:
# fg
and once it compiles you should get mplayer install that is superbly fit
for VHS capturing along with any other purpose you use it for... Thanks
tou good Hungarian guys who launched this great program into the best
thing on the internet, and that is the Linux world.
www.CroatiaFidelis.hr
www.exDeo.com
www.vankina2-10.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkvHvscACgkQ5NaGZVDan0r5vgCcD1LKXVE0t0aGZdKeimPDFt85
wZUAoJQu8hM11LdpQaMfU/JTEFF9bmZ+
=HdpO
-----END PGP SIGNATURE-----
More information about the MPlayer-users
mailing list