Opened 14 years ago

Last modified 13 years ago

#289 new defect

reimar's patch breaks dvb @720p

Reported by: divxero@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: normal
Keywords: Cc:
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:


reimar's patch from April 23rd in mplayer.c causes a bug for me with dvb://.

The bug causes the video to lag to a halt within seconds, showing the "system
too SLOW" banner. With Apr. 22nd's nightly tarball, this does not happen.

To be more specific, the bug only happens with live dvb:// content and only with
ATSC channels of the 720p [59.94fps] format. 1080i works 100% fine. If I record
the stream and play it with "mplayer foo.ts" everyhing is fine again, so this is
only in the capture portion of the code. Also if I add -nosound the bug does not
occur either, however i have no sound =)

There is virtaully no meaningful output but I'll post it anyway:

ben9:~/tmp$ mplayer dvb://WFXT -quiet -framedrop -cache 8192 -vo xvmc -vc
MPlayer dev-CVS-050426-00:00-3.4.3 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon MP/XP Thoroughbred (Family: 6, Stepping: 1)
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Playing dvb://WFXT.
code taken from dvbstream for mplayer v0.4pre1 - (C) Dave Chapman 2001
Released under the GPL.
Latest version available from
dvb_tune Freq: 575000000
Cache fill: 0.00% (0 bytes) Win32 LoadLibrary? failed to load: avisynth.dll,
/usr/lib/win32/avisynth.dll, /usr/local/lib/win32/avisynth.dll
TS file format detected.
PROBING UP TO 2000000, PROG: 3
VIDEO MPEG2(pid=49)AUDIO A52(pid=52) NO SUBS (yet)! PROGRAM N. 3
Opened TS demuxer, audio: 2000(pid 52), video: 10000002(pid 49)...POS=43616
VIDEO: MPEG2 1280x720 (aspect 3) 59.940 fps 19000.0 kbps (2375.0 kbyte/s)
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
AC3: 2.0 (stereo) 48000 Hz 384.0 kbit/s
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 384.0 kbit/25.00% (ratio: 48000->192000)
Selected audio codec: [a52] afm:liba52 (AC3-liba52)
vo: X11 running at 1680x1050 with depth 24 and 32 bpp (":0.0" => local display)
vo_xvmc: X-Video extension 2.2
vo_xvmc: X-Video MotionCompensation? Extension version 1.0
Forced video codec: ffmpeg12mc
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
vd_ffmpeg: XVMC accelerated codec
Selected video codec: [ffmpeg12mc] vfm:ffmpeg (FFmpeg MPEG-1/2 (XvMC))
Checking audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le...
AF_pre: 48000Hz/4ch/floatle
alsa-init: 1 soundcard found, using: plug:surround40
alsa: 48000 Hz/4 channels/16 bpf/262144 bytes buffer/Float 32 bit Little Endian
AO: [alsa] 48000Hz 4ch floatle (4 bps)
Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/4ch/floatle...
Starting playback...
vd_ffmpeg: XVMC accelerated MPEG2
trying pixfmt=0
VDec: vo config request - 1280 x 720 (preferred csp: MPEG1/2 Motion Compensation
and IDCT)
VDec: using MPEG1/2 Motion Compensation and IDCT as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xvmc] 1280x720 => 1280x720 MPEG1/2 Motion Compensation and IDCT
vo_xvmc: Port 177 grabed
vo_xvmc: Found matching surface with id=54434449 on 177 port at 0 adapter
vo_xvmc: Allocated Direct Context
vo_xvmc: data_blocks allocated
vo_xvmc: mv_blocks allocated
vo_xvmc: Motion Compensation context allocated - 8 surfaces
vo_xvmc: idct=1 unsigned_intra=0
vo_xvmc: looking for OSD support

Subpicture id 0x34344149

vo_xvmc: OSD support by additional frontend rendering

Your system is too SLOW to play this!

Possible reasons, problems, workarounds:

  • Most common: broken/buggy _audio_ driver
    • Try -ao sdl or use the OSS emulation of ALSA.
    • Experiment with different values for -autosync, 30 is a good start.
  • Slow video output
    • Try a different -vo driver (-vo help for a list) or try -framedrop!
  • Slow CPU
    • Don't try to play a big DVD/DivX on a slow CPU! Try -hardframedrop.
  • Broken file
    • Try various combinations of -nobps -ni -forceidx -mc 0.
  • Slow media (NFS/SMB mounts, DVD, VCD etc)
    • Try -cache 8192.
  • Are you using -cache to play a non-interleaved AVI file?
    • Try -nocache.

Read DOCS/HTML/en/video.html for tuning/speedup tips.
If none of this helps you, read DOCS/HTML/en/bugreports.html.

alsa-uninit: pcm closed

Exiting... (Quit)

After some help from nicodvb, he helped me narrow it down to reimar's patch.
Once I reverse it, everything works. Here is the patch:

diff -Naurb MPlayer-20050423/mplayer.c MPlayer-20050422/mplayer.c
--- MPlayer-20050423/mplayer.c 2005-04-22 20:28:10.000000000 +0200
+++ MPlayer-20050422/mplayer.c 2005-04-15 14:14:24.000000000 +0200
@@ -2143,9 +2143,9 @@



0, plugin flag

  • ao_data.samplerate,
  • ao_data.channels,
  • ao_data.format,0))){

+ force_srate?force_srate:ao_data.samplerate,
+ audio_output_channels?audio_output_channels:ao_data.channels,
+ audio_output_format?audio_output_format:ao_data.format,0))){

close codec

Attachments (2)

wrong.log (13.1 KB) - added by divxero@… 14 years ago.
bad test, ignore this..
mplayer.log (35.4 KB) - added by divxero@… 14 years ago.
-af surround, -ao alsa, bug reproduced

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by divxero@…

Another important note.. here is my .mplayer/config:

and I noticed that this doesn't happen with ao=oss, or at least doesn't happen
right away. (I couldn't get it to happen at all, but nicodvb thinks it will
happen eventually)

comment:2 Changed 14 years ago by reimar

There are several things you should do:
1) Give the output of mplayer when you add the -v switch, and also the output
for the case where it works (using diff on both might be interesting as well,
but I can do that myself *g*)
2) try without af=volnorm
3) try -ao oss

Changed 14 years ago by divxero@…

bad test, ignore this..

comment:3 Changed 14 years ago by divxero@…

comment:4 Changed 14 years ago by divxero@…

  • attachments.filename changed from mplayer_normal.log to wrong.log

comment:5 Changed 14 years ago by divxero@…

  • attachments.description changed from volnorm disabled, using vo=alsa to bad test, ignore this.., 1

Changed 14 years ago by divxero@…

-af surround, -ao alsa, bug reproduced

comment:6 Changed 14 years ago by divxero@…

comment:7 Changed 13 years ago by reimar

Please try again with latest CVS, and also see if adding channels=2 to the end
of the filter chain helps.

comment:8 Changed 13 years ago by diego@…

  • Owner changed from alex@… to Reimar.Doeffinger@…

Reimar, you should assign bugs that you are handling to yourself (and accept the

Note: See TracTickets for help on using tickets.