[MPlayer-users] DVD to .avi encoding, audio-video synchronisation problem

irisson jean-olivier jo.irisson at noos.fr
Sun Jan 4 20:19:50 CET 2004


Hi all,

This is:
- a problem with mencoder, when using 3 passes encoding. Encoding a DVD to
and .avi file I produce a movie with a 300 ms delay between the audio and
the video.
This problem is not that horrible as I can easily watch the produced movie
by setting "-delay 0.3" but other users (that do not use mplayer...) won't
be able to do so. In addition it seems weird and puzzling to me as I think
I've done everything properly.

This is not:
- a problem of "reading correctly the DVD" as I can watch the DVD with
mplayer with no a/v sync problem
- a problem specific to one DVD as this around 300 ms delay is a constant
for several DVD's I encoded
- a global mencoder problem as fast (vhq) encoding or 2 passes encoding
produce correct synchronisation

This might be:
- a problem with my hardware but I doubt it as I've seen other posts
reporting similar problems. Nevertheless, in these post the delays seemed
to be random. Here the delay really seems constant between DVDs or encoding
sessions. Furthermore, I've never been able to find an answer to this kind
of posts. (apart from using "-mc 0" which seems inappropriate)
- an mencoder problem so find hereafter a "bug" report (following the
instructions of the appendix of the documentation).

Thank you in advance for your help.

JiHO.

-----------------------------------------------------------------------

MPLAYER "BUG" REPORT

* Distro and kernel *
Mandrake 9.2 with custom recompiled 2.4.20 kernel



* Versions *
 > ls -l /lib/libc[.-]*
       /lib/libc-2.3.2.so*
       /lib/libc.so.6 -> libc-2.3.2.so*
gcc version 3.3.1 (Mandrake Linux 9.2 3.3.1-2mdk)
GNU ld version 2.14.90.0.5 20030722
GNU assembler 2.14.90.0.5 20030722

and as I use lame MP3 encoding for the audio:
LAME version 3.93 MMX



* Hardware *
A laptop Compaq Presario 700 series with

processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 6
model           : 7
model name      : Mobile AMD Duron(tm) Processor
stepping        : 0
cpu MHz         : 946.728
cache size      : 64 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 sep mtrr pge mca cmov 
pat pse36 mmx fxsr sse syscall mmxext 3dnowext 3dnow
bogomips        : 1887.43

video card S3 Twister K Compaq with S3 Savage4 driver (autodetected by 
Mandrake 9.2)

sound card integrated to the mainboard ‎VT82C686 [Apollo Super AC97/Audio] 
with driver via82cxxx_audio



* MPlayer configuration *
I'm using MPlayer version 1.0pre3.
Configuration and compilation went fine but I include the ./configure 
output so that you can see what libraries are installed.

[irisson at irisson MPlayer-1.0pre3]$ ./configure --enable-menu --enable-gui
Detected operating system: Linux
Detected host architecture: i386
Checking for cc version ... 3.3.1, ok
Checking for CPU vendor ... AuthenticAMD (6:7:0)
Checking for CPU type ...  Mobile AMD Duron(tm) Processor
Checking for GCC & CPU optimization abilities ... athlon-4
Checking for kernel support of mmx ... yes
Checking for kernel support of mmx2 ... yes
Checking for kernel support of 3dnow ... yes
Checking for kernel support of 3dnowex ... yes
Checking for kernel support of sse ... yes
Checking for mtrr support ... yes
Checking for assembler (as 2.14.90.0.5) ... ok
Checking for Linux kernel version ... 2.4.20, ok
Checking for awk ... gawk
Checking for extra headers ... none
Checking for extra libs ... none
Checking for i18n ... yes
Checking for setlocale() ... yes
Checking for language ... using en (man pages: en)
Checking for enable sighandler ... yes
Checking for runtime cpudetection ... no
Checking for restrict keyword ... __restrict
Checking for kstat ... no
Checking for posix4 ... no
Checking for lrintf ... yes
Checking for nanosleep ... yes
Checking for socklib ... yes (using -lnsl)
Checking for inet_pton() ... yes (using -lnsl)
Checking for inttypes.h (required) ... yes
Checking for int_fastXY_t in inttypes.h ... yes
Checking for word size ... 32
Checking for stddef.h ... yes
Checking for malloc.h ... yes
Checking for memalign() ... yes
Checking for alloca.h ... yes
Checking for mman.h ... yes
Checking for dynamic loader ... yes
Checking for dynamic a/v plugins support ... no
Checking for pthread ... yes (using -lpthread)
Checking for sys/soundcard.h ... yes
Checking for sys/dvdio.h ... no
Checking for sys/cdio.h ... no
Checking for linux/cdrom.h ... yes
Checking for dvd.h ... no
Checking for BSDI dvd.h ... no
Checking for HPUX SCSI header ... no
Checking for userspace SCSI headers (Solaris) ... no
Checking for termcap ... no
Checking for termios ... yes (using sys/termios.h)
Checking for shm ... yes
Checking for linux devfs ... no
Checking for scandir() ... yes
Checking for strsep() ... yes
Checking for vsscanf() ... yes
Checking for posix select() ... yes
Checking for gettimeofday() ... yes
Checking for glob() ... yes
Checking for sys/sysinfo.h ... yes
Checking for Mac OS X APIs ... no
Checking for Samba support (libsmbclient) ... no
Checking for 3dfx ... no
Checking for tdfxfb ... no
Checking for tdfxvid ... no
Checking for tga ... yes
Checking for DirectFB headers presence ... not found
Checking for DirectFB ... no
Checking for X11 headers presence ... yes (using /usr/X11R6/include)
Checking for X11 libs presence ... yes (using /usr/X11R6/lib)
Checking for X11 ... yes
Checking for DPMS ... yes (using Xdpms 4)
Checking for Xv ... yes
Checking for XvMC ... no
Checking for Xinerama ... yes
Checking for Xxf86vm ... yes
Checking for DGA ... yes (using DGA 2.0)
Checking for OpenGL ... yes
Checking for /dev/mga_vid ... no
Checking for xmga ... no
Checking for GGI ... no
Checking for AA ... no
Checking for SVGAlib ... no
Checking for FBDev ... yes
Checking for DVB ... no (specify path to DVB/ost/include with
--with-dvbincdir=DIR)
Checking for DVB HEAD ... no (specify path to DVB/include (HEAD Version)
with --with-dvbincdir=DIR)
Checking for PNG support ... yes
Checking for JPEG support ... yes
Checking for GIF support ... no
Checking for VESA support ... yes
Checking for SDL ... no
Checking for Windows waveout ... no
Checking for Directx ... no
Checking for NAS ... no
Checking for DXR2 ... no
Checking for DXR3/H+ ... no
Checking for libmp1e ... no
Checking for libfame ... no
Checking for OSS Audio ... yes
Checking for aRts ... no
Checking for EsounD ... no
Checking for ALSA audio ... no
Checking for Sun audio ... no
Checking for Sun mediaLib ... no
Checking for SGI audio ... no
Checking for VCD support ... ok
Checking for DVD support (libmpdvdkit) ... yes
Checking for DVD support (libdvdread) ... disabled by libmpdvdkit2
Checking for cdparanoia ... no
Checking for freetype >= 2.0.9 ... yes
Checking for fontconfig ... yes
Checking for fribidi with charsets ... no
Checking for zlib ... yes
Checking for RTC ... yes
Checking for external liblzo support ... no
Checking for mad support ... no
Checking for OggVorbis support ... yes
Checking for OggTheora support (only the CVS version!) ... no
Checking for Matroska support (0.6.0 or later) ... no
Checking for internal FAAD2 (AAC) support ... yes
Checking for external FAAD2 (AAC) support ... no
Checking for FAAD2 version ... 2.0 RC1
Checking for Win32 codec DLL support ... yes (using /usr/local/lib/codecs)
Checking for Win32 loader support ... yes
Checking for DirectShow ... yes
Checking for XAnim DLL ... yes (using /usr/local/lib/codecs)
Checking for RealPlayer DLL ... yes (using /usr/local/lib/codecs)
Checking for LIVE.COM Streaming Media libraries ... no
Checking for iconv ... yes
Checking for FFmpeg libavcodec (static) ... yes
Checking for libdv-0.9.5+ ... no
Checking for zr ... no
Checking for bl ... no
Checking for XviD ... yes
Checking for DivX4 compatibility in XviD ... no
Checking for DivX4linux/DivX5linux/OpenDivX decore ... DivX5linux (with
libdivxdecore.so)
Checking for libmp3lame (for mencoder) ... yes
Checking for DivX4linux encore (for mencoder) ... DivX4linux (with
libdivxencore.so)
Checking for mencoder ... yes
Checking for fastmemcpy ... yes
Checking for UniquE RAR File Library ... yes
Checking for TV interface ... yes
Checking for EDL support ... yes
Checking for *BSD BrookTree 848 TV interface ... no
Checking for Video 4 Linux TV interface ... no
Checking for Video 4 Linux 2 TV interface ... no
Checking for audio select() ... yes
Checking for network ... yes
Checking for ftp ... yes
Checking for byte order ... Little Endian
Checking for shared postprocess lib ... no
Checking for OSD menu ... yes
Checking for QTX codecs ... yes
Checking for Subtitles sorting ... yes
Checking for XMMS inputplugin support ... no
Checking for FLAC support ... yes (using internal libmpflac)
Checking for inet6 ... yes
Checking for gethostbyname2 ... yes
Checking for GUI ... yes
Checking for XShape extension ... yes
Checking for gtk version ... 1.2.10 (using gtk-config)
Checking for glib version ... 1.2.10 (using glib-config)
Creating Gui/config.mak
Checking for ftello() ... yes
Checking for VIDIX ... yes
Checking for joystick ... no
Checking for lirc ... no
Checking for lircc ... no
Creating config.mak
Creating config.h
Creating libvo/config.mak
Creating libao2/config.mak
Creating help_mp.h

Config files successfully generated by ./configure !

   Install prefix: /usr/local
   Data directory: /usr/local/share/mplayer
   Config direct.: /usr/local/etc/mplayer

   Byte order: Little Endian
   Optimizing for: athlon-4 mmx mmx2 3dnow 3dnowex sse mtrr

   Languages:
     Messages/GUI: en
     Manual pages: en (no localization selected, use --language=all)

   Enabled optional drivers:
     Input: ftp network edl tv mpdvdkit2 vcd
     Codecs: flac(internal) qtx divx5linux xvid libavcodec real xanim
dshow/dmo win32 faad2(internal) libvorbis
     Audio output: oss mpegpes(file)
     Video output: xvidix cvidix vesa jpeg png mpegpes(file) fbdev opengl
dga xv x11 xover tga
   Disabled optional drivers:
     Input: tv-v4l2 tv-v4l tv-bsdbt848 live.com matroska cdda dvdread smb
     Codecs: divx4linux libdv libtheora libmad liblzo gif
     Audio output: sgi sun alsa esd arts dxr2 nas win32 sdl macosx
     Video output: winvidix bl zr zr2 dxr3 dxr2 directx sdl gif89a svga aa
ggi xmga mga xvmc directfb tdfx_vid tdfxfb 3dfx

'config.h' and 'config.mak' contain your configuration options.
Note: If you alter theses files (for instance CFLAGS) MPlayer may no longer
       compile *** DO NOT REPORT BUGS if you tweak these files ***

'make' will now compile MPlayer and 'make install' will install it.
Note: On non-Linux systems you might need to use 'gmake' instead of 'make'.

Please check mtrr settings at /proc/mtrr (see DOCS/HTML/en/devices.html#mtrr)

Check configure.log if you wonder why an autodetection failed (check
whether the development headers/packages are installed).

If you suspect a bug, please read DOCS/HTML/en/bugreports.html.
[irisson at irisson MPlayer-1.0pre3]$





* Encoding procedure *
This is my exact 3 passes encoding procedure and the full terminal output 
for each command line.

############## Detecting the black stripes (just useful)
[irisson at irisson platoon_test]$ mencoder dvd://1 -chapter 3 -ovc lavc 
-lavcopts vcodec=mpeg4:vpass=1:autoaspect -vf cropdetect -oac copy

MEncoder 1.0pre3-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 1160 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
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

Reading /home/irisson/.mplayer/codecs.conf: Can't open 
'/home/irisson/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/irisson/.mplayer/mencoder
Font /home/irisson/.mplayer/font/font.desc loaded successfully! (206 chars)
Reading disc structure, please wait...
There are 11 titles on this DVD.
There are 32 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x18B04000 - 0x4D0BA800
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 3)  25,000 fps  7300,0 kbps (912,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25,00  ftime:=0,0400
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448,0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 56000->192000 (448,0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [cropdetect]
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
audiocodec: framecopy (format=2000 chans=2 rate=48000 bits=16 bps=56000 
sample=1)
Writing AVI header...
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (720x576 fourcc=58564944 [DIVX])
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,008 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,012 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,016 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,020 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,024 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,028 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,032 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,036 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,039 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,042 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,044 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,047 [0:0]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,051 [0:448]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,055 [0:448]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,059 [0:448]
crop area: X: 2..719  Y: 9..564  (-vf crop=718:554:2:10):-0,062 [0:448]
Pos:   0,7s     19f ( 0%)  15fps Trem:   0min   0mb  A-V:-0,065 [0:448]
Writing AVI index...
Fixing AVI header...

Video stream: 2376,156 kbit/s  (297019 bps)  size: 213854 bytes  0,720 secs 
  19 frames

Audio stream:  448,000 kbit/s  (56000 bps)  size: 84000 bytes  1,500 secs


################## First pass: encoding the audio in vbr MP3 with lame
[irisson at irisson platoon_test]$ mencoder dvd://1 -ovc frameno -oac mp3lame 
-lameopts fast:preset=standard -o frameno.avi

MEncoder 1.0pre3-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 947.2 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
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

Reading /home/irisson/.mplayer/codecs.conf: Can't open 
'/home/irisson/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
File not found: 'frameno.avi'
Failed to open frameno.avi
Reading config file /home/irisson/.mplayer/mencoder
Font /home/irisson/.mplayer/font/font.desc loaded successfully! (206 chars)
Reading disc structure, please wait...
There are 11 titles on this DVD.
There are 32 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x0 - 0x4D0BA800
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 3)  25,000 fps  7300,0 kbps (912,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25,00  ftime:=0,0400
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 5.1 (3f+2r+lfe)  48000 Hz  448,0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 56000->192000 (448,0 kbit)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
==========================================================================
MP3 audio selected
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
Writing AVI header...

preset=standard

Pos:   0,9s     22f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:31]
Skipping frame!
Pos:   1,2s     32f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:32]
Skipping frame!
Pos:   1,6s     42f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:31]
Skipping frame!
Pos:   2,0s     52f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:32]
Skipping frame!
Pos:   2,3s     62f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:32]
Skipping frame!
Pos:   2,7s     72f ( 0%)   0fps Trem:   0min   0mb  A-V:0,084 [0:31]
Skipping frame!
Pos:   3,2s     85f ( 0%)   0fps Trem:   0min   0mb  A-V:0,082 [0:31]
Skipping frame!
Pos:   6,5s    170f ( 0%) 102fps Trem:   0min   0mb  A-V:-0,081 [0:32]
1 duplicate frame(s)!
Pos:  16,5s    419f ( 0%)  92fps Trem:  48min  49mb  A-V:0,080 [0:31]]
Skipping frame!
Pos:  27,3s    690f ( 0%)  94fps Trem:  49min  56mb  A-V:-0,083 [0:36]
1 duplicate frame(s)!
Pos:  28,3s    713f ( 0%)  93fps Trem:  50min  60mb  A-V:-0,082 [0:39]
1 duplicate frame(s)!
Pos:6881,0s 172031f (100%)  73fps Trem:   0min 143mb  A-V:-0,072 [0:169]
Writing AVI index...
Fixing AVI header...
Recommended video bitrate for 650MB CD: 608
Recommended video bitrate for 700MB CD: 669
Recommended video bitrate for 800MB CD: 791
Recommended video bitrate for 2 x 650MB CD: 1401
Recommended video bitrate for 2 x 700MB CD: 1523
Recommended video bitrate for 2 x 800MB CD: 1766

Video stream:    0,800 kbit/s  (99 bps)  size: 688092 bytes  6881,040 secs 
  172031 frames

Audio stream:  169,940 kbit/s  (21242 bps)  size: 146181312 bytes  6881,544 
secs

################### second pass: encoding the video with
               ##### detected bitrate for a 700 mb CD
               ##### detected crop parameters
               ##### french subtitles encoding
[irisson at irisson platoon_test]$  mencoder dvd://1 -ovc lavc -lavcopts 
vcodec=mpeg4:vpass=1:vbitrate=669:autoaspect -vf crop=718:554:2:10 -oac 
copy  -vobsubout subtitles -vobsuboutindex 0 -slang fr

MEncoder 1.0pre3-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 947.2 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
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

Reading /home/irisson/.mplayer/codecs.conf: Can't open 
'/home/irisson/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
AVI file format detected.
VIDEO:  [FrNo]  720x576  24bpp  25,000 fps    0,8 kbps ( 0,1 kbyte/s)
Using pass3 control file: frameno.avi
Reading config file /home/irisson/.mplayer/mencoder
Font /home/irisson/.mplayer/font/font.desc loaded successfully! (206 chars)
Reading disc structure, please wait...
There are 11 titles on this DVD.
There are 32 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x0 - 0x4D0BA800
Selected DVD subtitle channel: 0 language: fr
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 3)  25,000 fps  7300,0 kbps (912,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25,00  ftime:=0,0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [crop w=718 h=554 x=2 y=10]
Crop: 718 x 554, 2 ; 10
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=21243 sample=0)
Writing AVI header...
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (718x554 fourcc=58564944 [DIVX])
Pos:   0,8s     22f ( 0%)   0fps Trem:   0min   0mb  A-V:0,000 [0:31]
Skipping frame!
Pos:   1,2s     32f ( 0%)   0fps Trem:   0min   0mb  A-V:0,000 [73:32]
Skipping frame!
Pos:   1,6s     42f ( 0%)  34fps Trem:   0min   0mb  A-V:0,000 [292:32]
Skipping frame!
Pos:   1,9s     52f ( 0%)  33fps Trem:   0min   0mb  A-V:0,000 [470:32]
Skipping frame!
Pos:   2,3s     62f ( 0%)  32fps Trem:   0min   0mb  A-V:0,000 [576:32]
Skipping frame!
Pos:   2,6s     72f ( 0%)  31fps Trem:   0min   0mb  A-V:0,000 [619:31]
Skipping frame!
Pos:   3,1s     85f ( 0%)  31fps Trem:   0min   0mb  A-V:0,000 [636:31]
Skipping frame!
Pos:   6,5s    170f ( 0%)  29fps Trem:   0min   0mb  A-V:0,000 [632:32]
1 duplicate frame(s)!
Pos:  16,5s    419f ( 0%)  28fps Trem: 170min 981mb  A-V:0,000 [705:32]
Skipping frame!
Pos:  27,3s    690f ( 0%)  29fps Trem: 163min 933mb  A-V:0,000 [647:35]
1 duplicate frame(s)!
Pos:  28,2s    713f ( 0%)  29fps Trem: 163min 935mb  A-V:0,000 [645:39]
1 duplicate frame(s)!
Pos:6881,0s 172031f (99%)  25fps Trem:   0min 691mb  A-V:0,000 [668:169]
Writing AVI index...
Fixing AVI header...

Video stream:  668,883 kbit/s  (83610 bps)  size: 575322930 bytes  6881,000 
secs  172031 frames

Audio stream:  169,941 kbit/s  (21242 bps)  size: 146180160 bytes  6881,472 
secs


################## third pass: video encoding
[irisson at irisson platoon_test]$ mencoder dvd://1 -ovc lavc -lavcopts 
vcodec=mpeg4:vpass=2:vbitrate=669:autoaspect -vf crop=718:554:2:10 -oac copy

MEncoder 1.0pre3-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 1146 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
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

Reading /home/irisson/.mplayer/codecs.conf: Can't open 
'/home/irisson/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
AVI file format detected.
VIDEO:  [FrNo]  720x576  24bpp  25,000 fps    0,8 kbps ( 0,1 kbyte/s)
Using pass3 control file: frameno.avi
Reading config file /home/irisson/.mplayer/mencoder
Font /home/irisson/.mplayer/font/font.desc loaded successfully! (206 chars)
Reading disc structure, please wait...
There are 11 titles on this DVD.
There are 32 chapters in this DVD title.
There are 1 angles in this DVD title.
DVD successfully opened.
success: format: 0  data: 0x0 - 0x4D0BA800
LMLM4 Stream Format not found
MPEG-PS file format detected.
VIDEO:  MPEG2  720x576  (aspect 3)  25,000 fps  7300,0 kbps (912,5 kbyte/s)
[V] filefmt:2  fourcc:0x10000002  size:720x576  fps:25,00  ftime:=0,0400
Opening video filter: [expand osd=1]
Expand: -1 x -1, -1 ; -1  (-1=autodetect) osd: 1
Opening video filter: [crop w=718 h=554 x=2 y=10]
Crop: 718 x 554, 2 ; 10
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred csp: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
VDecoder init failed :(
Opening video decoder: [libmpeg2] MPEG 1/2 Video decoder libmpeg2-v0.3.1
Selected video codec: [mpeg12] vfm:libmpeg2 (MPEG 1 or 2 (libmpeg2))
==========================================================================
audiocodec: framecopy (format=55 chans=2 rate=48000 bits=0 bps=21243 sample=0)
Writing AVI header...
VDec: vo config request - 720 x 576 (preferred csp: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,78:1 - prescaling to correct movie aspect.
videocodec: libavcodec (718x554 fourcc=58564944 [DIVX])
Pos:   0,8s     22f ( 0%)   0fps Trem:   0min   0mb  A-V:0,000 [0:31]
Skipping frame!
Pos:   1,2s     32f ( 0%)   0fps Trem:   0min   0mb  A-V:0,000 [71:32]
Skipping frame!
Pos:   1,6s     42f ( 0%)   1fps Trem:   0min   0mb  A-V:0,000 [104:32]
Skipping frame!
Pos:   1,9s     52f ( 0%)   1fps Trem:   0min   0mb  A-V:0,000 [132:32]
Skipping frame!
Pos:   2,3s     62f ( 0%)   1fps Trem:   0min   0mb  A-V:0,000 [159:32]
Skipping frame!
Pos:   2,6s     72f ( 0%)   1fps Trem:   0min   0mb  A-V:0,000 [174:31]
Skipping frame!
Pos:   3,1s     85f ( 0%)   1fps Trem:   0min   0mb  A-V:0,000 [195:31]
Skipping frame!
Pos:   6,5s    170f ( 0%)   2fps Trem:   0min   0mb  A-V:0,000 [238:32]
1 duplicate frame(s)!
Pos:  16,5s    419f ( 0%)   4fps Trem:1046min 405mb  A-V:0,000 [268:32]
Skipping frame!
Pos:  27,3s    690f ( 0%)   7fps Trem: 709min 421mb  A-V:0,000 [269:35]
1 duplicate frame(s)!
Pos:  28,2s    713f ( 0%)   7fps Trem: 691min 426mb  A-V:0,000 [270:39]
1 duplicate frame(s)!
Pos:6881,0s 172031f (99%)  21fps Trem:   0min 691mb  A-V:0,000 [668:169]
Writing AVI index...
Fixing AVI header...

Video stream:  668,825 kbit/s  (83603 bps)  size: 575273275 bytes  6881,000 
secs  172031 frames

Audio stream:  169,941 kbit/s  (21242 bps)  size: 146180160 bytes  6881,472 
secs
[irisson at irisson platoon_test]$




* MPlayer output when playing the file*
[irisson at irisson platoon_test]$ mplayer -v test.avi
MPlayer 1.0pre3-3.3.1 (C) 2000-2003 MPlayer Team

CPU: Advanced Micro Devices Duron MG Morgan 947.3 MHz (Family: 6, Stepping: 0)
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or 
directo 

ry
Reading config file /home/irisson/.mplayer/config
Reading /home/irisson/.mplayer/codecs.conf: Can't open 
'/home/irisson/.mplayer/c 

odecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open 
'/usr/local/etc/mplayer/c 

odecs.conf': No such file or directory
Using built-in default codecs.conf.
CommandLine: '-v' 'test.avi'
init_freetype
get_path('font/font.desc') -> '/home/irisson/.mplayer/font/font.desc'
Font /home/irisson/.mplayer/font/font.desc loaded successfully! (206 chars)
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
Failed to open /dev/rtc: Permission denied (mplayer should be setuid root 
or /de 

v/rtc should be readable by the user.)
Using usleep() timing
get_path('input.conf') -> '/home/irisson/.mplayer/input.conf'
Can't open input config file /home/irisson/.mplayer/input.conf: No such 
file or 

directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such 
file or 

directory
Falling back on default (hardcoded) input config
get_path('test.avi.conf') -> '/home/irisson/.mplayer/test.avi.conf'

Playing test.avi.
[file] File size is 732551408 bytes
STREAM: [file] test.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
AVI file format detected.
list_end=0x146
======= AVI Header =======
us/frame: 40000  (fps=25,000)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 172025   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  718 x 554
==========================
list_end=0xD4
==> Found video stream: 0
====== STREAM Header =====
Type: vids   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 250000/10000 = 25,000
Start: 0   Len: 172025
Suggested BufferSize: 74839
Quality 0
Sample size: 0
==========================
found 'bih', 40 bytes of 40
======= VIDEO Format ======
   biSize 40
   biWidth 718
   biHeight 554
   biPlanes 1
   biBitCount 24
   biCompression 1482049860='DIVX'
   biSizeImage 1193316
===========================
Regenerating keyframe table for DIVX 4 video
list_end=0x146
==> Found audio stream: 1
====== STREAM Header =====
Type: auds   FCC:  (0)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 48000/1152 = 41,667
Start: 0   Len: 286728
Suggested BufferSize: 960
Quality 0
Sample size: 0
==========================
found 'wf', 30 bytes of 18
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 48000
avg byte/sec: 21243
Block align: 1152
bits/sample: 0
cbSize: 12
mp3.wID=1
mp3.fdwFlags=0x2
mp3.nBlockSize=1152
mp3.nFramesPerBlock=1
mp3.nCodecDelay=0
===========================
list_end=0x172
hdr=Software  size=23
Software  : MEncoder 1.0pre3-3.3.1
Broken chunk?  chunksize=1670  (id=JUNK)
list_end=0x2B39D8D8
Found movie at 0x80C - 0x2B39D8D8
Reading INDEX block, 458753 chunks for 172025 frames (fpos=0x2b39d8e0)
AVI index offset: 0x808 (movi=0x80C idx0=0x4 idx1=0x6C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=575273275 (172025) audio size=146180160 (286728)
VIDEO:  [DIVX]  718x554  24bpp  25,000 fps  668,8 kbps (81,6 kbyte/s)
[V] filefmt:3  fourcc:0x58564944  size:718x554  fps:25,00  ftime:=0,0400
Clip info:
  Software: MEncoder 1.0pre3-3.3.1
get_path('sub/') -> '/home/irisson/.mplayer/sub/'
get_path('default.sub') -> '/home/irisson/.mplayer/default.sub'
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: made decode tables with MMX optimization
mp3lib: using 3DNow!Ex optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 48000 Hz 32 kbit Joint-Stereo, BPF: 96
Channels: 2, copyright: No, original: Yes, CRC: No, emphasis: 0
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 4000->192000 (32,0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
X11 opening display: :0.0
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1024x768 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Unknown wm type...
[x11] Current fstype setting doesn't honour any X atoms
Disabling DPMS
DPMSDisable stat: 1
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm:ffmpeg (FFmpeg MPEG-4)
==========================================================================
Checking audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[libaf] Adding filter dummy
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and 
bps = 

2
AF_pre: af format: 2 bps, 2 ch, 48000 hz, little endian signed int
AF_pre: 48000Hz 2ch Signed 16-bit (Little-Endian)
ao2: 48000 Hz  2 chans  Signed 16-bit (Little-Endian)
audio_setup: using '/dev/dsp' dsp device
audio_setup: sample format: Signed 16-bit (Little-Endian) (requested: 
Signed 16- 

bit (Little-Endian))
audio_setup: using 2 channels (requested: 2)
audio_setup: using 48000 Hz samplerate (requested: 48000)
audio_setup: frags:  32/32  (4096 bytes/frag)  free: 131072
AO: [oss] 48000Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 48000Hz/2ch/16bit -> 48000Hz/2ch/16bit...
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and 
bps = 

2
[dummy] Was reinitialized, rate=48000Hz, nch = 2, format = 0x00000001 and 
bps = 

2
Starting playback...
[ffmpeg] aspect_ratio: 1,842977
VDec: vo config request - 718 x 554 (preferred csp: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1,84:1 - prescaling to correct movie aspect.
VO Config (718x554->1022x554,flags=0,'MPlayer',0x32315659)
VO: [xv] 718x554 => 1022x554 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel at goldbach.in-berlin.de> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x30323449 (I420) planar
Xvideo image format: 0x35315652 (RV15) packed
Xvideo image format: 0x36315652 (RV16) packed
Xvideo image format: 0x31313259 (Y211) packed
using Xvideo port 61 for hw scaling
[xv] dx: 0 dy: 0 dw: 1022 dh: 554
*** [vo] Allocating (slices) mp_image_t, 720x560x12bpp YUV planar, 604800 bytes
[xv] dx: 0 dy: 0 dw: 1022 dh: 554
XXX initial  v_pts=0,000  a_pos=2016 (0,095) /  1   0%  0%  0,0% 0 0 0%
*** [vo] Allocating (slices) mp_image_t, 720x560x12bpp YUV planar, 604800 bytes
Uninit audio filters...-0,007 ct:  0,045   76/ 76  21% 49%  6,0% 9 0 0%%
[libaf] Removing filter dummy
uninit audio: mp3lib
uninit video: ffmpeg
DEMUXER: freeing demuxer at 0x867f828
Successfully enabled DPMS
vo: uninit ...

Exiting... (Quit)
[irisson at irisson platoon_test]$


----------------------------------------------------------------------------


Thank you again for any help. If further information is needed contact me 
by e-mail.




More information about the MPlayer-users mailing list