[MEncoder-users] Problems when creating video dvd

Giacomo Comes comes at naic.edu
Mon Jan 16 20:56:01 CET 2006


On Mon, Jan 16, 2006 at 08:19:13PM +0100, Sebastian wrote:
> Hi :)
> 
> The rip has finished but it doesn't work. I demuxed the stream with
> tcextract and tried to remux it with mplex. Didn't work.
> 
> mencoder -sws 9 -vf scale=720:480,harddup -ofps 30000/1001
> Documentary.avi -oac lavc -srate 48000 -af lavcresample=48000
> -ovc lavc -lavcopts
> dc=10:vqmin=1:aspect=16/9:vcodec=mpeg2video:mbd=2:keyint=12:vrc_maxrate=9800:vrc_buf_size=1835:vpass=2:vbitrate=5230:acodec=ac3:abitrate=192
> -o test_vid.mpg -of mpeg -mpegopts format=dvd
> MEncoder dev-CVS-060116-16:33-3.4.4 (C) 2000-2006 MPlayer Team
> CPU: Advanced Micro Devices Sempron/Athlon MP/XP Thoroughbred; Duron
> Applebred (Family: 6, 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 - 0x2bc79e2c
> AVI file format detected.
> VIDEO:  [DX50]  512x288  24bpp  29.970 fps  806.3 kbps (98.4 kbyte/s)
> [V] filefmt:3  fourcc:0x30355844  size:512x288  fps:29.97  ftime:=0.0334
> ==========================================================================
> Requested audio codec family [mp3] (afm=mp3lib) not available.
> Enable it at compilation.
> Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
> AUDIO: 44100 Hz, 2 ch, s16le, 96.0 kbit/6.80% (ratio: 12000->176400)
> Selected audio codec: [ffmp3] afm: ffmpeg (FFmpeg MPEG layer-3 audio
> decoder)
> ==========================================================================
> PACKET SIZE: 2048 bytes
> Opening video filter: [expand osd=1]
> Expand: -1 x -1, -1 ; -1, osd: 1, aspect: 0.000000, round: 1
> Opening video filter: [harddup]
> Opening video filter: [scale w=720 h=480]
> ==========================================================================
> Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
> Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
> ==========================================================================
> Building audio filter chain for 44100Hz/2ch/s16le -> 48000Hz/0ch/??...
> Building audio filter chain for 44100Hz/2ch/s16le ->
> 48000Hz/2ch/s16le...
> Limiting audio preload to 0.4s
> Increasing audio density to 4
> VDec: vo config request - 512 x 288 (preferred colorspace: Planar YV12)
> VDec: using Planar YV12 as output csp (no 0)
> Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
> 
> SwScaler: Lanczos scaler, from Planar YV12 to Planar YV12 using MMX2
> videocodec: libavcodec (720x480 fourcc=3267706d [mpg2])
> High quality encoding selected (non real time)!
> Writing header...1f ( 0%)  0.04fps Trem:   0min   0mb  A-V:0.000 [0:0]
> INITIAL DELAY of 0 frames  0.47fps Trem:   0min   0mb  A-V:0.032 [0:0]
> Pos:3714.9s 111338f (55%) 30.90fps Trem:  47min 3286mb  A-V:0.047
> [3854:19[mpeg2video @ 0x841b9e8]rc buffer underflow4min 3243mb
> A-V:0.046 [3902:191]
> [mpeg2video @ 0x841b9e8]rc buffer underflow4min 3244mb  A-V:0.047
> [3902:192]
> Pos:6412.6s 192187f (100%) 32.15fps Trem:   0min 3384mb  A-V:0.068
> [4178:191]
> Skipping frame!
> Pos:6412.9s 192197f (100%) 32.15fps Trem:   0min 3384mb  A-V:0.068
> [4178:192]
> Skipping frame!
> Pos:6413.2s 192207f (100%) 32.15fps Trem:   0min 3384mb  A-V:0.068
> [4178:191]
> 
> [...]
> 
> [4172:191]
> Flushing video frames
> Writing index...
> 
> Overhead: 2.153% (75484536 / 3506461320)
> Writing header...
> 
> Video stream: 4172.342 kbit/s  (521542 B/s)  size: -942774904 bytes
> 6427.455 secs  192681 frames
> 
> Audio stream:  192.000 kbit/s  (23999 B/s)  size: 154268928 bytes
> 6427.872 secs
> 

Does MPlayer play fine the mpeg stream? I assume yes.

> #################################################################
> 
> ++ WARN: [mplex] Video e0: buf=   2025 frame=003551 sector=00026729
> ++ WARN: [mplex] Audio bd: buf=   1437 frame=003703 sector=00001411
> ++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=10722011
> required(DTS)=10718714
> ++ WARN: [mplex] Video e0: buf=   2025 frame=003565 sector=00027023
> ++ WARN: [mplex] Audio bd: buf=   1245 frame=003719 sector=00001417
> ++ WARN: [mplex] Stream e0: data will arrive too late sent(SCR)=10766043
> required(DTS)=10763759
> ++ WARN: [mplex] Video e0: buf=   2025 frame=003580 sector=00027318
> ++ WARN: [mplex] Audio bd: buf=      0 frame=003732 sector=00001422
> **ERROR: [mplex] Too many frame drops -exiting
> 
> ##################################################################

You didn't post the whole mplex output, nor the command line you have used.
My guess is that you have not specified -f 8 as mplex option.
You should at least use -f 8 -V -b 230

> 
> dvdauthor:
> 
> WARN: audio sector out of range: -950748 (vobu #16595, pts 3135.568)
> 
> WARN: audio sector out of range: -950624 (vobu #16596, pts 3135.768)
> 
> WARN: audio sector out of range: -950608 (vobu #16597, pts 3135.969)
> 
> WARN: audio sector out of range: -950593 (vobu #16598, pts 3136.169)
> 
> WARN: audio sector out of range: -950577 (vobu #16599, pts 3136.369)
> 
> WARN: audio sector out of range: -950640 (vobu #16600, pts 3136.569)
> 
> WARN: audio sector out of range: -950665 (vobu #16601, pts 3136.769)
> 
> WARN: audio sector out of range: -950671 (vobu #16602, pts 3136.970)
> 
> ###################################################################

This is normal because mplex did a bad job.

> 
> Maybe it's just that the source is bad, I mean it was encoded from a dvd
> source to divx and the audio part got resampled to 44.1kHz. Who knows
> what else was done to the movie? ;)

I suggest you something else.
Try to use encode2mpeg (http://encode2mpeg.sf.net):

  encode2mpeg -o test_vid Documentary.avi -mpeg -dvd -n n -vfr 4 -encode 6:2:2 -vbr 5230 -imageonly -replex -mpegmbr 9800 -a 3

This is GUARANTEED (Tm) to work ;-).
I have used the necessary options that will encode almost with the same 
paramenters you have used (-encode 6:4:2 would be better but will be also much
slower).
If you try it, let me know the results.

Giacomo




More information about the MEncoder-users mailing list