Discussion:
[MPlayer-users] A-V sync with mencoder/mplayer
Ken Bass
2009-12-09 23:14:51 UTC
Permalink
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.

The details:

PC: dual Xeon 3Ghz (that's 4 CPUs), with 2G memory.
Fedora 11, with stock apps, codecs, etc (from repos - no rebuilds).
kernel 2.6.30-9-96
Pinnacle PCTV HD800i w/ Conexant cx23880 chipset.
driver loaded: cx8800
Sound Card: SB Live (EMU10K1) - driver snd_emu10k1

I have tried both ALSA and OSS. ALSA seems to work the best, but I keep
getting XRUNS.

Also, if I just capture raw audio/video, then I also get better sync (almost
perfect). But my i/o and disk drives can't seem to handle that much of a
stream before the video buffer fills up and audio frames start dropping.

Since I am using V4L2 to access the capture card, I am using this tv option
to mencoder:

-tv "input=1:alsa:adevice=hw.1,0:amode=1:immediatemode=0:mjpeg:decimation=1"

For OSS, I remove 'alsa', and change the adevice to '/dev/dsp1'.

The entire mencoder line (for raw dump) is:

mencoder -tv "{options above}" -oac copy -ovc copy -vf harddup -idx -noskip
-mc 0 -ni -o ofile.avi tv://

I have tried using mp3lame and lavc for audio encoders, and lavc for video,
but that just seems to make the de-syncing to happen faster.

Here is the output of mencoder when I run it:

[***@Bugs root]$ mencoder -tv
"input=1:alsa:adevice=hw.1,0:amode=1:immediatemode=0:mjpeg:decimation=1"
-oac copy -ovc copy -vf harddup -noskip -idx -ni -mc 0 -o
/xfs/vhs-raw-test.avi tv://

MEncoder SVN-r29701-4.4.1 (C) 2000-2009 MPlayer Team
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <***@zpr.uni-koeln.de>
comment: first try, more to come ;-)
Selected device: Pinnacle PCTV HD 800i
Tuner cap:
Tuner rxs:
Capabilites: video capture VBI capture device tuner read/write
streaming
supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG; 4 =
PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10 =
SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L;
inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
Current input: 1
Current format: BGR24
v4l2: current audio mode is : STEREO
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
MJP: width 704 height 576
[V] filefmt:9 fourcc:0x59565955 size:704x480 fps:29.970 ftime:=0.0334
videocodec: framecopy (704x480 24bpp fourcc=59565955)
audiocodec: framecopy (format=1 chans=2 rate=48000 bits=16 B/s=192000
sample-4)
Forcing audio preload to 0, max pts correction to 0.
Writing header...1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing index... 46f ( 0%) 22.19fps Trem: 0min 0mb A-V:0.000
[162039:1536]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
. . . . . . . . . . (snip out alot of the following repeated lines) . . . .
. .

video buffer full - dropping frame

too bad - dropping audio frame !

too bad - dropping audio frame !

too bad - dropping audio frame !

too bad - dropping audio frame !
Pos: 109.5s 3281f ( 0%) 23.37fps Trem: 0min 0mb A-V:0.000
[162039:1536]
too bad - dropping audio frame !
Writing index...3436f ( 0%) 23.83fps Trem: 0min 0mb A-V:0.000
[162039:1536]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.

Video stream: 162039.560 kbit/s (20254945 B/s) size: 2322186240 bytes
114.648 secs 3436 frames

Audio stream: 1536.000 kbit/s (192000 B/s) size: 22080000 bytes 115.000
secs
v4l2: 4295 frames successfully processed, 29 frames dropped.

I have tried many permutations of alsa vs oss, different output coders, etc.
But no luck.

I have been fighting with this for a long time. So any help/pointers will be
greatly appreciated.

TIA

ken
Ing. Daniel Rozsnyó
2009-12-10 07:31:27 UTC
Permalink
Hi,
Post by Ken Bass
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
Post by Ken Bass
PC: dual Xeon 3Ghz (that's 4 CPUs), with 2G memory.
Fedora 11, with stock apps, codecs, etc (from repos - no rebuilds).
kernel 2.6.30-9-96
Pinnacle PCTV HD800i w/ Conexant cx23880 chipset.
driver loaded: cx8800
Sound Card: SB Live (EMU10K1) - driver snd_emu10k1
I have tried both ALSA and OSS. ALSA seems to work the best, but I keep
getting XRUNS.
Also, if I just capture raw audio/video, then I also get better sync (almost
perfect). But my i/o and disk drives can't seem to handle that much of a
stream before the video buffer fills up and audio frames start dropping.
Since I am using V4L2 to access the capture card, I am using this tv option
-tv "input=1:alsa:adevice=hw.1,0:amode=1:immediatemode=0:mjpeg:decimation=1"
For OSS, I remove 'alsa', and change the adevice to '/dev/dsp1'.
mencoder -tv "{options above}" -oac copy -ovc copy -vf harddup -idx -noskip
-mc 0 -ni -o ofile.avi tv://
I have tried using mp3lame and lavc for audio encoders, and lavc for video,
but that just seems to make the de-syncing to happen faster.
"input=1:alsa:adevice=hw.1,0:amode=1:immediatemode=0:mjpeg:decimation=1"
-oac copy -ovc copy -vf harddup -noskip -idx -ni -mc 0 -o
/xfs/vhs-raw-test.avi tv://
MEncoder SVN-r29701-4.4.1 (C) 2000-2009 MPlayer Team
success: format: 9 data: 0x0 - 0x0
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
comment: first try, more to come ;-)
Selected device: Pinnacle PCTV HD 800i
Capabilites: video capture VBI capture device tuner read/write
streaming
supported norms: 0 = NTSC-M; 1 = NTSC-M-JP; 2 = NTSC-443; 3 = PAL-BG; 4 =
PAL-I; 5 = PAL-DK; 6 = PAL-M; 7 = PAL-N; 8 = PAL-Nc; 9 = PAL-60; 10 =
SECAM-B; 11 = SECAM-G; 12 = SECAM-H; 13 = SECAM-DK; 14 = SECAM-L;
inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
Current input: 1
Current format: BGR24
v4l2: current audio mode is : STEREO
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
MJP: width 704 height 576
[V] filefmt:9 fourcc:0x59565955 size:704x480 fps:29.970 ftime:=0.0334
videocodec: framecopy (704x480 24bpp fourcc=59565955)
audiocodec: framecopy (format=1 chans=2 rate=48000 bits=16 B/s=192000
sample-4)
Forcing audio preload to 0, max pts correction to 0.
Writing header...1f ( 0%) 0.00fps Trem: 0min 0mb A-V:0.000 [0:0]
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Writing index... 46f ( 0%) 22.19fps Trem: 0min 0mb A-V:0.000
[162039:1536]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
. . . . . . . . . . (snip out alot of the following repeated lines) . . . .
. .
video buffer full - dropping frame
too bad - dropping audio frame !
too bad - dropping audio frame !
too bad - dropping audio frame !
too bad - dropping audio frame !
Pos: 109.5s 3281f ( 0%) 23.37fps Trem: 0min 0mb A-V:0.000
[162039:1536]
too bad - dropping audio frame !
Writing index...3436f ( 0%) 23.83fps Trem: 0min 0mb A-V:0.000
[162039:1536]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not writing
vprp header.
Video stream: 162039.560 kbit/s (20254945 B/s) size: 2322186240 bytes
114.648 secs 3436 frames
Audio stream: 1536.000 kbit/s (192000 B/s) size: 22080000 bytes 115.000
secs
v4l2: 4295 frames successfully processed, 29 frames dropped.
I have tried many permutations of alsa vs oss, different output coders, etc.
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
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Ken Bass
2009-12-10 19:12:56 UTC
Permalink
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
Post by Ing. Daniel Rozsnyó
Hi,
Post by Ken Bass
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
Post by Ken Bass
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.
Post by Ken Bass
I have been fighting with this for a long time. So any help/pointers will
be
Post by Ken Bass
greatly appreciated.
TIA
ken
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Ing. Daniel Rozsnyó
2009-12-10 20:05:14 UTC
Permalink
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
Post by Ken Bass
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
Post by Ing. Daniel Rozsnyó
Hi,
Post by Ken Bass
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
Post by Ken Bass
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.
Post by Ken Bass
I have been fighting with this for a long time. So any help/pointers will
be
Post by Ken Bass
greatly appreciated.
TIA
ken
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
_______________________________________________
MPlayer-users mailing list
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-users
Reimar Döffinger
2009-12-10 21:25:15 UTC
Permalink
Post by Ing. Daniel Rozsnyó
Hi,
Post by Ken Bass
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.
Well, you certainly can't use -mc 0 in that case (and possibly -noskip
is a bad idea, too, but not necessarily).
-ni and -idx are completely pointless here btw., and -vf harddup probably
just wastes disk space.
Post by Ing. Daniel Rozsnyó
Post by Ken Bass
I have tried both ALSA and OSS. ALSA seems to work the best, but I keep
getting XRUNS.
Might mean the PC is still too slow. You could check if there are some options
to increase some buffer sizes.
Miroslav Rovis
2009-12-11 05:12:33 UTC
Permalink
Post by Ing. Daniel Rozsnyó
Post by Ken Bass
In short, I am trying to capture video from vhs, via a tv capture card.
But
Post by Ken Bass
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.
Post by Ken Bass
I have been fighting with this for a long time. So any help/pointers will
be
Post by Ken Bass
greatly appreciated.
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 had started, a month ago, a thread "composite input a/v sync issue".
I managed to superbly digitize quite a few VHS tapes back then. It might suit your needs as well.
Take a look:
http://lists.mplayerhq.hu/pipermail/mencoder-users/2009-November/010945.html
And,pls. let me know if the hack that it seems to me that you are using to digitize
the tapes (vlc capture, and then mencoder whatever...)...
Pls. let me know if vlc+mencoder is a better solution, better quality, which I doubt,
but I can't tell of course...
Namely, I am not and have not been converting tapes to files since back then, so I cannot test,
but I am curious to know...
Good luck!
Miro
www.exDeo.com
www.CroatiaFidelis.hr
Ken Bass
2009-12-12 02:00:31 UTC
Permalink
Miroslav,

I think your way works - at least it's the best that I have gotten so far.

First, I do believe what Daniel said about the VHS/VCR variable rates. But
VLC didn't resolve anything, other than to confirm that it was the tape (and
VCR) that was causing the problem. Running VLC, either directly from the
capture card, or from a captured video, VLC kept spitting out errors like:
"audio starved", "video arrived late".

(BTW: this tape was recorded 25 years ago, from another VHS recording. So it
is not the greatest quality to start with.)

I did have some problems running mencoder with your options. First, I was
using OSS, since that seemed to work the best with my capture card. What it
probably was doing was just ignoring errors, and not informing me - I still
had sync problems with it. When I switched to ALSA, I first got a 2 billion
second XRUN that it recovered from (give or take a 0). I recorded 1 hour+,
then ran mencoder to write out the index. For the full hour (plus about 12
minutes), the audio was pretty much in sync. There is a small, but
noticeable audio delay (maybe 1 sec or so) throughout the entire recording.
But at least it was constant, and not progressive as it had been before.

Couple of questions, though:

Should I ignore the "1 duplicate frame(s) !", and "Skipped 1 frame"
messages? (apparently they didn't have any noticeable effect on the video).
Would the "-noskip", or "-noencodedup", or "-vf harddup" make any difference
(good or bad)?

For the -tv options, I used "immediatemode=0". Is that a problem? or is it
necessary? Also, I am using hardware MJPEG compression, coming out at
704x480 (this is NTSC, not PAL). This usually gave me better video

This method should work using other a/v-codecs. Right?

I know I can't get a digital re-mastered quality video, but are there any
mencoder options (or any other app) to clean up some of the VHS noise? Like
I said, these are old recordings, mostly made by recording from another
recording (VCR to VCR).

Anyway, for now, this method seems to work, so I'll keep with it.

Thank you VERY much.

ken
Post by Ing. Daniel Rozsnyó
Post by Ken Bass
In short, I am trying to capture video from vhs, via a tv capture card.
But
Post by Ken Bass
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.
Post by Ken Bass
I have been fighting with this for a long time. So any help/pointers
will
Post by Ing. Daniel Rozsnyó
be
Post by Ken Bass
greatly appreciated.
IPls. let me know if vlc+mencoder is a better solution, better quality,
which I doubt,
but I can't tell of course...
Namely, I am not and have not been converting tapes to files since back
then, so I cannot test,
but I am curious to know...
Good luck!
Miro
<http://www.exDeo.com>
I hope this satisfies your curiosity about VLC!
Reimar Döffinger
2009-12-12 09:53:28 UTC
Permalink
Post by Ken Bass
Should I ignore the "1 duplicate frame(s) !", and "Skipped 1 frame"
messages? (apparently they didn't have any noticeable effect on the video).
It would be better if they can be avoided, but doing so at least involves a lot
of trying. If your video quality is bad anyway it probably won't matter much.
Post by Ken Bass
Would the "-noskip", or "-noencodedup", or "-vf harddup" make any difference
(good or bad)?
-noskip will probably improve things if the input frame rate is consistently
lower than what is specified, and can improve strongly varying desync at the
beginning.
Lower -mc values can smooth out varying A-V sync, whereas higher values can help
against consistent desync.
harddup I think should never break anything, though it can increase file size
for no benefit - I do not have much experience with it though.
Post by Ken Bass
For the -tv options, I used "immediatemode=0". Is that a problem? or is it
necessary?
It is necessary if you want to capture via your TV card instead of via the sound
card.
Post by Ken Bass
I know I can't get a digital re-mastered quality video, but are there any
mencoder options (or any other app) to clean up some of the VHS noise?
-vf hqdn3d and probably some others.
Miroslav Rovis
2009-12-12 10:45:13 UTC
Permalink
Post by Ken Bass
I think your way works - at least it's the best that I have gotten so far.
Really glad for sharing good things with good people. God bless the
Hungarian and all their associates who keep this great MPlayer/mencoder
program so useful and do free... I would donate if I weren't nearly
bancrupt with my poor man meagre investment, no room here to discuss
that though...
Post by Ken Bass
First, I do believe what Daniel said about the VHS/VCR variable rates. But
VLC didn't resolve anything, other than to confirm that it was the tape (and
VCR) that was causing the problem. Running VLC, either directly from the
"audio starved", "video arrived late".
So, mencoder is the way to go...
Post by Ken Bass
...
Should I ignore the "1 duplicate frame(s) !", and "Skipped 1 frame"
...
For the -tv options, I used "immediatemode=0" ... MJPEG compression, coming out at
704x480 ... should work using other a/v-codecs. Right?
I wish I could address these queries, but neither do I have sufficient
expertise, nor time.
Besides, Reimar has answered some of them.
But take a look at the longer discussion, previous to the link I gave in
my last post:
http://lists.mplayerhq.hu/pipermail/mencoder-users/2009-November/thread.html
You can just search by subject:
composite input a/v sync issue
In fact, to try to answer your questions, I would need to hark back to
what Reimar and other said to me in those posts (I don't bear notions
and others better than computer data in the mailing lists)...
What I can do is, I'll take a look at the last encoding commands and
options, as I have them somewhere, and they give somewhat better results
than what I have already written on the list and post them back.
They result from my further VHS-to-files work that I did after I found
the "-forceidx hack" on VHS being captured encoding...
Post by Ken Bass
... mencoder options (or any other app) to clean up some of the VHS noise? Like
I said, these are old recordings, mostly made by recording from another
recording (VCR to VCR).
Wish there were!
Post by Ken Bass
Anyway, for now, this method seems to work, so I'll keep with it.
Thank you VERY much.
You're appreciated.
I'll be back to post what I promised above, God willing.
Miroslav Rovis
2009-12-12 11:15:07 UTC
Permalink
Hello Ken, Reimar and all mencoder users!
Post by Miroslav Rovis
I'll be back to post what I promised above
I can't check this one now, but it is one of the latest I used for
capturing VHS:
mencoder tv:// -tv
input=1:driver=v4l2:device=/dev/video0:normid=3:input=1:alsa:adevice=hw.0:audiorate=48000:amode=1:width=768:height=576
-ovc lavc -lavcopts
vcodec=mpeg4:autoaspect:vqscale=4:vb_strategy=1:vmax_b_frames=2:autoaspect:mbd=0:turbo
-oac mp3lame -lameopts cbr:preset=standard -vf softskip,harddup -mc 0 -o
hvk316_1119_112158.avi
In other words, if you read my previous posts, this should be an
improvement as well as a rebuff of some of my statements of minor
importance in those previous posts.

But I remember ending up making an entry in my ~/.mplayer/mencoder.conf
file, so I'll post it here.

The PROBLEM is, I don't remember which of the profile entries worked and
which didn't... And I can't test them now, I have to be back on other
matters of my life ASAP... And now I wouldn't even remember without
consulting mplayer docs how to use the profiles on the command line :-)
So this is all I can do. Good luck!

[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_b_sens]
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:b_sensitivity=80:vmax_b_frames=2:mbd=0:turbo=1


vf=softskip,harddup

mc=0


[mpeg4_capt_MP3_b_sens]
profile=mpeg4_capt_b_sens
oac=mp3lame=1
lameopts=cbr=1:preset=standard

[mpeg4_capt_MP3]
profile=mpeg4_capt
oac=mp3lame=1
lameopts=cbr=1:preset=standard

[mpeg4_capt_MP2_AUDIO_not_muxed_in]
profile=mpeg4_capt
oac=lavc=1
lavcopts=acodec=mp2

[x264_capt_BUFFER_UNDERUN]
profile-desc="x264 capture"
oac=lavc=1
ovc=x264=1
x264encopts=crf=29
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


[h264_on_captVHS]
profile-desc="h264_on_captVHS"
ovc=x264=1
x264encopts=bitrate=900
vf=harddup=1
oac=faac=1
faacopts=br=192:mpeg=4:object=2
channels=2
srate=48000

[h264_on_captVHS_01_p1]
profile-desc="h264_on_captVHS_01_p1"
profile=h264_on_captVHS
x264encopts=pass=1:turbo=1:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300



[h264_on_captVHS_01_p2]
profile=h264_on_captVHS
profile-desc="h264_on_captVHS_01_p2"
x264encopts=pass=2:turbo=1:frameref=5:bframes=1:me=umh:partitions=all:trellis=1:qp_step=4:qcomp=0.7:direct_pred=auto:keyint=300

[h264_on_captVHS_02_p1]
profile=h264_on_captVHS
profile-desc="h264_on_captVHS_02_p1"
x264encopts=pass=1:turbo=1:frameref=1:subq=1:bframes=1:partitions=all:qp_step=4:qcomp=0.7:keyint=300

[h264_on_captVHS_02_p2]
profile=h264_on_captVHS
profile-desc="h264_on_captVHS_02_p2"
x264encopts=pass=2:turbo=1:subq=5:8x8dct:frameref=2:bframes=1:b_pyramid:weight_b:partitions=all:trellis=1:qp_step=4:qcomp=0.7:keyint=300

[h264_on_captVHS_03_p1]
profile=h264_on_captVHS
profile-desc="h264_on_captVHS_03_p1"
x264encopts=pass=1:turbo=1:frameref=1:subq=1:bframes=1:partitions=all:qp_step=4:qcomp=0.7:keyint=300

[h264_on_captVHS_03_p2]
profile=h264_on_captVHS
profile-desc="h264_on_captVHS_03_p2"
x264encopts=pass=2:turbo=1:subq=3:frameref=2:bframes=1:partitions=all:trellis=1:qp_step=4:qcomp=0.7:keyint=300
Loading...