GNOME Bugzilla – Bug 705764
Low fps when playing 1080p video on Raspberry Pi Model B
Last modified: 2014-06-22 14:57:04 UTC
I'm trying to play the 1080p video (http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4) using the following pipeline: GST_DEBUG=2 gst-launch-1.0 filesrc location=/tmp/video.MP4 ! decodebin ! eglglessink I get a lot of frames dropped and see messages like: WARN omxvideodec gstomxvideodec.c:2003:gst_omx_video_dec_loop:<omxh264dec-omxh264dec0> Frame is too late, dropping (deadline 0:00:00.088929327) There is not such problem with playback when using omxplayer.
Can you check if it works better in a manual pipeline, e.g. filesrc location=video.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! queue ! eglglessink if it doesn't, can you check with top which of the queue threads is taking all the CPU time? Is the CPU actually used completely?
The following pipeline filesrc location=video.mp4 ! qtdemux ! queue ! h264parse ! omxh264dec ! queue ! eglglessink not works for me. It gives me the same messages in console but without displaying any video. CPU load in both cases is less then 50%. Here is a stat of CPU usage from top: 6.8 eglglessink-ren 5.8 ILCS_HOST 4.9 queue0:src 2.9 VCHIQ completio 1.9 queue1:src 1.0 gst-launch-1.0 1.0 qtdemux0:sink 1.0 omxh264dec-omxh 0.0 HDispmanx Notif 0.0 HTV Notify 0.0 HCEC Notify 0.0 gst-launch-1.0
Is it working better if you set "sync=false" on the sink? Maybe this is an IO related problem, and qtdemux IO read pattern is suboptimal. Could you add another queue in front of qtdemux to see if that helps (it goes to push mode then)?
Setting sync=false makes video plays more smoothly but it's like in slow motion. I'm using SD card class 10 so there should not be any problems with read speed.
Can you try if using latest git master of gst-omx and gst-plugins-bad helps?
I've already tried (v1.1.3 of gstreamer and gstreamer-plugins) but when I want to play video or even run "gst-launch-1.0 videotestsrc ! eglglessink" execution terminates with crash.
Created attachment 252875 [details] not enough resources for 1080p/omxvideodec/eglglessink
Hi, well here gst-launch-1.0 videotestsrc ! "video/x-raw, width=1920, height=1080" ! eglglessink is running (but slow as expected) About the 1080p video I experience also a pb: EGL_BAD_ALLOC egladaption gstegladaptation_egl.c:77:got_egl_error: EGL ERROR: eglCreateWindowSurface returned 0x3003 gst_omx_port_allocate_buffers_unlocked:<omxh264dec-omxh264dec0> Failed to allocate buffer for video_decode port 131: Insufficient resources (0x80001000) See attached log for gst-launch-1.0 souphttpsrc location=http://samplemedia.linaro.org/H264/big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4 ! qtdemux ! h264parse ! omxh264dec ! eglglessink Same result if not using EGLImage (for example by adding "video/x-raw, format=(string)I420" between omxh264dec and eglglessink) too many resources ? 4 buffers ?
Try changing the memory split to allocate more memory to the videocore (in /boot/config.txt).
Nice! It works with gpu_mem=128 :)
I can't make it work. Can you write your system configuration and how you build or where you download (in case of pre built binaries) gstreamer. Also posting config.txt here would also be fine.