Hello all
I'm experiencing a problem using the OpenGL video output driver when watching HD contents. The same problem is described in
this thread but it seems a solution was never found.
The only way, as far as I know, that I can get video playback without video tearing is by using the gl video output driver in mplayer.
Unfortunately, using this video output causes video playback to be too slow. The thing is, I don't understand why it is slow.
I have a fairly powerful CPU (Quad Core 2.83 GHz) and GPU (ATI Radeon HD 3870).
I can see when playing the video and monitoring CPU usage that it isn't the CPU that is the problem. It never gets to 100% CPU usage on either of the cores.
This is the command I'm using:
Code:
mplayer -vo gl -ao alsa -vc coreserver -cache 20000 -demuxer lavf -fs <file.ts>
Why is it so slow?
I've tried using the default demuxer, increasing cache size, the -nosound option but none of these things causes it to be able to keep up.
Here's the output of mplayer from running the above command:
Code:
rune@runescomp:~$ mplayer -vo gl -ao alsa -vc coreserver -cache 20000 -demuxer lavf -fs 1080p-test.ts
MPlayer dev-SVN-r28207-4.2.4 (C) 2000-2008 MPlayer Team
CPU: Intel(R) Core(TM)2 Quad CPU Q9550 @ 2.83GHz (Family: 6, Model: 23, Stepping: 7)
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2
129 audio & 259 video codecs
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.
Playing 1080p-test.ts.
Cache fill: 13.32% (2727936 bytes)
libavformat file format detected.
LAVF: Program 1
[lavf] Video stream found, -vid 0
[lavf] Audio stream found, -aid 1
VIDEO: [H264] 1920x1080 0bpp 23.976 fps 0.0 kbps ( 0.0 kbyte/s)
[gl] using extended formats. Use -vo gl:nomanyfmts if playback fails.
==========================================================================
Forced video codec: coreserver
Opening video decoder: [dshowserver] DirectShowServer video codecs
Opening device
Called unk_IsDebuggerPresent
len: 992
ProductVersion: 1.7.0
Decoder supports the following YUV formats: YUY2 UYVY YV12 I420
Decoder is capable of YUV output (flags 0x2b)
Setting fmt
Starting
Initialization is complete
Dshowserver Connected to host
VDec: vo config request - 1920 x 1080 (preferred colorspace: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4.
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
[swscaler @ 0x8d7d970]using unscaled yuv420p -> rgb32 special converter
VO: [gl] 1920x1080 => 1920x1080 BGRA [fs]
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
Found DirectShow filterSelected video codec: [coreserver] vfm: dshowserver (CoreAVC DShow H264 decoder 1.3 for x86 - http://corecodec.org/)
==========================================================================
==========================================================================
Opening audio decoder: [liba52] AC3 decoding with liba52
Using SSE optimized IMDCT transform
Using MMX optimized resampler
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
Selected audio codec: [a52] afm: liba52 (AC3-liba52)
==========================================================================
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
pts value <= previous: -0.757 ct: -0.004 0/ 0 ??% ??% ??,?% 1 0 91%
pts value <= previous: -0.679 ct: -0.017 0/ 0 ??% ??% ??,?% 2 0 88%
pts value <= previous: -0.587 ct: -0.029 0/ 0 23% 82% 5.1% 2 0 85%
pts value <= previous: -0.491 ct: -0.042 0/ 0 19% 81% 5.2% 2 0 81%
pts value <= previous: -0.395 ct: -0.054 0/ 0 17% 82% 4.8% 2 0 78%
pts value <= previous: -0.299 ct: -0.067 0/ 0 15% 82% 4.5% 2 0 75%
pts value <= previous: -0.153 ct: -0.071 0/ 0 15% 86% 5.0% 2 0 73%
pts value <= previous: -0.084 ct: -0.075 0/ 0 16% 91% 5.2% 2 0 72%
pts value <= previous: -0.023 ct: -0.079 0/ 0 16% 96% 5.5% 3 0 71%
pts value <= previous: 0.045 ct: -0.083 0/ 0 17% 101% 5.6% 4 0 70%
pts value <= previous: 0.104 ct: -0.088 0/ 0 17% 105% 5.9% 5 0 68%
pts value <= previous: 0.163 ct: -0.092 0/ 0 17% 109% 5.9% 6 0 68%
pts value <= previous: 0.222 ct: -0.096 0/ 0 18% 113% 6.2% 7 0 67%
pts value <= previous: 0.283 ct: -0.100 0/ 0 18% 118% 6.4% 8 0 66%
pts value <= previous: -0.006 ct: -0.108 0/ 0 14% 94% 5.0% 10 0 64%
A:2736.9 V:2735.9 A-V: 1.005 ct: -0.268 0/ 0 14% 116% 5.6% 50 0 49%
************************************************
**** 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 some of the lavdopts,
e.g. -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all.
- 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.
************736.7 A-V: 1.392 ct: -0.277 0/ 0 13% 118% 5.5% 69 0 49%
in-frames: 100 out-frames: 90
************
Destroying filter
Exiting... (Quit)