[MEncoder-users] Many "1 duplicate frame(s)!" when capturing from TV

Jorge Peixoto de Morais Neto please.no.spam.here at gmail.com
Thu Apr 3 01:03:55 CEST 2008


Hi. When I use mencoder to capture TV, I get a lot of "1 duplicate
frame(s)!" and also "Skipping frame!" messages.

Normally I use the filter -vf pp=lb to deinterlace the image before
compression (and in this case, the problem occurs), but, for
simplicity, I have tested without any filters and the problem also
occurs.
I have googled a bit, but I cannot understand why is mencoder finding
so much "duplicate frames".

Info: I live in Brasil. Here we use PAL-M, which means NTSC dimensions
and framerate with PAL color encoding.

The relevant parts of my .mplayer/config :
tv=driver=v4l2:norm=PAL-M:chanlist=us-cable:alsa=yes:audiorate=32000
tv=channels=4-SBT,5-Vanguarda,7-Record,13-Band,15-TVEscola,17-RedeVida,19-CancaoNova,21-MTV,24-OutroGlobo,26-Futura,28-RecordNews,30-ShopTime,32-GazetaEsportiva,34-EdNacional,38-TVBrasil,40-RedeTV,42-Gazeta

Some sample output:

jorge at jorge ~ $ mencoder -oac copy -ovc copy -endpos 5 -o
rawstreamsfromtv.avi tv://9
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) XP 2600+ (Family: 6, Model: 8, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

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: BT878 video (Prolink PixelView
 Tuner cap:
 Tuner rxs: MONO
 Capabilites:  video capture  video overlay  VBI capture device  tuner
 read/write  streaming
 supported norms: 0 = PAL; 1 = NTSC; 2 = SECAM; 3 = PAL-Nc; 4 = PAL-M;
5 = PAL-N; 6 = NTSC-JP; 7 = PAL-60;
 inputs: 0 = Television; 1 = Composite1; 2 = S-Video;
 Current input: 0
 Current format: YVU420
v4l2: current audio mode is : MONO
TV channel names detected.
Selected channel: 24 - OutroGlobo (freq: 223.250)
[V] filefmt:9  fourcc:0x32315659  size:640x480  fps:29.97  ftime:=0.0334
videocodec: framecopy (640x480 24bpp fourcc=32315659)
audiocodec: framecopy (format=1 chans=1 rate=32000 bits=16 B/s=64000 sample-2)
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.
Pos:   1.1s     33f ( 0%) 19.92fps Trem:   0min   0mb  A-V:0.000 [110481:512]
1 duplicate frame(s)!
Pos:   1.4s     41f ( 0%) 23.59fps Trem:   0min   0mb  A-V:0.000 [107851:512]
Skipping frame!
Pos:   1.5s     44f ( 0%) 25.07fps Trem:   0min   0mb  A-V:0.000 [107970:512]
Skipping frame!
Pos:   1.6s     48f ( 0%) 22.49fps Trem:   0min   0mb  A-V:0.000 [108130:512]
1 duplicate frame(s)!
Pos:   1.7s     51f ( 0%) 23.68fps Trem:   0min   0mb  A-V:0.000 [106148:512]
1 duplicate frame(s)!
Pos:   1.8s     54f ( 0%) 24.85fps Trem:   0min   0mb  A-V:0.000 [104455:512]
Skipping frame!
Pos:   1.9s     56f ( 0%) 25.50fps Trem:   0min   0mb  A-V:0.000 [104562:512]
Skipping frame!
Pos:   2.0s     61f ( 0%) 26.11fps Trem:   0min   0mb  A-V:0.000 [104957:512]
1 duplicate frame(s)!
Pos:   2.4s     72f ( 0%) 26.73fps Trem:   0min   0mb  A-V:0.000 [104343:512]
1 duplicate frame(s)!
Pos:   2.8s     83f ( 0%) 24.64fps Trem:   0min   0mb  A-V:0.000 [103905:512]
1 duplicate frame(s)!
Pos:   3.0s     89f ( 0%) 23.46fps Trem:   0min   0mb  A-V:0.000 [103197:512]
1 duplicate frame(s)!
Pos:   3.2s     94f ( 0%) 24.55fps Trem:   0min   0mb  A-V:0.000 [102508:512]
Skipping frame!
Pos:   3.2s     95f ( 0%) 24.79fps Trem:   0min   0mb  A-V:0.000 [102508:512]
Skipping frame!
Pos:   3.3s     97f ( 0%) 24.15fps Trem:   0min   0mb  A-V:0.000 [102589:512]
Skipping frame!
Pos:   3.4s    102f ( 0%) 25.24fps Trem:   0min   0mb  A-V:0.000 [102899:512]
Skipping frame!
Pos:   3.5s    107f ( 0%) 26.05fps Trem:   0min   0mb  A-V:0.000 [103185:512]
1 duplicate frame(s)!
Pos:   3.8s    114f ( 0%) 27.23fps Trem:   0min   0mb  A-V:0.000 [102728:512]
Skipping frame!
Pos:   3.9s    118f ( 0%) 27.30fps Trem:   0min   0mb  A-V:0.000 [102927:512]
Skipping frame!
Pos:   4.0s    123f ( 0%) 26.50fps Trem:   0min   0mb  A-V:0.000 [103176:512]
1 duplicate frame(s)!
Pos:   4.1s    125f ( 0%) 26.86fps Trem:   0min   0mb  A-V:0.000 [102462:512]
1 duplicate frame(s)!
Pos:   4.2s    126f ( 0%) 27.04fps Trem:   0min   0mb  A-V:0.000 [101713:512]
1 duplicate frame(s)!
Pos:   4.4s    130f ( 0%) 27.63fps Trem:   0min   0mb  A-V:0.000 [101204:512]
1 duplicate frame(s)!
Pos:   4.7s    138f ( 0%) 26.10fps Trem:   0min   0mb  A-V:0.000 [101011:512]
1 duplicate frame(s)!
Pos:   4.7s    139f ( 0%) 26.26fps Trem:   0min   0mb  A-V:0.000 [100367:512]
1 duplicate frame(s)!
Pos:   5.0s    145f ( 0%) 27.20fps Trem:   0min   0mb  A-V:0.000 [100100:512]
1 duplicate frame(s)!
Writing index...46f ( 0%) 27.27fps Trem:   0min   0mb  A-V:0.000 [99506:512]
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.

Video stream: 99506.533 kbit/s  (12438316 B/s)  size: 62668800 bytes
5.038 secs  146 frames

Audio stream:  512.000 kbit/s  (64000 B/s)  size: 320000 bytes  5.000 secs
v4l2: 159 frames successfully processed, 0 frames dropped.

jorge at jorge ~ $ mencoder -oac copy -ovc lavc -lavcopts vqscale=3 -o
out.avi rawstreamsfromtv.avi
MEncoder dev-SVN-rUNKNOWN-4.1.2 (C) 2000-2008 MPlayer Team
CPU: AMD Athlon(tm) XP 2600+ (Family: 6, Model: 8, Stepping: 1)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

success: format: 0  data: 0x0 - 0x3c1412c
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  [YV12]  640x480  24bpp  29.970 fps  99506.5 kbps (12146.8 kbyte/s)
[V] filefmt:3  fourcc:0x32315659  size:640x480  fps:29.97  ftime:=0.0334
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
videocodec: libavcodec (640x480 fourcc=34504d46 [FMP4])
[VE_LAVC] Using constant qscale = 3.000000 (VBR).
Selected video codec: [rawyv12] vfm: raw (RAW YV12)
==========================================================================
audiocodec: framecopy (format=1 chans=1 rate=32000 bits=16 B/s=64000 sample-2)
Writing header...
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.
Pos:   1.6s     49f (41%)  0.00fps Trem:   0min   4mb  A-V:0.033 [8925:512]
1 duplicate frame(s)!
Pos:   1.7s     53f (41%)  0.00fps Trem:   0min   4mb  A-V:0.033 [8714:512]
1 duplicate frame(s)!
Pos:   2.0s     62f (51%) 54.67fps Trem:   0min   4mb  A-V:0.033 [8417:512]
1 duplicate frame(s)!
Pos:   2.4s     74f (51%) 57.05fps Trem:   0min   4mb  A-V:0.033 [8126:512]
1 duplicate frame(s)!
Pos:   2.8s     86f (61%) 57.72fps Trem:   0min   4mb  A-V:0.033 [7770:512]
1 duplicate frame(s)!
Pos:   3.0s     93f (72%) 56.13fps Trem:   0min   4mb  A-V:0.033 [7576:512]
1 duplicate frame(s)!
Pos:   3.5s    108f (82%) 57.05fps Trem:   0min   4mb  A-V:0.033 [7189:512]
1 duplicate frame(s)!
Pos:   4.0s    123f (90%) 58.07fps Trem:   0min   4mb  A-V:0.033 [6901:512]
1 duplicate frame(s)!
Pos:   4.1s    126f (90%) 58.66fps Trem:   0min   4mb  A-V:0.033 [6819:512]
1 duplicate frame(s)!
Pos:   4.2s    128f (90%) 59.20fps Trem:   0min   4mb  A-V:0.033 [6749:512]
1 duplicate frame(s)!
Pos:   4.4s    133f (90%) 59.94fps Trem:   0min   4mb  A-V:0.033 [6641:512]
1 duplicate frame(s)!
Pos:   4.7s    142f (100%) 60.14fps Trem:   0min   3mb  A-V:0.033 [6501:512]
1 duplicate frame(s)!
Pos:   4.7s    144f (100%) 60.53fps Trem:   0min   3mb  A-V:0.033 [6477:512]
1 duplicate frame(s)!
Pos:   5.0s    151f (100%) 61.31fps Trem:   0min   4mb  A-V:0.033 [6376:512]
Flushing video frames.
Writing index...
Writing header...
ODML: Aspect information not (yet?) available or unspecified, not
writing vprp header.

Video stream: 6376.239 kbit/s  (797029 B/s)  size: 3962540 bytes
4.972 secs  151 frames

Audio stream:  512.000 kbit/s  (64000 B/s)  size: 320000 bytes  5.000 secs

Some additional info that you might want:
jorge at jorge ~ $ uname -a
Linux jorge 2.6.24-gentoo-r4nm #1 Wed Apr 2 11:34:47 BRT 2008 i686 AMD
Athlon(tm) XP 2600+ AuthenticAMD GNU/Linux

jorge at jorge ~ $ cat /proc/cpuinfo
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 8
model name      : AMD Athlon(tm) XP 2600+
stepping        : 1
cpu MHz         : 2133.528
cache size      : 256 KB
fdiv_bug        : no
hlt_bug         : no
f00f_bug        : no
coma_bug        : no
fpu             : yes
fpu_exception   : yes
cpuid level     : 1
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
mca cmov pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow ts
bogomips        : 4269.11
clflush size    : 32

jorge at jorge ~ $ sudo lspci
00:00.0 Host bridge: VIA Technologies, Inc. VT8377 [KT400/KT600 AGP] Host Bridge
00:01.0 PCI bridge: VIA Technologies, Inc. VT8235 PCI Bridge
00:07.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8139/8139C/8139C+ (rev 10)
00:0b.0 Multimedia video controller: Brooktree Corporation Bt878 Video
Capture (rev 11)
00:0b.1 Multimedia controller: Brooktree Corporation Bt878 Audio
Capture (rev 11)
00:0c.0 Multimedia audio controller: C-Media Electronics Inc CM8738 (rev 10)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1
Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc.
VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
01:00.0 VGA compatible controller: nVidia Corporation NV17 [GeForce4
MX 440] (rev a3)

The module I used to modprobe into the kernel to enable the TV card
was named bttv, but I have changed the kernel config so it is built
into the kernel (my kernel does not use modules).



More information about the MEncoder-users mailing list