Opened 16 years ago

Last modified 13 years ago

#1028 closed defect (worksforme)

mplayer libavformat/flvdec decodes improperly

Reported by: physhii@… Owned by: reimar
Priority: important Component: vd
Version: unspecified Severity: major
Keywords: Cc: diego@…, physhii@…, ivan.q.public@…
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

http://www.phyquality.net/mplayerflv.png
As you can see in the screenshot flvdec is havin' some problems. I've had other people I know complain about the same thing. I've no idea what is causing this.

Change History (17)

comment:1 by physhii@…, 16 years ago

Er, this is occurring on revision r26033.

comment:3 by physhii@…, 16 years ago

It happens with whatever flv file I attempt to play... I uploaded a file called "asian-commercials-are-weird.flv" - happens on this one too.

comment:4 by reimar, 16 years ago

No such problem here. Please provide the full MPlayer output when playing.
And are you really using IA64 (IA64 is Itanium, not Core*)? We unfortunately have very, very few testers for that.

comment:5 by physhii@…, 16 years ago

rep_platform: PC (IA64)PC (AMD64)

comment:6 by physhii@…, 16 years ago

Yeah, sorry. That was a misclick on my part... Here's what I'm using with my configure options...

--disable-tv-bsdbt848 --disable-vidix-external --disable-faad-external --disable-libcdio --language=en --charset=UTF-8 --disable-ftp --disable-libnut --disable-sortsub --disable-vstream --enable-mencoder --disable-gui --disable-xshape --enable-x11 --disable-xinerama --enable-xv --disable-pvr --disable-inet6 --disable-joystick --disable-lirc --disable-live --disable-radio --disable-radio-capture --disable-radio-v4l2 --enable-unrarexec --enable-rtc --enable-smb --enable-freetype --disable-tv-v4l1 --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-ladspa --disable-live --disable-pnm --disable-speex --disable-xanim --disable-libamr_nb --disable-libamr_wb --disable-libdca --disable-twolame --disable-toolame --disable-qtx --enable-real --realcodecsdir=/usr/lib64/codecs --disable-win32dll --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-dvbhead --disable-aa --disable-directfb --disable-fbdev --disable-ggi --disable-ivtv --disable-caca --disable-mga --disable-gl --enable-sdl --disable-svga --disable-vidix-internal --disable-tga --disable-zr --disable-xvmc --disable-arts --disable-esd --disable-jack --disable-nas --disable-openal --disable-ossaudio --disable-pulse --disable-mmxext --disable-3dnow --disable-3dnowext --enable-debug=3 --enable-sse --enable-sse2 --enable-mmx --disable-altivec

comment:7 by compn, 16 years ago

do mplayer -v -frames 1 file.flv
then copy and paste ALL mplayer output and put it here :)

comment:8 by physhii@…, 16 years ago

MPlayer dev-SVN-r26058 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU 6300 @ 1.86GHz (Family: 6, Model: 15, Stepping: 2)
MMX2 supported but disabled
CPUflags: MMX: 1 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX SSE SSE2
get_path('codecs.conf') -> '/home/phy/.mplayer/codecs.conf'
Reading /home/phy/.mplayer/codecs.conf: Can't open '/home/phy/.mplayer/codecs.conf': No such file or directory
Reading /usr/share/mplayer/codecs.conf: 117 audio & 240 video codecs
Configuration: --cc=x86_64-pc-linux-gnu-gcc --host-cc=x86_64-pc-linux-gnu-gcc --prefix=/usr --confdir=/usr/share/mplayer --datadir=/usr/share/mplayer --libdir=/usr/lib64 --enable-largefiles --enable-menu --enable-network --disable-nemesi --disable-tv-teletext --disable-dga1 --disable-dga2 --disable-tdfxfb --disable-tv-bsdbt848 --disable-vidix-external --disable-faad-external --disable-libcdio --language=en --charset=UTF-8 --disable-ftp --disable-libnut --disable-sortsub --disable-vstream --enable-mencoder --disable-gui --disable-xshape --enable-x11 --disable-xinerama --enable-xv --disable-pvr --disable-inet6 --disable-joystick --disable-lirc --disable-live --disable-radio --disable-radio-capture --disable-radio-v4l2 --enable-unrarexec --enable-rtc --enable-smb --enable-freetype --disable-tv-v4l1 --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-ladspa --disable-live --disable-pnm --disable-speex --disable-xanim --disable-libamr_nb --disable-libamr_wb --disable-libdca --disable-twolame --disable-toolame --disable-qtx --enable-real --realcodecsdir=/usr/lib64/codecs --disable-win32dll --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-dvbhead --disable-aa --disable-directfb --disable-fbdev --disable-ggi --disable-ivtv --disable-caca --disable-mga --disable-gl --enable-sdl --disable-svga --disable-vidix-internal --disable-tga --disable-zr --disable-xvmc --disable-arts --disable-esd --disable-jack --disable-nas --disable-openal --disable-ossaudio --disable-pulse --disable-mmxext --disable-3dnow --disable-3dnowext --enable-debug=3 --enable-sse --enable-sse2 --enable-mmx --disable-altivec
CommandLine: '-v' '-frames' '32' 'videos/asian-commercials-are-weird.flv'
init_freetype
Using MMX Optimized OnScreenDisplay
get_path('fonts') -> '/home/phy/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/phy/.mplayer/input.conf'
Can't open input config file /home/phy/.mplayer/input.conf: No such file or directory
Parsing input config file /usr/share/mplayer/input.conf
Input config file /usr/share/mplayer/input.conf parsed: 83 binds
get_path('asian-commercials-are-weird.flv.conf') -> '/home/phy/.mplayer/asian-commercials-are-weird.flv.conf'

Playing videos/asian-commercials-are-weird.flv.
get_path('sub/') -> '/home/phy/.mplayer/sub/'
[file] File size is 1292839 bytes
STREAM: [file] videos/asian-commercials-are-weird.flv
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
LAVF_check: flv format
libavformat file format detected.
==> Found video stream: 0
[lavf] Video stream found, -vid 0
======= VIDEO Format ======

biSize 41
biWidth 464
biHeight 348
biPlanes 0
biBitCount 0
biCompression 1177964630='VP6F'
biSizeImage 0

Unknown extra header dump: [4]
===========================
==> Found audio stream: 1
[lavf] Audio stream found, -aid 1
======= WAVE Format =======
Format Tag: 85 (0x55)
Channels: 2
Samplerate: 44100
avg byte/sec: 7000
Block align: 1
bits/sample: 16
cbSize: 0
==========================================================================
LAVF: 1 audio and 1 video streams found
LAVF: build 3409664
VIDEO: [VP6F] 464x348 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:44 fourcc:0x46365056 size:464x348 fps:30.00 ftime:=0.0333
get_path('sub/') -> '/home/phy/.mplayer/sub/'
X11 opening display: :0.0
vo: X11 color mask: FFFFFF (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1280x1024 with depth 24 and 32 bpp (":0.0" => local display)
[x11] Detected wm supports NetWM.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports STAYS_ON_TOP state.
[x11] Current fstype setting honours FULLSCREEN STAYS_ON_TOP ABOVE BELOW X atoms
[VO_XV] Could not grab port 280.
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 2046x2046
[vo] query(Planar YV12) -> 3
[ass] auto-open
[ass] Init
get_path('fonts') -> '/home/phy/.mplayer/fonts'
get_path('subfont.ttf') -> '/home/phy/.mplayer/subfont.ttf'
[ass] Updating font cache.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
INFO: libavcodec init OK!
Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash decoder)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
dec_audio: Allocating 4608 + 65536 = 70144 bytes for output buffer.
mp3lib: using SSE optimized decore!
MP3lib: init layer2&3 finished, tables done
MPEG 1.0, Layer III, 44100 Hz 56 kbit Joint-Stereo, BPF: 182
Channels: 2, copyright: No, original: No, CRC: No, emphasis: 0
AUDIO: 44100 Hz, 2 ch, s16le, 56.0 kbit/3.97% (ratio: 7000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
alsa-init: requested format: 44100 Hz, 2 channels, 9
alsa-init: using ALSA 1.0.14a
alsa-init: setup for 1/2 channel(s)
alsa-init: using device default
alsa-init: pcm opened in blocking mode
alsa-init: chunksize set to 1024
alsa-init: fragcount=16
alsa-init: got buffersize=65536
alsa-init: got period size 1024
alsa: 44100 Hz/2 channels/4 bpf/65536 bytes buffer/Signed 16 bit Little Endian
AO: [alsa] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: ALSA-0.9.x-1.x audio output
AO: Author: Alex Beregszaszi, Zsolt Barat <joy@…>
AO: Comment: under developement
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Starting playback...
Increasing filtered audio buffer size from 0 to 65536
[ffmpeg] aspect_ratio: 0.000000
VDec: vo config request - 464 x 348 (preferred colorspace: Planar YV12)
Trying filter chain: ass vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (464x348->464x348,flags=0,'MPlayer',0x32315659)
REQ: flags=0x437 req=0x0
VO: [xv] 464x348 => 464x348 Planar YV12
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@…> and others
Xvideo image format: 0x32595559 (YUY2) packed
Xvideo image format: 0x32315659 (YV12) planar
Xvideo image format: 0x59565955 (UYVY) packed
Xvideo image format: 0x30323449 (I420) planar
using Xvideo port 281 for hw scaling
[xv] dx: 0 dy: 0 dw: 464 dh: 348
* [ass] Allocating mp_image_t, 464x352x12bpp YUV planar, 244992 bytes
* [vo] Allocating mp_image_t, 464x348x12bpp YUV planar, 242208 bytes
Unicode font: 255 glyphs.
Unicode font: 255 glyphs.
[xv] dx: 0 dy: 0 dw: 464 dh: 348
* [ass] Allocating mp_image_t, 464x352x12bpp YUV planar, 244992 bytes
[VD_FFMPEG] DRI failure.0.036 ct: -0.000 0/ 0 ??% ??% ??,?% 0 0
* [ass] Exporting mp_image_t, 464x348x12bpp YUV planar, 242208 bytes
EOF code: 1 1.0 A-V: 0.008 ct: -0.000 0/ 0 11% 2% 0.6% 0 0

Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: mp3lib
Uninit video: ffmpeg
alsa-uninit: pcm closed
vo: uninit ...

Exiting... (End of file)

comment:9 by compn, 16 years ago

ahh i ran into this bug on my mac box...

comment:10 by compn, 16 years ago

ooh got something! this one works :

[cami:~/desktop] compn% mplayer 17475_InHousePortalVid2.flv
MPlayer dev-SVN-r26046-3.3 (C) 2000-2008 MPlayer Team
VIDEO: [VP6F] 640x512 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
Starting playback...
VDec: vo config request - 640 x 512 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x60dbb4]SwScaler: using unscaled yuv420p -> yuyv422 special converter
VO: [macosx] 640x512 => 640x512 Packed YUY2 [fs]
[VD_FFMPEG] DRI failure.0.416 ct: -0.003 0/ 0 ??% ??% ??,?% 0 0
A: 6.9 V: 6.3 A-V: 0.648 ct: -0.038 0/ 0 78% 20% 4.8% 0 0

this one does not!
MPlayer dev-SVN-r26046-3.3 (C) 2000-2008 MPlayer Team
AltiVec found
CPU: PowerPC

Playing /Volumes/E$/1burned/lowecountry_000_pt1_ASFIX_dl.flv.
libavformat file format detected.
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [VP6F] 480x360 0bpp 30.000 fps 0.0 kbps ( 0.0 kbyte/s)
Opening video filter: [scale]
Opening video filter: [eq]
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffvp6f] vfm: ffmpeg (FFmpeg VP6 Flash decoder)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16be, 96.0 kbit/6.80% (ratio: 12000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [macosx] 44100Hz 2ch s16be (2 bytes per sample)
Starting playback...
VDec: vo config request - 480 x 360 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
[swscaler @ 0x60dbb4]SwScaler: using unscaled yuv420p -> yuyv422 special converter
VO: [macosx] 480x360 => 480x360 Packed YUY2 [fs]
[VD_FFMPEG] DRI failure.0.465 ct: 0.001 0/ 0 ??% ??% ??,?% 0 0
A: 1.9 V: 1.7 A-V: 0.259 ct: 0.001 0/ 0 52% 21% 21.2% 0 0

comment:11 by compn, 16 years ago

my guess is that video height nondivisible by 16 causes weird problems

comment:12 by compn, 16 years ago

works fine in svn ffplay , so must be mplayer bug somewhere

comment:13 by compn, 16 years ago

ffmpeg flv decoder was changed
now it looks different, but still incorrect in mplayer

sample moved http://samples.mplayerhq.hu/FLV/asian-commercials-are-weird.flv

comment:14 by ivan.q.public@…, 15 years ago

Cc: ivan.q.public@… added

I can't access the screenshot originally posted, but I'm pretty sure I'm encountering this same bug on Mac OS X ppc. Image skewed beyond recognition and color stripes, right?

I have 8 examples that exhibit the bug, and many examples that don't.

Observations:

(1) The bug doesn't seem to have to do with height nondivisible by 16, because I have examples with heights 400 and 224 that cause the bug. Nor can I find any other width/height divisibility-by-power-of-2 condition that separates my examples into buggy/nonbuggy.

(2) The bug only seems to occur for files using the VP6F codec (but not all such files).

(3) Only one of my buggy examples causes similar problems in VLC (color stripes but no skewing); the rest work fine.

(4) ffmpeg svn reencodes all examples perfectly, thus (as already observed) the problem is definitely in mplayer.

(5) The bug doesn't actually occur until the third (in some cases fourth) frame. You can use the flags "-frames 5 -vo pnm" to get screenshots of this.

(6) The occurrence of the bug on the third frame is exactly when the message "[VD_FFMPEG] DRI failure" is printed. (This message is always printed when playing files with the VP6F codec, even ones that work fine, however.) You can verify this using "-frames 2" and "-frames 3".

Let me know if I can do any tests to help get this fixed.

comment:15 by ivan.q.public@…, 15 years ago

I tried commenting out the if clause in vd_ffmpeg.c that surrounds the part that prints the "DRI failure" message.

It makes the skewing go away!

But I'm still left with color stripes very similar to the ones I see in VLC (except VLC only does it on one example rather than all eight).

Well, it's not quite just color stripes, there are also weird jitters in the image. But the skewing is gone.

comment:16 by ivan.q.public@…, 15 years ago

I have a complete fix:

--- libmpcodecs/vd_ffmpeg.c.old 2009-05-11 09:43:19.000000000 -0400
+++ libmpcodecs/vd_ffmpeg.c 2009-05-11 09:46:16.000000000 -0400
@@ -248,7 +248,7 @@

if(vd_use_slices && (lavc_codec->capabilities&CODEC_CAP_DRAW_HORIZ_BAND) && !do_vis_debug)

ctx->do_slices=1;


  • if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ)

+ if(lavc_codec->capabilities&CODEC_CAP_DR1 && !do_vis_debug && lavc_codec->id != CODEC_ID_H264 && lavc_codec->id != CODEC_ID_INTERPLAY_VIDEO && lavc_codec->id != CODEC_ID_ROQ && lavc_codec->id != CODEC_ID_VP6F)

ctx->do_dr1=1;

ctx->b_age= ctx->ip_age[0]= ctx->ip_age[1]= 256*256*256*64;
ctx->ip_count= ctx->b_count= 0;

comment:17 by diego@…, 13 years ago

Owner: changed from r_togni@… to reimar
Resolution: worksforme
Status: newclosed, diego@biurrun.de

I cannot reproduce this on OS X PPC and I believe this was fixed. Reopen the bug if the problem still exists.

Note: See TracTickets for help on using tickets.