x264 file playback is too slow!
Hi, I'm running debian sid @ P4 2,3 GHz CPU. I encoded a raw DV file to x264 using the following command: mencoder -ovc x264 -oac mp3lame -aspect 4/3 -x264encopts subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b -lameopts q=0:preset=insane -vf pp=ci -o mencoder.mp4 dvgrab-001.dv Now when I try to play the file with mplayer, it's too slow and I get this message: ************************************************ **** Your system is too SLOW to play this! **** ************************************************ I tried all the recommendations like: -framedrop -nodouble -lavdopts skiploopfilter=all -nosound (with this option the slow CPU warning doesn't show up, but playback is still too slow) -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all I cut 10 secs out of the x264 file, so here I paste the link: http://s53.yousendit.com/d.aspx?id=0IUHBNNSVPXIA0DGYBMN7RNU27 Please help me out with this. why is the playback so slow? Did I do the encoding wrong or what's wrong with the playback? I don't think the CPU is too slow, and it's %95 idle before I play the file. thanks! long live mplayer + x264 _____________________________________________________________ Send an Online Greeting Card http://www.UltimateEcards.com Get your Free Patriotic Email account NOW! http://www.ProudAmericanEmail.com 100s of FREE email addresses ---> http://www.UltimateEmail.com
some one wrote:
Hi, I'm running debian sid @ P4 2,3 GHz CPU. I encoded a raw DV file to x264 using the following command: mencoder -ovc x264 -oac mp3lame -aspect 4/3 -x264encopts subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b -lameopts q=0:preset=insane -vf pp=ci -o mencoder.mp4 dvgrab-001.dv
Now when I try to play the file with mplayer, it's too slow and I get this message: ************************************************ **** Your system is too SLOW to play this! **** ************************************************ I tried all the recommendations like: -framedrop -nodouble -lavdopts skiploopfilter=all -nosound (with this option the slow CPU warning doesn't show up, but playback is still too slow) -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all
I cut 10 secs out of the x264 file, so here I paste the link: http://s53.yousendit.com/d.aspx?id=0IUHBNNSVPXIA0DGYBMN7RNU27
Please help me out with this. why is the playback so slow? Did I do the encoding wrong or what's wrong with the playback? I don't think the CPU is too slow, and it's %95 idle before I play the file.
thanks! long live mplayer + x264
I don't have any troubles playing that clip, CPU is around 35% on my AMD64 3500+. I'm not sure, but I think reducing frameref might lower the cpu usage... Just for the record, setting the output filename to .mp4 doesn't make it a mp4 file, only a miss-labled avi file. If you want to make a mp4 file, set -of rawvideo and -o video.264. then you can use MP4Box to make a mp4 file: MP4Box -fps 25 -add video.264 video.mp4 you will have to encode the audio separatly though...
Fredrik Eriksson wrote:
some one wrote:
Hi, I'm running debian sid @ P4 2,3 GHz CPU. I encoded a raw DV file to x264 using the following command: mencoder -ovc x264 -oac mp3lame -aspect 4/3 -x264encopts subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b -lameopts q=0:preset=insane -vf pp=ci -o mencoder.mp4 dvgrab-001.dv
Now when I try to play the file with mplayer, it's too slow and I get this message: ************************************************ **** Your system is too SLOW to play this! **** ************************************************ I tried all the recommendations like: -framedrop -nodouble -lavdopts skiploopfilter=all -nosound (with this option the slow CPU warning doesn't show up, but playback is still too slow) -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all
I cut 10 secs out of the x264 file, so here I paste the link: http://s53.yousendit.com/d.aspx?id=0IUHBNNSVPXIA0DGYBMN7RNU27
Please help me out with this. why is the playback so slow? Did I do the encoding wrong or what's wrong with the playback? I don't think the CPU is too slow, and it's %95 idle before I play the file.
thanks! long live mplayer + x264
I don't have any troubles playing that clip, CPU is around 35% on my AMD64 3500+. I'm not sure, but I think reducing frameref might lower the cpu usage...
Just for the record, setting the output filename to .mp4 doesn't make it a mp4 file, only a miss-labled avi file. If you want to make a mp4 file, set -of rawvideo and -o video.264. then you can use MP4Box to make a mp4 file:
MP4Box -fps 25 -add video.264 video.mp4
you will have to encode the audio separatly though...
___
How do you get mencoder to output the audio in a format another audio encoder can use? mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav is not usable by oggenc for example. Raphael
Raphael wrote:
How do you get mencoder to output the audio in a format another audio encoder can use?
mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav
is not usable by oggenc for example.
That's because it's not really a wave file, even though you call it one. It's still an avi file. $ mplayer k3b_image.iso -ao pcm:file=k3b.wav \ -vc null -vo null -benchmark -Corey
Corey Hickey wrote:
Raphael wrote:
How do you get mencoder to output the audio in a format another audio encoder can use?
mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav
is not usable by oggenc for example.
That's because it's not really a wave file, even though you call it one. It's still an avi file.
$ mplayer k3b_image.iso -ao pcm:file=k3b.wav \ -vc null -vo null -benchmark
-Corey
Thanks. I tried that method first but it has two problems. 1) I don't see how to do the equivalent of -endpos 120 and/join 2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc. and then says my system is too slow to play the file! Raphael ------------------------------------------------------------------------ MPlayer dev-CVS-060212-08:34-3.4.4 (C) 2000-2006 MPlayer Team CPU: Advanced Micro Devices Athlon 64 Newcastle,Winchester,San Diego,Venice; Sempron Palermo 1790 MHz (Family: 15, Stepping: 0) CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1 Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2 get_path('codecs.conf') -> '/home/raph/.mplayer/codecs.conf' Reading /home/raph/.mplayer/codecs.conf: 91 audio & 205 video codecs CommandLine: '-v' 'k3b_image.iso' '-ao' 'pcm:file=k3b.wav' '-vc' 'null' '-vo' 'null' '-benchmark' init_freetype get_path('font/font.desc') -> '/home/raph/.mplayer/font/font.desc' Font /home/raph/.mplayer/font/font.desc loaded successfully! (206 chars) Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts. Using nanosleep() timing get_path('input.conf') -> '/home/raph/.mplayer/input.conf' Can't open input config file /home/raph/.mplayer/input.conf: No such file or directory Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory Falling back on default (hardcoded) input config get_path('k3b_image.iso.conf') -> '/home/raph/.mplayer/k3b_image.iso.conf' Playing k3b_image.iso. get_path('sub/') -> '/home/raph/.mplayer/sub/' [file] File size is 4148838400 bytes STREAM: [file] k3b_image.iso STREAM: Description: File STREAM: Author: Albeu STREAM: Comment: based on the code from ??? (probably Arpi) Checking for YUV4MPEG2 ASF_check: not ASF guid! Checking for NuppelVideo Checking for REAL Checking for SMJPEG Searching demuxer type for filename k3b_image.iso ext: .iso Checking for Nullsoft Streaming Video Checking for MOV Checking for VIVO header block 1 size: 0 Checking for PVA Checking for MPEG-TS... THIS DOESN'T LOOK LIKE AN MPEG-TS FILE! TRIED UP TO POSITION 33216, FOUND 0, packet_size= 0, SEEMS A TS? 0 Checking for LMLM4 Stream Format Invalid packet in LMLM4 stream: ch=0 size=-8 LMLM4 Stream Format not found system stream synced at 0x9200D (598029)! ==> Found video stream: 0 ==> Found audio stream: 128 MPEG Stream reached EOF ds_fill_buffer: EOF reached (stream: video) MPEG-PS file format detected. Searching for sequence header... OK! VIDEO: MPEG2 720x576 (aspect 2) 25.000 fps 8800.0 kbps (1100.0 kbyte/s) [V] filefmt:2 fourcc:0x10000002 size:720x576 fps:25.00 ftime:=0.0400 get_path('sub/') -> '/home/raph/.mplayer/sub/' get_path('default.sub') -> '/home/raph/.mplayer/default.sub' ========================================================================== Opening audio decoder: [liba52] AC3 decoding with liba52 dec_audio: Allocating 3840 bytes for input buffer. dec_audio: Allocating 6144 + 65536 = 71680 bytes for output buffer. Using SSE optimized IMDCT transform AC3: 2.0 (stereo) 48000 Hz 224.0 kbit/s A52 flags before a52_frame: 0x2A A52 flags after a52_frame: 0x2 Using MMX optimized resampler AUDIO: 48000 Hz, 2 ch, s16le, 224.0 kbit/14.58% (ratio: 28000->192000) Selected audio codec: [a52] afm: liba52 (AC3-liba52) ========================================================================== ========================================================================== Forced video codec: null Opening video decoder: [null] Null video decoder VDec: vo config request - 720 x 576 (preferred colorspace: BGR 24-bit) Trying filter chain: vo VDec: using Planar YV12 as output csp (no 0) Movie-Aspect is 1.33:1 - prescaling to correct movie aspect. VO Config (720x576->768x576,flags=0,'MPlayer',0x32315659) VO: [null] 720x576 => 768x576 Planar YV12 VO: Description: Null video output VO: Author: Aaron Holtzman <aholtzma@ess.engr.uvic.ca> Selected video codec: [null] vfm: null (NULL codec (no decoding!)) ========================================================================== Building audio filter chain for 48000Hz/2ch/s16le -> 0Hz/0ch/??... [libaf] Adding filter dummy [dummy] Was reinitialized: 48000Hz/2ch/s16le [dummy] Was reinitialized: 48000Hz/2ch/s16le [AO PCM] File: k3b.wav (WAVE) PCM: Samplerate: 48000Hz Channels: Stereo Format s16le [AO PCM] Info: Faster dumping is achieved with -vc null -vo null [AO PCM] Info: To write WAVE files use -ao pcm:waveheader (default). AO: [pcm] 48000Hz 2ch s16le (2 bytes per sample) AO: Description: RAW PCM/WAVE file writer audio output AO: Author: Atmosfear Building audio filter chain for 48000Hz/2ch/s16le -> 48000Hz/2ch/s16le... [dummy] Was reinitialized: 48000Hz/2ch/s16le [dummy] Was reinitialized: 48000Hz/2ch/s16le Starting playback... [...] ************************************************ **** 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. [...]
Raphael wrote:
Corey Hickey wrote:
Raphael wrote:
How do you get mencoder to output the audio in a format another audio encoder can use?
mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav
is not usable by oggenc for example.
That's because it's not really a wave file, even though you call it one. It's still an avi file.
$ mplayer k3b_image.iso -ao pcm:file=k3b.wav \ -vc null -vo null -benchmark
Thanks. I tried that method first but it has two problems.
1) I don't see how to do the equivalent of -endpos 120
Add '-frames X', where X is '<FPS of source file> * 120'.
and/join
2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc.
No, I don't see where it does that. The only messages I see involving the word 'null' are standard, unremarkable (if overly verbose) status information. The only complaining messages I see in the initialization section are the ones involving trying to detect various container formats and failing on the first several (which makes sense, since the file isn't in any of those formats). The only message I see in the initialization section which you might - or might not - want to pay any attention to is the informational one about the "waveheader" suboption.
and then says my system is too slow to play the file!
This is quite strange, since with '-vo null' and '-vc null' you have eliminated two of the biggest CPU-hogging parts of playback. The only remaining plausible cause I can think of offhand is slow media - in other words, that the drive you are reading the file from is not providing the data to MPlayer quickly enough, and MPlayer's internal buffers are emptying out. To work around this, the only thing I know of which you can do which is not too complicated for me to go over on a mailing list is play around with the '-cache' option.
************************************************ **** Your system is too SLOW to play this! **** ************************************************
Possible reasons, problems, workarounds: - Most common: broken/buggy _audio_ driver
This is no longer remotely true. (There has been discussion of revamping and/or removing this "system too slow" message, but nothing has ever gotten very far.) The most common reason by far, in my experience (both playing things for myself and reading others' reports) is:
- 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.
this. The second most common, of course, is "slow CPU", but as I've noted above that doesn't seem likely to be the case here. -- The Wanderer Warning: Simply because I argue an issue does not mean I agree with any side of it. Secrecy is the beginning of tyranny.
1) I don't see how to do the equivalent of -endpos 120
Add '-frames X', where X is '<FPS of source file> * 120'.
Thanks.
and/join
2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc.
No, I don't see where it does that.
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null I see now that this is simply confusing rather than wrong :)
The only messages I see involving the word 'null' are standard, unremarkable (if overly verbose) status information. The only complaining messages I see in the initialization section are the ones involving trying to detect various container formats and failing on the first several (which makes sense, since the file isn't in any of those formats). The only message I see in the initialization section which you might - or might not - want to pay any attention to is the informational one about the "waveheader" suboption.
and then says my system is too slow to play the file!
This is quite strange, since with '-vo null' and '-vc null' you have eliminated two of the biggest CPU-hogging parts of playback. The only remaining plausible cause I can think of offhand is slow media - in other words, that the drive you are reading the file from is not providing the data to MPlayer quickly enough, and MPlayer's internal buffers are emptying out. To work around this, the only thing I know of which you can do which is not too complicated for me to go over on a mailing list is play around with the '-cache' option. Well.. it is really very odd as
a) This file is on my hard drive b) I can play the file normally in mplayer without getting any speed warnings c) mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav decodes the entire dvd sized file in minutes without any warnings. Raphael
Raphael wrote:
1) I don't see how to do the equivalent of -endpos 120
Add '-frames X', where X is '<FPS of source file> * 120'.
Thanks.
and/join
2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc.
No, I don't see where it does that.
[AO PCM] Info: Faster dumping is achieved with -vc null -vo null
I see now that this is simply confusing rather than wrong :)
The only messages I see involving the word 'null' are standard, unremarkable (if overly verbose) status information. The only complaining messages I see in the initialization section are the ones involving trying to detect various container formats and failing on the first several (which makes sense, since the file isn't in any of those formats). The only message I see in the initialization section which you might - or might not - want to pay any attention to is the informational one about the "waveheader" suboption.
and then says my system is too slow to play the file!
This is quite strange, since with '-vo null' and '-vc null' you have eliminated two of the biggest CPU-hogging parts of playback. The only remaining plausible cause I can think of offhand is slow media - in other words, that the drive you are reading the file from is not providing the data to MPlayer quickly enough, and MPlayer's internal buffers are emptying out. To work around this, the only thing I know of which you can do which is not too complicated for me to go over on a mailing list is play around with the '-cache' option.
Well.. it is really very odd as
a) This file is on my hard drive b) I can play the file normally in mplayer without getting any speed warnings c) mencoder k3b_image.iso -oac pcm -ovc frameno -endpos 120 -o k3b.wav
decodes the entire dvd sized file in minutes without any warnings.
Ahem... I meant mencoder k3b_image.iso -oac pcm -ovc frameno -o k3b.wav decodes the entire dvd sized file in minutes without any warnings. Raphael
The Wanderer wrote:
2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc.
No, I don't see where it does that.
The only messages I see involving the word 'null' are standard, unremarkable (if overly verbose) status information. The only complaining messages I see in the initialization section are the ones involving trying to detect various container formats and failing on the first several (which makes sense, since the file isn't in any of those formats). The only message I see in the initialization section which you might - or might not - want to pay any attention to is the informational one about the "waveheader" suboption.
and then says my system is too slow to play the file!
This is quite strange, since with '-vo null' and '-vc null' you have eliminated two of the biggest CPU-hogging parts of playback. The only remaining plausible cause I can think of offhand is slow media - in other words, that the drive you are reading the file from is not providing the data to MPlayer quickly enough, and MPlayer's internal buffers are emptying out. To work around this, the only thing I know of which you can do which is not too complicated for me to go over on a mailing list is play around with the '-cache' option.
I just tested it, and, now that you mention it, it does seem rather slow. MPlayer isn't using much CPU time or stressing the disk much. Since oggenc doesn't need to seek, though, you can use a fifo and generally be much more efficient about it. $ mkfifo audio.fifo $ oggenc audio.fifo -o audio.ogg At this point, oggenc will hang until audio.fifo gets written to. Switch to another terminal and run $ mplayer -ao pcm:file=audio.fifo .... That'll save you some file-writing overhead, lots of disk space, and some time. -Corey
Add '-frames X', where X is '<FPS of source file> * 120'.
This options seems to be broken (unless I made a dumb mistake). I did mplayer -frames 3000 k3b_image.iso -ao pcm:file=k3b.wav -vc null -vo null -benchmark and it carried on encoding way past 120 seconds until I killed it. The film is 25 fps. Also, from a later post I think that this method is generally buggy (slow and complaining for no reason while not stressing cpu or disk). Raphael
On Sat, 25 Mar 2006 15:35:44 +0000 Raphael <mencoder@lesshaste.plus.com> wrote:
mplayer -frames 3000 k3b_image.iso -ao pcm:file=k3b.wav -vc null -vo null -benchmark
-frames doesn't work with -vc null
Hi, On Wed, Mar 22, 2006 at 09:46:41PM +0000, Raphael wrote:
That's because it's not really a wave file, even though you call it one. It's still an avi file.
$ mplayer k3b_image.iso -ao pcm:file=k3b.wav \ -vc null -vo null -benchmark [...]
Corey Hickey wrote: 2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc. and then says my system is too slow to play the file!
No idea about the message, but against the "runs very slowly", try the attached patch and use the "fast" suboption for -ao pcm. Greetings, Reimar Döffinger
Reimar Döffinger wrote:
Hi, On Wed, Mar 22, 2006 at 09:46:41PM +0000, Raphael wrote:
Corey Hickey wrote:
That's because it's not really a wave file, even though you call it one. It's still an avi file.
$ mplayer k3b_image.iso -ao pcm:file=k3b.wav \ -vc null -vo null -benchmark
[...]
2) It runs very slowly and is generally rather odd. Here is the full mplayer -v output attached. See how it complains that I don't have -vo null etc. and then says my system is too slow to play the file!
No idea about the message, but against the "runs very slowly", try the attached patch and use the "fast" suboption for -ao pcm.
------------------------------------------------------------------------
Index: libao2/ao_pcm.c =================================================================== RCS file: /cvsroot/mplayer/main/libao2/ao_pcm.c,v retrieving revision 1.31 diff -u -r1.31 ao_pcm.c --- libao2/ao_pcm.c 9 Feb 2006 14:07:54 -0000 1.31 +++ libao2/ao_pcm.c 25 Mar 2006 20:32:10 -0000 @@ -27,6 +27,7 @@
static char *ao_outputfilename = NULL; static int ao_pcm_waveheader = 1; +static int fast = 0;
#define WAV_ID_RIFF 0x46464952 /* "RIFF" */ #define WAV_ID_WAVE 0x45564157 /* "WAVE" */ @@ -83,6 +84,7 @@ opt_t subopts[] = { {"waveheader", OPT_ARG_BOOL, &ao_pcm_waveheader, NULL}, {"file", OPT_ARG_MSTRZ, &ao_outputfilename, NULL}, + {"fast", OPT_ARG_BOOL, &fast, NULL}, {NULL} }; // set defaults @@ -179,7 +181,7 @@ static int get_space(void){
if(vo_pts) - return ao_data.pts < vo_pts ? ao_data.outburst : 0; + return ao_data.pts < vo_pts + fast * 30000 ? ao_data.outburst : 0; return ao_data.outburst; }
Thanks. That seems to have sped it up. time mplayer -frames 3000 k3b_image.iso -ao pcm:file=k3b.wav -vo null -benchmark real 0m21.526s user 0m0.060s sys 0m0.032s time mplayer -frames 3000 k3b_image.iso -ao pcm:file=k3b.wav:fast -vo null -benchmark real 0m1.894s user 0m0.944s sys 0m0.172s -vc dummy is still broken of course and the warning messages still appear :) Cheers, Raphael
On Wed, Mar 22, 2006 at 11:36:36AM -0800, some one wrote:
Hi, I'm running debian sid @ P4 2,3 GHz CPU. I encoded a raw DV file to x264 using the following command: mencoder -ovc x264 -oac mp3lame -aspect 4/3 -x264encopts subq=6:4x4mv:8x8dct:me=3:frameref=5:bframes=3:b_pyramid:weight_b -lameopts q=0:preset=insane -vf pp=ci -o mencoder.mp4 dvgrab-001.dv
Now when I try to play the file with mplayer, it's too slow and I get this message: ************************************************ **** Your system is too SLOW to play this! **** ************************************************
This is sort of a FAQ. H.264 decoding is at least several times slower than most other stuff you're used to. You just have to deal with it. Downscaling helps. So does reducing the bitrate, and either don't set qcomp extremely high, or (probably worse quality) set some vbv_maxrate that you can handle. Other than that, your best option is to just use another codec. The only option you're using that might have a significant impact on speed is 4x4mv. But it will still have only a very small effect. You can disable CABAC, but then I doubt x264 will be more efficient than xvid or lavc's mpeg4, and it'll still be much slower than either of them.
participants (8)
-
Corey Hickey -
Fredrik Eriksson -
Jeff Clagg -
Raphael -
RC -
Reimar Döffinger -
some one -
The Wanderer