[MEncoder-users] bad sync when recording DVB
Benjamin Adler
benadler at gmx.net
Mon Oct 9 19:04:18 CEST 2006
Hello List!
I'm trying to use mencoder to record german TV with my technotrend PCI DVB-C
card. The problem is that audio and video are never really in good sync. The
time difference is not the same for every recording, but it often is far too
much to be usable.
# mencoder dvb://ZDF -o testnormal2.mpg -of mpeg -mpegopts
'format=dvd:tsaf:drop:vaspect=16/9' -vf harddup -ovc copy -oac copy -endpos
00:00:10
MEncoder 1.0pre8-4.1.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) processor (Family: 6, Model: 4, Stepping: 4)
3DNowExt supported but disabled
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 0 SSE: 0 SSE2: 0
Compiled with runtime CPU detection.
93 audio & 211 video codecs
code taken from dvbstream for mplayer v0.4pre1 - (C) Dave Chapman 2001
Released under the GPL.
Latest version available from http://www.linuxstb.org/
dvb_tune Freq: 378000000
success: format: 0 data: 0x0 - 0x0
Win32 LoadLibrary failed to load: avisynth.dll, /usr/lib/win32/avisynth.dll,
/usr/local/lib/win32/avisynth.dll
TS file format detected.
DEMUX OPEN, AUDIO_ID: -1, VIDEO_ID: -1, SUBTITLE_ID: -2,
PROBING UP TO 2000000, PROG: 0
VIDEO MPEG2(pid=110)AUDIO MPA(pid=120) NO SUBS (yet)! PROGRAM N. 0
Opened TS demuxer, audio: 50(pid 120), video: 10000002(pid
110)...POS=312080, PROBE=2000000
VIDEO: MPEG2 720x576 (aspect 3) 25.000 fps 15000.0 kbps (1875.0
kbyte/s)
[V] filefmt:29 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 256.0 kbit/16.67% (ratio: 32000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
PACKET SIZE: 2048 bytes, deltascr: 43885
MPEG MUXER, patching aspect ratio to 16/9
videocodec: framecopy (720x576 24bpp fourcc=10000002)
audiocodec: framecopy (format=50 chans=2 rate=48000 bits=16 B/s=32000
sample-1)
Limiting audio preload to 0.4s.
Increasing audio density to 4.
Writing header...
INITV: 0.200, 0.160, fps: 25.000
Pos: 0.9s 22f ( 0%) 20.33fps Trem: 0min 0mb A-V:-0.084 [0:256]
1 duplicate frame(s)!
Pos: 1.3s 32f ( 0%) 20.11fps Trem: 0min 0mb A-V:-0.084 [4791:256]
1 duplicate frame(s)!
Pos: 1.8s 42f ( 0%) 20.11fps Trem: 0min 0mb A-V:-0.084 [4604:256]
1 duplicate frame(s)!
Pos: 2.2s 52f ( 0%) 20.00fps Trem: 0min 0mb A-V:-0.084 [4571:256]
1 duplicate frame(s)!
Pos: 2.6s 62f ( 0%) 20.02fps Trem: 0min 0mb A-V:-0.084 [4573:256]
1 duplicate frame(s)!
Pos: 3.1s 72f ( 0%) 22.00fps Trem: 0min 0mb A-V:-0.084 [4545:256]
1 duplicate frame(s)!
Pos: 3.5s 82f ( 0%) 21.74fps Trem: 0min 0mb A-V:-0.084 [4578:256]
1 duplicate frame(s)!
Pos: 6.4s 154f ( 0%) 22.65fps Trem: 0min 0mb A-V:-0.080 [4594:256]
1 duplicate frame(s)!
Writing index...43f ( 0%) 24.70fps Trem: 0min 0mb A-V:-0.040 [4604:256]
Overhead: 2.142% (130377 / 6085303)
Writing header...
Video stream: 4604.194 kbit/s (575524 B/s) size: 5778263 bytes 10.040
secs 243 frames
Audio stream: 256.000 kbit/s (32000 B/s) size: 320000 bytes 10.000 secs
I've tried many things to correct this:
- specify -mc 10, as recommended on some websites
- use a different muxer:
-of lavf -lavfopts
'format=mpg:i_certify_that_my_video_stream_does_not_use_b_frames' -vf
harddup -ovc copy -oac copy
But I just can't get an mpeg with correct a/v-sync. I've put up a 7mb sample
video (with quite good, but not perfect sync) recorded with the above
command at http://politbuero.dyndns.org/sample.mpg. The output was:
Do you have any ideas? If this ever works, the next step is to convert it to
x264, so I'm not afraid of additional steps/conversions.
Thanks for your help!
Ben
More information about the MEncoder-users
mailing list