[MPlayer-users] composite input a/v sync issue
Miroslav Rovis
m.rovis at inet.hr
Thu Nov 5 07:05:34 CET 2009
It's Hauppauge HVR-3000 on Gentoo, and it's pretty recently updated
Gentoo and pretty stable in performance.
Actually it's only when the VHS is not in good shape anymore that the
a/v sync is bad.
More precisely, the a/v sync is bad in those places when a recording
was stopped, and there are intervals of, be it a second or so, or more
or less, where the tape is blank proper, that is, not recorded at all in
that interval (blue on the screen), or the tape was recorded blank in
that interval, as there had been no input to the VHS recorder to record,
but the recording went on (black with occasional thin stripes on the
screen)...
After those places I get the audio lagging somewhere half a second after
video, somewhere more than two seconds, and the output file is, in the
end, a mess dangerous for my environment to deal with... ;-(
But, the same poor VHS (even extremely bad) has no sync problems
whatsoever on my M$ Windoze Vista box... Widoze is with Hauppauge
HVR-350, but I suppose the composite/S-video input is same hardware as
on the Linux box card.
Here is the command I used (there are numerous other variants also, none
proved to capture properly synced output ):
mencoder -fps 25 -ofps 25 -noskip -mc 0 -vf harddup,softskip 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:vbitrate=8000 -oac mp3lame
-srate 48000 -lameopts cbr:preset=standard -endpos 100 -o VHS155_`date
+%H%M%S`.avi
The "`date +%H%M%S`" in the output file name made it easier to ...more
speedily try and try the numerous variants of the command... for later
perusal if need be ;-( ...
I did search the archives, and I didn't find sufficient info that would
apply to my case...
Hmmm... This is what MPlayer is saying:
mybox # mencoder -fps 25 -ofps 25 -noskip -mc 0 -vf harddup,softskip
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:vbitrate=8000 -oac mp3lame
-srate 48000 -lameopts cbr:preset=standard -endpos 100 -o VHS155_`date
+%H%M%S`.avi
MEncoder SVN-r29463-4.1.2 (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
<olschewski at zpr.uni-koeln.de>
comment: first try, more to come
;-)
Selected device: Hauppauge WinTV-HVR4000
DVB-S/S
Tuner cap: STEREO LANG1
LANG2
Tuner rxs:
MONO
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
[V] filefmt:9 fourcc:0x59565955 size:768x576 fps:25.000
ftime:=0.0400
Input fps will be interpreted as 25.000
instead.
==========================================================================
Opening audio decoder: [pcm] Uncompressed PCM audio
decoder
AUDIO: 48000 Hz, 2 ch, s16le, 1536.0 kbit/100.00% (ratio:
192000->192000)
Selected audio codec: [pcm] afm: pcm (Uncompressed
PCM)
==========================================================================
Opening video filter: [expand
osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round:
1
Opening video filter:
[softskip]
Opening video filter:
[harddup]
==========================================================================
Opening video decoder: [raw] RAW Uncompressed
Video
VDec: vo config request - 768 x 576 (preferred colorspace: Packed
UYVY)
Could not find matching colorspace - retrying with -vf
scale...
Opening video filter:
[scale]
VDec: using Packed UYVY as output csp (no
0)
Movie-Aspect is undefined - no prescaling
applied.
[swscaler @ 0x1e46890]using unscaled uyvy422 -> yuv420p special
converter
videocodec: libavcodec (768x576 fourcc=34504d46
[FMP4])
Selected video codec: [rawuyvy] vfm: raw (RAW
UYVY)
==========================================================================
MP3 audio
selected.
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: vprp aspect is
4:3.
Writing
header...
ODML: vprp aspect is
4:3.
^CPos: 633.9s 15847f ( 0%) 24.80fps Trem: 0min 0mb A-V:0.000
[8000:137]
Flushing video
frames.
Writing
index...
Writing
header...
ODML: vprp aspect is
4:3.
Video stream: 8000.773 kbit/s (1000096 B/s) size: 633941268 bytes
633.880 secs 15847
frames
Audio stream: 137.910 kbit/s (17238 B/s) size: 10926624 bytes
633.840 secs
v4l2: 15848 frames successfully processed, 124 frames
dropped.
mybox #
I use "alsa:adevice=hw.0" in the command, as the Connexant audio capture
on the card itself would be "alsa:adevice=hw.1" instead, but there was
no way in the world to get that one to capture properly on that input...
It was impure sound, screechy and hardly intelligible most of the
time... Took me trials galore to figure out that I could get the sound
right at all on my card...
Except, that is, when there are those ugly passages described above...
Other than for this a/v sync issue, the output quality that I get with
MPlayer on Gentoo is superior to what I get on Windoze (taken it's the
same hardware with regard to the composite input).
Anyone had similar issues? Surely someone out there did have!
And how did you, kind reader who did so, solve this a/v sync hair
tearing frustration?
Arrrgh...
More information about the MPlayer-users
mailing list