omxplayer: recommended h.264 bitrate and encoding settings

4 posts
by artisticbokeh » Sat Nov 03, 2012 10:10 am
we just received six raspberry pi boards with 512mb ram and plan to use them for hdmi playout. initial tests were working great with omxplayer, but we are experiencing extreme stuttering issues for every h264 file that has a bitrate over 3mbits. after digging through the forum, i found that several people play 11mbit files or higher without any issues. i am wondering if overclocking of the rasp is really needed to get smooth playback or if there are any recommended encoding settings for files to play on the rasp?

our current setting:
- gpu split of 256/256
- latest raspbian from upgraded with apt-get dist-upgrade
- tried with sandisk extreme pro 32GB 95mb/s cards and with standard class 10 SD cards
- omxplayer from Build date: 23/10/2012 01:40 CEST
- omxplayer started from the console with audio passthrough; also tried with videoclips that have no audio track at all

here is one of the videos we are trying to play ... r_temp.mp4

also, we tried with various smaller bitrates. except h.264 ecoded in vbr with 3mbits all the videos stutter.
example videos that we want to play are on video and on youtube:

thanks for any help on how to get omxplayer to play decent video bitrates!
Posts: 2
Joined: Fri Nov 02, 2012 8:12 pm
by redhawk » Sat Nov 03, 2012 11:16 am
This clip plays fine using omxplayer however I was using my USB flash drive instead of SD Card.

Maybe your SD card isn't performing well or there are processes in the background accessing your memory card??

Have you tried another video encoder??

I use WinFF (ffmpeg) for encoding h.264 videos but I use frame quality encoding rather than fix rate encoding I find it creates smaller and more efficient files.

To use frame quality encoding with ffmpeg you need to use the "-crf" option i.e. -crf 25.0 or -crf 22.0 (lower values = better frame quality).

To re-encode videos (and copy audio) with WinFF try: -crf 22.0 -acodec copy -vcodec libx264 -flags +loop+mv4 -cmp 256 -me_range 16 -g 64 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -qmin 10 -qmax 51 -qdiff 4

Richard S.
User avatar
Posts: 2925
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1
by Wanderlei » Sat Nov 03, 2012 12:02 pm
Maybe try OpenELEC xbmc if you just want to play video.
Posts: 79
Joined: Tue Aug 21, 2012 2:01 pm
by Fixnode » Mon Nov 19, 2012 11:23 pm
Wanderlei wrote:Maybe try OpenELEC xbmc if you just want to play video.

FYI: omxplayer is the default player for XBMC
Posts: 12
Joined: Mon Sep 24, 2012 5:23 am