[MEncoder-users] What's the special about the I-frames in libavcodec?

Pepe rvm3000 at ya.com
Tue Oct 31 19:26:15 CET 2006


I have a dvd recorder Samsumg HR-725, with support for playing divx videos. 

It plays well the videos I created with mencoder using xvid. It also plays ok 
videos I downloaded from internet with DX50 fourcc (I think they are divx).

But if I use libavcodec then there's a strange effect: it seems the I-frames 
are not displayed, so the image is merging with the previous scene.

I also use the program avidemux to edit videos. This program has a mode call 
smart copy, it copies the original frames until it gets to a place I edited 
then it regenerates there the frames until the next I-frame. If I cut some 
frames right at the beginning of the video, obviously the first frame it has 
to create is a I-frame. If I edit a xvid video, when I play this edited video 
in the dvd recorder, the first frames (the ones created by avidemux) have the 
same problem I mentioned above. When the second I-frame is reached (an 
original one from xvid) the problem fixes and rest of the video looks ok.

I think avidemux uses ffmpeg for re-encoding the edited frames, and I think 
ffmpeg is something related to libavcodec, isn't it?

So I suppose there should be something special, something different in the 
I-frames that libavcodec creates. Is there any way to create I-frames more 
compatible with xvid or divx?

Here is an example of a command line I use for libavcodec:

mencoder -noodml -o test_av.avi \
  -oac copy \
  -ffourcc DX50 \
  -ovc lavc \
  -lavcopts 
vcodec=mpeg4:vbitrate=1033:mbd=2:vstrict=1:vpass=1:turbo:vqmax=4:v4mv:trell \
  -vf-add scale=608:464 -zoom -sws 9 \
  -vf-add harddup \
  -force-avi-aspect 4:3 \
  video2.avi

I tried several things. Setting fourcc to DIVX and XVID, use b-frames, remove 
the vstrict option (which I need for another dvd player), or using mpeg 
quantizers. No change at all.

Any ideas?

-- 
Pepe



More information about the MEncoder-users mailing list