I've got a couple of 1080p videos that I'd like to play in my Raspberry Pi (512 MB). This is part of a project I'm doing with a couple of friends. We built a server in Node.js and use a local client to connect to the server and to play these files at a given time.
Unfortunately, I've found out that many videos lag badly in Omxplayer. I have the latest Raspbian - hard-float, not using Xorg - overclocked to 1000MHz and giving the GPU 256MB of RAM didn't seen to help (I've since changed the speed to 950MHz, by the way).
Now, I understand that the Raspberry is somewhat limited but what surprises me is that videos such as this one (please ignore the header, I found the picture on Google Images) - a 100 MB MKV with a nominal bit rate of 40Mbps - runs better than some of the videos we're trying to play.
Here's the mediainfo output for the birds video:
General
Complete name : birds.mkv
Format : Matroska
Format version : Version 1
File size : 110 MiB
Duration : 23s 65ms
Overall bit rate : 39.9 Mbps
Writing application : x264
Writing library : Haali Matroska Writer b0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 4 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23s 65ms
Bit rate : 39.1 Mbps
Nominal bit rate : 42.0 Mbps
Width : 1 920 pixels
Height : 1 072 pixels
Display aspect ratio : 16:9
Frame rate : 23.976 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.792
Stream size : 107 MiB (98%)
Writing library : x264 core 60 r886M 1075536
Encoding settings : cabac=1 / ref=4 / deblock=1:-2:-2 / analyse=0x3:0x113 / me=umh / subme=6 / rdcmp=psy / brdo=1 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / chroma_qp_offset=0 / threads=6 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=1 / b_adapt=1 / b_bias=0 / direct=3 / wpredb=1 / bime=1 / keyint=250 / keyint_min=25 / scenecut=40(pre) / rc=abr / bitrate=42000 / ratetol=0.1 / rceq='blurCplx^(1-qComp)' / qcomp=1.00 / qpmin=2 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / pb_ratio=1.30 / aq=2:1.00
Language : English
Default : Yes
Forced : No
In comparison, here is the mediainfo output of a much smaller video (with a lower nominal bit rate) that lags much worse:
General
Complete name : F_AVANCADO
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 46.7 MiB
Duration : 1mn 21s
Overall bit rate mode : Constant
Overall bit rate : 4 798 Kbps
Encoded date : UTC 2012-05-08 14:20:20
Tagged date : UTC 2012-05-08 14:20:20
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : Yes
Format settings, ReFrames : 3 frames
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 1mn 21s
Bit rate mode : Constant
Bit rate : 20.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Standard : PAL
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.386
Stream size : 194 MiB
Language : English
Encoded date : UTC 2012-05-08 14:20:20
Tagged date : UTC 2012-05-08 14:20:20
Here's the output of another file that also lags a lot:
General
Complete name : F_CC_24
Format : MPEG-4
Format profile : Base Media / Version 2
Codec ID : mp42
File size : 9.92 MiB
Duration : 32s 0ms
Overall bit rate : 2 600 Kbps
Encoded date : UTC 2012-12-15 02:13:32
Tagged date : UTC 2012-12-15 02:13:32
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : [email protected]
Format settings, CABAC : No
Format settings, ReFrames : 2 frames
Format settings, GOP : M=2, N=24
Codec ID : avc1
Codec ID/Info : Advanced Video Coding
Duration : 32s 0ms
Bit rate : 2 597 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 25.000 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.050
Stream size : 9.91 MiB (100%)
Language : English
Encoded date : UTC 2012-12-15 02:13:06
Tagged date : UTC 2012-12-15 02:13:32
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
What's causing this? Shouldn't these smaller videos run much better than the huge Mkv?
Bonus question: All of these videos run great in OpenElec, but we didn't really wanted to use it because of all the client-side code we've already done.
What kind of demonry does OpenElec use in order to be able to play these files flawlessly?