[MPlayer-users] Trouble encoding vdr files (duplicate frames and too many video packets)

Dominique Dumont domi.dumont at free.fr
Sun May 7 16:25:18 CEST 2006


Hello

Since around March, I've some trouble to encode vdr files. Mencoder
complains about "duplicate frames" and "too many video packets". 

I use the following command:

   mencoder 001.vdr -oac copy -vf pp=ci,crop=688:544 -ovc xvid \
      -xvidencopts bitrate=900:vhq=3:pass=1:turbo -o /dev/null

For most vdr files I get this output :

MEncoder dev-CVS-060430-14:41-4.0.4 (C) 2000-2006 MPlayer Team
CPU: Advanced Micro Devices Sempron/Athlon MP/XP/XP-M Barton,Thorton (Family: 6, Stepping: 0)
CPUflags: Type: 6 MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled with runtime CPU detection.
success: format: 0  data: 0x0 - 0x20acb7bb
MPEG-PES file format detected.
VIDEO:  MPEG2  720x576  (aspect 2)  25.000 fps  15000.0 kbps (1875.0 kbyte/s)
[V] filefmt:41  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, 128.0 kbit/8.33% (ratio: 16000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
xvid: using library version 1.1.0 (build xvid-1.1.0)
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
Opening video filter: [crop w=688 h=544]
Crop: 688 x 544, -1 ; -1
Opening video filter: [pp=ci]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
[PP] Using external postprocessing filter, max q = 6.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try adding the scale filter, e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.4.0b
Selected video codec: [mpeg12] vfm: libmpeg2 (MPEG-1 or 2 (libmpeg2))
==========================================================================
audiocodec: framecopy (format=50 chans=2 rate=48000 bits=16 B/s=16000 sample-1)
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
[PP] Using external postprocessing filter, max q = 6.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
videocodec: XviD (688x544 fourcc=44495658 [XVID])
xvid: par=0/0 (vga11), displayed=733x544, sampled=688x544
xvid: bitrate setting is ignored during first pass
xvid: 2Pass Rate Control -- 1st pass
Writing header...2f ( 0%)  0.00fps Trem:   0min   0mb  A-V:-0.004 [0:0]
ODML: vprp aspect is 16384:12159.
Setting audio delay to 0.040s.
Writing header...
ODML: vprp aspect is 16384:12159.
Setting audio delay to 0.040s.

1 duplicate frame(s)!
Pos:   0.8s     22f ( 0%)  0.00fps Trem:   0min   0mb  A-V:-0.084 [0:128]
1 duplicate frame(s)!
Pos:   1.2s     32f ( 0%)  0.00fps Trem:  13min 346mb  A-V:-0.084 [2386:128]
1 duplicate frame(s)!
Pos:   1.6s     42f ( 0%) 33.41fps Trem:  17min 390mb  A-V:-0.084 [2285:128]
1 duplicate frame(s)!

[...]

Pos: 145.5s   3312f ( 9%) 32.31fps Trem:  15min 505mb  A-V:-0.084 [2773:128]
1 duplicate frame(s)!
Pos: 146.0s   3322f ( 9%) 32.32fps Trem:  15min 506mb  A-V:-0.084 [2775:128]
1 duplicate frame(s)!
Pos: 146.4s   3332f (10%) 32.32fps Trem:  15min 505mb  A-V:-0.084 [2773:128]
1 duplicate frame(s)!
Pos: 146.8s   3342f (10%) 32.32fps Trem:  15min 505mb  A-V:-0.084 [2773:128]
1 duplicate frame(s)!
Pos: 147.3s   3352f (10%) 32.30fps Trem:  15min 505mb  A-V:-0.084 [2773:128]
1 duplicate frame(s)!
Pos: 147.7s   3362f (10%) 32.31fps Trem:  15min 505mb  A-V:-0.084 [2770:128]
1 duplicate frame(s)!
Pos: 148.2s   3372f (10%) 32.33fps Trem:  15min 504mb  A-V:-0.084 [2768:128]
1 duplicate frame(s)!
Pos: 148.6s   3382f (10%) 32.35fps Trem:  15min 504mb  A-V:-0.084 [2769:128]
1 duplicate frame(s)!

After a while, I get:

Too many video packets in the buffer: (4096 in 7820504 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Pos: 273.0s   6210f (18%) 29.95fps Trem:  14min 569mb  A-V:-0.076 [3162:127]
Too many video packets in the buffer: (4096 in 7820285 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.
Pos: 273.1s   6211f (18%) 29.95fps Trem:  14min 569mb  A-V:-0.080 [3162:127]
Too many video packets in the buffer: (4096 in 7817404 bytes).
Maybe you are playing a non-interleaved stream/file or the codec failed?
For AVI files, try to force non-interleaved mode with the -ni option.


So far, the only workarounf I've found is to replex the vdr file. Then
mencoder finds only 2 duplicate frames and encode the video without a
problem.

Anyone knows what can be done to avoid the "replex" phase ? 

Thanks




More information about the MPlayer-users mailing list