Opened 9 years ago

Last modified 9 years ago

#2294 new defect

Some videos are not played correctly if ffmpeg is compiled with --disable-asm

Reported by: Honza Owned by: beastd
Priority: normal Component: libavcodec
Version: unspecified Severity: major
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description

Summary of the bug:

Some videos (multiple different ones) are not played correctly (video looks corrupted or black) in mplayer if ffmpeg is compiled with --disable-asm. Those videos can be played correctly with ffplay, vlc or gst-play. At least in one case it generates nice error messages. When ffmpeg is compiled normally, mplayer plays video normally.

I suspect the bug is actually in ffmpeg, but as I'm not able to reproduce it in ffmpeg directly ...

How to reproduce:

% mplayer -v NotWorkingVideo.avi
MPlayer 1.2.1-4.8.5 (C) 2000-2016 MPlayer Team
CPU vendor name: AuthenticAMD  max cpuid level: 1
CPU: AMD Athlon(tm) 64 Processor 3000+ (Family: 15, Model: 31, Stepping: 0)
extended cpuid-level: 24
extended cache-info: 33587520
Detected cache-line size is 64 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNowExt: 1 SSE: 1 SSE2: 1 SSE3: 0 SSSE3: 0 SSE4: 0 SSE4.2: 0 AVX: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowExt SSE SSE2 CMOV
get_path('codecs.conf') -> '/home2/hkmaly/.mplayer/codecs.conf'
Reading optional codecs config file /home2/hkmaly/.mplayer/codecs.conf: No such file or directory
Reading optional codecs config file /etc/mplayer/codecs.conf: No such file or directory
Using built-in default codecs.conf.
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home2/hkmaly/.mplayer/fonts'
Configuration: --cc=i686-pc-linux-gnu-gcc --host-cc=i686-pc-linux-gnu-gcc --prefix=/usr --bindir=/usr/bin --libdir=/usr/lib --confdir=/etc/mplayer --datadir=/usr/share/mplayer --mandir=/usr/share/man --disable-ffmpeg_a --disable-svga --disable-svgalib_helper --disable-ass-internal --disable-arts --disable-kai --disable-libopus --disable-libilbc --enable-networking --disable-joystick --disable-nemesi --disable-bl --disable-bluray --disable-ftp --disable-vcd --disable-fribidi --disable-libnut --disable-cdparanoia --charset=UTF-8 --disable-tv-bsdbt848 --disable-ivtv --disable-tv-v4l1 --disable-dvb --disable-pvr --disable-radio-v4l2 --disable-radio-bsdbt848 --disable-musepack --disable-libmpeg2-internal --disable-libbs2b --disable-libgsm --disable-librtmp --disable-pnm --disable-speex --disable-tga --disable-tremor --disable-libopenjpeg --disable-toolame --disable-qtx --disable-real --disable-win32dll --disable-yuv4mpeg --disable-zr --disable-mga --disable-xmga --disable-3dfx --disable-tdfxvid --disable-tdfxfb --disable-xvr100 --disable-esd --disable-jack --disable-ladspa --disable-nas --disable-pulse --enable-3dnow --enable-3dnowext --enable-mmx --enable-mmxext --enable-sse --enable-sse2 --disable-ssse3 --disable-altivec --enable-shm --disable-gui --disable-vesa --disable-vdpau --disable-xinerama --enable-menu --disable-vidix --disable-vidix-pcidb --enable-xvmc --with-xvmclib=XvMCW
CommandLine: '-v' 'NotWorkingVideo.avi'
Using nanosleep() timing
get_path('input.conf') -> '/home2/hkmaly/.mplayer/input.conf'
Reading optional input config file /home2/hkmaly/.mplayer/input.conf: No such file or directory
Parsing input config file /etc/mplayer/input.conf
Input config file /etc/mplayer/input.conf parsed: 92 binds
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.
get_path('NotWorkingVideo.avi.conf') -> '/home2/hkmaly/.mplayer/NotWorkingVideo.avi.conf'

Playing NotWorkingVideo.avi.
get_path('sub/') -> '/home2/hkmaly/.mplayer/sub/'
[file] File size is 409554 bytes
STREAM: [file] NotWorkingVideo.avi
STREAM: Description: File
STREAM: Author: Albeu
STREAM: Comment: based on the code from ??? (probably Arpi)
libavformat version 56.40.101 (external)
Configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc --cxx=i686-pc-linux-gnu-g++ --ar=i686-pc-linux-gnu-ar --optflags='-O2 -mtune=k8 -march=k6 -fomit-frame-pointer -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --enable-version3 --enable-version3 --enable-nonfree --disable-indev=jack --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --enable-doc --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --enable-lzma --enable-network --enable-openssl --enable-postproc --enable-libsmbclient --enable-ffplay --enable-sdl --disable-vaapi --disable-vdpau --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --enable-libcaca --enable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --enable-libgme --disable-libgsm --disable-libmodplug --enable-libopus --disable-libquvi --enable-librtmp --disable-libssh --enable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --enable-libzvbi --disable-libbs2b --disable-libflite --disable-frei0r --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --enable-libfaac --enable-libsnappy --enable-libtheora --enable-libtwolame --disable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop --enable-pic --disable-asm --cpu=k6
LAVF_check: AVI (Audio Video Interleaved)
AVI file format detected.
list_end=0x14C
======= AVI Header =======
us/frame: 41708  (fps=23.976)
max bytes/sec: 0
padding: 0
MainAVIHeader.dwFlags: (2320) HAS_INDEX IS_INTERLEAVED TRUST_CKTYPE
frames  total: 240   initial: 0
streams: 2
Suggested BufferSize: 0
Size:  720 x 304
==========================
list_end=0xD4
==> Found video stream: 0
[aviheader] Video stream found, -vid 0
====== STREAM Header =====
Type: vids   FCC: XVID (44495658)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 24000/1001 = 23.976
Start: 0   Len: 240
Suggested BufferSize: 3384
Quality 0
Sample size: 0
==========================
Found 'bih', 40 bytes of 40
======= VIDEO Format ======
  biSize 40
  biWidth 720
  biHeight 304
  biPlanes 1
  biBitCount 24
  biCompression 1145656920='XVID'
  biSizeImage 1313280
===========================
Regenerating keyframe table for MPEG-4 video.
list_end=0x14C
==> Found audio stream: 1
[aviheader] Audio stream found, -aid 1
====== STREAM Header =====
Type: auds   FCC:  (2000)
Flags: 0
Priority: 0   Language: 0
InitialFrames: 0
Rate: 32000/1024 = 31.250
Start: 0   Len: 313
Suggested BufferSize: 15360
Quality 0
Sample size: 1024
==========================
Found 'wf', 36 bytes of 18
======= WAVE Format =======
Format Tag: 8192 (0x2000)
Channels: 6
Samplerate: 48000
avg byte/sec: 32000
Block align: 1024
bits/sample: 0
cbSize: 18
Unknown extra header dump: [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] [0] 
==========================================================================
list_end=0x176
hdr=Software  size=21
Software  : MEncoder 1.2.1-4.8.5
list_end=0x62F6A
Found movie at 0x100C - 0x62F6A
Reading INDEX block, 262 chunks for 240 frames (fpos=405362).
AVI index offset: 0x1008 (movi=0x100C idx0=0x4 idx1=0x3C0C)
Auto-selected AVI audio ID = 1
Auto-selected AVI video ID = 0
AVI: Searching for audio stream (id:1)
AVI video size=78460 (240) audio size=320512 (313)
VIDEO:  [XVID]  720x304  24bpp  23.976 fps   62.7 kbps ( 7.7 kbyte/s)
Auto-selected AVI video ID = 0
Auto-selected AVI audio ID = 1
[V] filefmt:3  fourcc:0x44495658  size:720x304  fps:23.976  ftime:=0.0417
Clip info:
 Software: MEncoder 1.2.1-4.8.5
Load subtitles in ./
get_path('sub/') -> '/home2/hkmaly/.mplayer/sub/'
X11 opening display: :7
vo: X11 color mask:  FFFFFF  (R:FF0000 G:FF00 B:FF)
vo: X11 running at 1920x1080 with depth 24 and 32 bpp (":7" => local display)
[x11] Detected wm supports layers.
[x11] Detected wm supports NetWM.
[x11] Detected wm supports ABOVE state.
[x11] Detected wm supports BELOW state.
[x11] Detected wm supports FULLSCREEN state.
[x11] Detected wm supports STAYS_ON_TOP state.
[x11] Current fstype setting honours LAYER FULLSCREEN STAYS_ON_TOP ABOVE BELOW X atoms
[VO_XV] Using Xv Adapter #0 (NV Video Blitter)
[xv common] Drawing no colorkey.
[xv common] Maximum source image dimensions: 2046x2046
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
libavcodec version 56.60.100 (external)
Configuration: --prefix=/usr --libdir=/usr/lib --shlibdir=/usr/lib --mandir=/usr/share/man --enable-shared --cc=i686-pc-linux-gnu-gcc --cxx=i686-pc-linux-gnu-g++ --ar=i686-pc-linux-gnu-ar --optflags='-O2 -mtune=k8 -march=k6 -fomit-frame-pointer -pipe' --disable-static --enable-avfilter --enable-avresample --disable-stripping --enable-nonfree --enable-version3 --enable-version3 --enable-nonfree --disable-indev=jack --enable-version3 --enable-bzlib --disable-runtime-cpudetect --disable-debug --enable-doc --enable-gnutls --enable-gpl --enable-hardcoded-tables --enable-iconv --enable-lzma --enable-network --enable-openssl --enable-postproc --enable-libsmbclient --enable-ffplay --enable-sdl --disable-vaapi --disable-vdpau --enable-xlib --enable-libxcb --enable-libxcb-shm --enable-libxcb-xfixes --enable-zlib --disable-libcdio --disable-libiec61883 --disable-libdc1394 --enable-libcaca --enable-openal --enable-opengl --disable-libv4l2 --disable-libpulse --enable-libopencore-amrwb --enable-libopencore-amrnb --disable-libfdk-aac --disable-libopenjpeg --disable-libbluray --disable-libcelt --enable-libgme --disable-libgsm --disable-libmodplug --enable-libopus --disable-libquvi --enable-librtmp --disable-libssh --enable-libschroedinger --disable-libspeex --enable-libvorbis --enable-libvpx --enable-libzvbi --disable-libbs2b --disable-libflite --disable-frei0r --disable-libfribidi --disable-fontconfig --disable-ladspa --disable-libass --enable-libfreetype --disable-libsoxr --enable-pthreads --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libmp3lame --enable-libaacplus --enable-libfaac --enable-libsnappy --enable-libtheora --enable-libtwolame --disable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --disable-avx --disable-avx2 --disable-fma3 --disable-fma4 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-xop --enable-pic --disable-asm --cpu=k6
INFO: libavcodec init OK!
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
dec_audio: Allocating 1536000 + 131072 = 1667072 bytes for output buffer.
FFmpeg's libavcodec audio codec
INFO: libavcodec "ac3" init OK!
AUDIO: 48000 Hz, 2 ch, floatle, 256.0 kbit/8.33% (ratio: 32000->384000)
Selected audio codec: [ffac3] afm: ffmpeg (FFmpeg AC-3)
==========================================================================
Building audio filter chain for 48000Hz/2ch/floatle -> 0Hz/0ch/??...
[libaf] Adding filter dummy 
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[dummy] Was reinitialized: 48000Hz/2ch/floatle
Trying every known audio driver...
ao2: 48000 Hz  2 chans  floatle
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
OSS: Unknown/not supported internal format: floatle
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 2 channels (requested: 2)
audio_setup: using 48000 Hz samplerate (requested: 48000)
audio_setup: frags:   8/8  (8192 bytes/frag)  free:  65536
AO: [oss] 48000Hz 2ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 48000Hz/2ch/floatle -> 48000Hz/2ch/s16le...
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[libaf] Adding filter format 
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
[dummy] Was reinitialized: 48000Hz/2ch/floatle
[format] Changing sample format from little-endian 32-bit float to little-endian 16-bit signed int
[format] Accelerated little-endian 32-bit float to little-endian 16-bit signed int conversion
Starting playback...
[libaf] Reallocating memory in module format, old len = 0, new len = 65545
Increasing filtered audio buffer size from 0 to 65536
VDec: vo config request - 720 x 304 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO Config (720x304->720x304,flags=0,'MPlayer',0x32315659)
VO: [xv] 720x304 => 720x304 Planar YV12 
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> 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
Xvideo image format: 0x3 (   ) packed
using Xvideo port 63 for hw scaling
*** [vo] Allocating mp_image_t, 736x320x12bpp YUV planar, 353280 bytes
*** [vo] Allocating mp_image_t, 736x320x12bpp YUV planar, 353280 bytes
[mpeg4 @ 0xb5ff7800]Video uses a non-standard and wasteful way to store B-frames ('packed B-frames'). Consider using the mpeg4_unpack_bframes bitstream filter without encoding but stream copy to fix it.
[ffmpeg] aspect_ratio: 2.368421
VDec: vo config request - 720 x 304 (preferred colorspace: Planar YV12)
Trying filter chain: vo
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 2.37:1 - prescaling to correct movie aspect.
VO Config (720x304->720x304,flags=0,'MPlayer',0x32315659)
VO: [xv] 720x304 => 720x304 Planar YV12 
VO: Description: X11/Xv
VO: Author: Gerd Knorr <kraxel@goldbach.in-berlin.de> 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
Xvideo image format: 0x3 (   ) packed
using Xvideo port 63 for hw scaling
A:   0.2 V:   0.0 A-V:  0.177 ct:  0.000   2/  2 ??% ??% ??,?% 0 0 
*** [vo] Allocating mp_image_t, 736x320x12bpp YUV planar, 353280 bytes
A:   0.2 V:   0.1 A-V:  0.105 ct: -0.008   4/  4 ??% ??% ??,?% 2 0 
[VD_FFMPEG] DRI failure.
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.2 V:   0.2 A-V:  0.066 ct: -0.011   5/  5 ??% ??% ??,?% 2 0 
*** [vo] Exporting (slices) mp_image_t, 720x304x12bpp YUV planar, 328320 bytes
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.2 V:   0.3 A-V: -0.018 ct: -0.017   7/  7 ??% ??% ??,?% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.3 V:   0.3 A-V: -0.025 ct: -0.020   8/  8 ??% ??% ??,?% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.4 V:   0.4 A-V: -0.020 ct: -0.024  10/ 10 ??% ??% ??,?% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.4 V:   0.4 A-V: -0.018 ct: -0.026  11/ 11 ??% ??% ??,?% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.4 V:   0.5 A-V: -0.016 ct: -0.027  12/ 12 ??% ??% ??,?% 2 0 
XXX initial  v_pts=0.459  a_pos=30720 (0.960) 
A:   0.5 V:   0.5 A-V: -0.014 ct: -0.029  13/ 13 30% 13%  3.1% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
A:   0.5 V:   0.5 A-V: -0.013 ct: -0.030  14/ 14 28% 12%  3.0% 2 0 
[mpeg4 @ 0xb5ff7800]get_buffer() failed (stride changed)
Error while decoding frame!
...

Patches should be submitted to the mplayer-dev-eng mailing list and not this bug tracker.

Attachments (1)

NotWorkingVideo.avi (400.0 KB ) - added by Honza 9 years ago.
Beginning of the problematic video (more that enough to see the problem).

Download all attachments as: .zip

Change History (4)

by Honza, 9 years ago

Attachment: NotWorkingVideo.avi added

Beginning of the problematic video (more that enough to see the problem).

comment:1 by Honza, 9 years ago

Forgot to mention: the "Error while decoding frame!" are not present when the video plays correctly.

comment:2 by reimar, 9 years ago

I tried with --target=generic for MPlayer which should have the same effect.
But the issue is not reproducible with the latest version and included FFmpeg at least.
1.2.1 is the special release for old FFmpeg versions, so it would be a good idea to try a newer version of both MPlayer and FFmpeg.
That it's not reproducible with FFmpeg unfortunately doesn't mean much as FFmpeg doesn't really use the custom get_buffer MPlayer uses.
Might also want to try -nodr.

comment:3 by Honza, 9 years ago

Not sure what you mean with --target=generic. I'm using Gentoo, 1.2.1 is the last stable mplayer there and it's using external ffmpeg - can the problem be related to that? (Actually, isn't the fact it uses external ffmpeg included in the verbose output, along with configure flags for both ffmpeg and mplayer?)

What version of ffmpeg is considered old?

-nodr makes no difference.

I suppose that I want to use the version with asm anyway, as it's going to be considerably faster. But I'm surprised noone else is having same problem. If it's really the same issue as the first problematic video, it happened on two computers (although similarly configured) over multiple mplayer, ffmpeg and compiler versions. (I didn't really cared because the first video was not important, but the last one might be.)

Note: See TracTickets for help on using tickets.