[MEncoder-users] help with old divx for linux codec, please?

Dieter freebsd at sopwith.solgatos.com
Tue May 22 15:24:38 CEST 2007


> > > > I've been trying to use the xvid.org codec to decode
> > > > my input but it crashes (frequently) since the
> > > > developers don't seem to care about fault tolerant or
> > > > error resilient coding practices.  That means I must
> > > > evaluate other software MPEG4 decoders for stability. 
> > > > I don't have the time, background, or resources to
> > > > write my own decoder.
> > > > 
> > > > If I understand my history correctly there are really
> > > > only two other options.  The ffmpeg mpeg4 decoder
> > > > which was loosely based on the h.263 stuff,
> > > 
> > > Are there any problems with ffmpeg's mpeg-4 asp decoder?
> > 
> > Ffmpeg complains a lot about the mpeg4 output from mencoder.
> 
> Considering that mencoder outputs mpeg4 encoded by libavcodec,
> I find your statement dubious. Have you submitted a bugreport?

Probably not.  Back when I was working on this I was more concerned
with the crashes than the mere complaints.


[NULL @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[NULL @ 0x81bc10]my guess is 5 bits ;)
[NULL @ 0x81bc10]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 2 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 1 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 10 bits ;)
[mpeg4 @ 0x81bc10]Error, header damaged or not MPEG4 header (f_code=0)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 4 bits ;)
[mpeg4 @ 0x81bc10]Error, header damaged or not MPEG4 header (f_code=0)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 3 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 2 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 1 bits ;)
[mpeg4 @ 0x81bc10]Error, header damaged or not MPEG4 header (f_code=0)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 5 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 2 bits ;)
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 1 bits ;)
Input #0, avi, from 'input.mpeg4':
  Duration: 00:40:00.0, start: 0.000000, bitrate: 14838 kb/s
  Stream #0.0, 1001/30000, 29.97 fps(r): Video: mpeg4, yuv420p, 640x480, 1001/30000
  Stream #0.1, 3/125: Audio: mp2, 48000 Hz, stereo, 128 kb/s
Output #0, dv, to '/tmp/input.swap.dv':
  Stream #0.0, 1/90000, 29.97 fps(c): Video: dvvideo, yuv411p, 720x480, 1001/30000, q=2-31, 200 kb/s
  Stream #0.1, 1/90000: Audio: pcm_s16le, 48000 Hz, stereo, 1536 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
  Stream #0.1 -> #0.1
Press [q] to stop encoding
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 5 bits ;)
[mpeg4 @ 0x81bc10]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0x81bc10]warning: first frame is no keyframe
[mpeg4 @ 0x81bc10]ac-tex damaged at 2 0
[mpeg4 @ 0x81bc10]Error at MB: 2
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 2 0
[mpeg4 @ 0x81bc10]Error at MB: 2
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 13 0
[mpeg4 @ 0x81bc10]Error at MB: 13
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]I cbpy damaged at 20 0
[mpeg4 @ 0x81bc10]Error at MB: 20
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]1. marker bit missing in 3. esc
[mpeg4 @ 0x81bc10]Error at MB: 0
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]Error at MB: 3
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 6 0
[mpeg4 @ 0x81bc10]Error at MB: 6
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]1. marker bit missing in 3. esc
[mpeg4 @ 0x81bc10]Error at MB: 46
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 15 0
[mpeg4 @ 0x81bc10]Error at MB: 15
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 4 0
[mpeg4 @ 0x81bc10]Error at MB: 4
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 20 0
[mpeg4 @ 0x81bc10]Error at MB: 20
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
frame=   11 q=0.0 size=    1172kB time=0.4 bitrate=26155.7kbits/s dup=0 drop=0    
[mpeg4 @ 0x81bc10]ac-tex damaged at 7 0
[mpeg4 @ 0x81bc10]Error at MB: 7
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 2 bits ;)
[mpeg4 @ 0x81bc10]1. marker bit missing in 3. esc
[mpeg4 @ 0x81bc10]Error at MB: 32
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]ac-tex damaged at 23 1
[mpeg4 @ 0x81bc10]Error at MB: 64
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1186 DC, 1186 AC, 1186 MV errors
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 1 bits ;)
[mpeg4 @ 0x81bc10]ac-tex damaged at 32 0
[mpeg4 @ 0x81bc10]Error at MB: 32
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 10 bits ;)
[mpeg4 @ 0x81bc10]Error, header damaged or not MPEG4 header (f_code=0)
[mpeg4 @ 0x81bc10]header damaged
Error while decoding stream #0.0
frame=   30 q=0.0 size=    3398kB time=1.0 bitrate=27812.2kbits/s dup=17 drop=0    
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 4 bits ;)
[mpeg4 @ 0x81bc10]ac-tex damaged at 0 0
[mpeg4 @ 0x81bc10]Error at MB: 0
[mpeg4 @ 0x81bc10]error_resilience.c ff_er_frame_end(): concealing 1200 DC, 1200 AC, 1200 MV errors
[mpeg4 @ 0x81bc10]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x81bc10]my guess is 3 bits ;)

It goes on like this for awhile, then settles down and grinds away quietly.

Often, when it hits the end, it will seek back and keep going.  No clue why
it would do this.  This only happens with the mencoder generated mpeg4,
not with the OTA mpeg2ts.

> > I don't know if the problem is with mencoder or ffmpeg or both.
> > I don't recall seeing it crash.
> > 
> > Ffmpeg does crash from bad mpeg2ts input.  At least 2 different
> > problems resulting in seg fault and at least 1 floating point
> > exception.
> 
> Bugreports with backtraces, please.

http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/2006-March/008436.html

Putting in an ugly hack to avoid calling memset() with a negative length
prevents the crash.  Probably not the best way to fix it.

The bad input is of course copyrighted, attempts to cut out a small
enough piece to be considered fair use didn't get very far.

I still got seg faults from some other bug after "fixing" this one.

While some of the ffmpeg developers were helpful. others were ... not.
I got fed up, unsubscribed and switched to working on other problems
where I could actually make some progress.



More information about the MEncoder-users mailing list