FFmpeg bug: XviD plays with poor quality
#1
using the native xvid decoder instead of ffmpeg gets much better result in picture quality (edit: because ffmpeg has problems with qpel) however then you get the early/late/skipped frames issue (caused by packet bitstream?) instead:

Quote:edit the /mplayer/codecs.conf file with a text editor (ex. notepad) like this;

change:
Quote:videocodec ffodivx
info "ffmpeg mpeg-4"
status working
fourcc divx,divx
fourcc div1,div1 divx
fourcc mp4s,mp4s; iso mpeg-4 video v1
fourcc m4s2,m4s2
fourcc xvid,xvid,xvid,xvix
fourcc dx50,dx50,blz0 dx50
fourcc mp4v,mp4v
format 0x4
fourcc ump4
fourcc 3iv2,3iv2  ; 3ivx delta 4  
format 0x10000004  ; mpeg 4 es
driver ffmpeg
dll mpeg4;opendivx
out yv12,i420,iyuv
to
Quote:
videocodec ffodivx
info "ffmpeg mpeg-4"
status working
fourcc divx,divx
fourcc div1,div1 divx
fourcc mp4s,mp4s; iso mpeg-4 video v1
fourcc m4s2,m4s2
fourcc dx50,dx50,blz0 dx50
fourcc mp4v,mp4v
format 0x4
fourcc ump4
fourcc 3iv2,3iv2  ; 3ivx delta 4  
format 0x10000004  ; mpeg 4 es
driver ffmpeg
dll mpeg4;opendivx
out yv12,i420,iyuv



and then change:
Quote:videocodec xvid
info "xvid (mpeg-4)"
status working
fourcc divx,divx
fourcc xvid,xvid,xvid
format 0x4
driver xvid
out yv12
out i420
out yuy2
out uyvy
out yvyu
out bgr32,bgr24,bgr16,bgr15
dll "libxvidcore.a"
to:
Quote:  
videocodec xvid
info "xvid (mpeg-4)"
status working
fourcc xvid,xvid,xvid,xvix
fourcc divx,divx
format 0x4
driver xvid
out yv12
out i420
out yuy2
out uyvy
out yvyu
out bgr32,bgr24,bgr16,bgr15
dll "libxvidcore.a"



Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
#2
the xvid decoder looks better than ffmeg(when its not dropping frames), epseciallly on anime, a lot less artifacts, but its definetly way to buggy to use right now. its dropping a lot of frames on most of my videos especially older xvid encodes. a few newer encodes played without a noticable hitch, but not many. i switched back to using ffmeg to decode.

but it will be sweet when the devs iron out the bugs with the xvid decoder.
#3
i'm using the latest cvs build and notice when you enable to use the xvid instead of the ffmpeg decoder nothing happens when i click too play a video file.

i know the xvid decoder is slow but i thought i would point this bug out.
#4
no bug, it was removed to save memory
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
#5
Rainbow 
fyi, it now sounds as if the ffmpeg developers have found the root cause why the visual quality is poor on some xvid encoder files when use ffmpeg/libavcodec to decode it instead of using the native xvid codec, see: http://mplayerhq.hu/piperma....ml#3641 "[ffmpeg-devel] libavcodec: possible qpel decoding bug (marius the mad)", basically it seems like there is a bug in libavcodec qpel decoding (or rather lack of qpel decoding) which can be seen in players like mplayer (which xbmc uses), and also in ffdshow for windows pc's.  

Quote:frame 154 from 311564.avi, decoded by
libavcodec: http://img379.imageshack.us/my.php?image=154a2pp.png
xvid: http://img380.imageshack.us/my.php?image=154x2az.png

frame 283 from 311564.avi (i can't see any difference on this one), decoded by:
libavcodec: http://img380.imageshack.us/my.php?image=283a1ve.png
xvid: http://img380.imageshack.us/my.php?image=283x3qj.png

frame 597 from 311564.avi, decoded by:
libavcodec: http://img380.imageshack.us/my.php?image=597a1bc.png
xvid: http://img380.imageshack.us/my.php?image=597x2gz.png

frame 154 from 310058.avi sample, decoded by:
libavcodec: http://img284.imageshack.us/img284/6352/n154a7bm.png
xvid: http://img284.imageshack.us/img284/4498/n154x2mj.png

frame 283  from 310058.avi sample, decoded by:
libavcodec: http://img284.imageshack.us/img284/9566/n283a5ry.png
xvid: http://img140.imageshack.us/img140/5461/n283x1dg.png

frame 597  from 310058.avi sample, decoded by:
libavcodec: http://img140.imageshack.us/img140/1294/n597a9id.png
xvid: http://img140.imageshack.us/img140/2001/n597x0yf.png

i didn't use any postprocessing (apart from yv12->rgb32
convertion during decoding).

try to check it in a darkened room, possibly at night, the problem is very visible then. try increasing the gamma value. if you use kuickshow as image viewer you could press "g" four times to lighten the images up. then you will see that either libavcodec or xvid is faulty. btw. you can use gimp to show the difference between both images. the difference image won't be all black. increase the gamma value to brighten the differences.


my clips triggering this behaviour is available here (below 10 mb):
http://uploadhut.com/view.php/311564.avi (1000 frame clip encoded with only only qpel enabled)
http://uploadhut.com/view.php/310058.avi (encoded with qpel, gmc and mpeg quantizers)
the effect is extremely visible during the playback (much more so than in the screenshots).
so xvid files that haven't been encoded qpel don't have this very noticable image quality (noisy and muddy picture with clear artifacts).

i hope that the ffmpeg developers can find a solution to this and that the solution then get ported over to mplayer (before xbmc).
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
#6
Smile 
...fyi, it's my understanding that ffmpeg's problem in handling xvid qpel is also the cause of the early/late frames and dropped/skipped frames that this topic was opened for!
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
#7
early late as nada to do with that bug. also the improvement from that change is not going to be huge. but it will be an improvement.

also early late frame should not be any big issue. aslong as smoothing of the audioclock is enabled in settings, they should hardly have an effect.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
#8
when change the line "fourcc xvid,xvid,xvid,xvix" from ffodivx to xvid if buttom a in *.avi file --> total freeze of xbmc Shocked
#9
so don't change it.. this damn thread should be unstickied imho..
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image

Logout Mark Read Team Forum Stats Members Help
FFmpeg bug: XviD plays with poor quality0