high bitrate video solution, almost

hello,

 

i have been plagued by a stutter on some high bitrate video files. this, despite taking out the dts-hdma audio stream that seems to cause problems. so, i started to look into overclocking...

 

this improved the situation, but after playing for some time the file would start to stutter again (and rasplex would become basically un-responsive). so i looked into over-clocking.

 

the temperature of the rpi stayed around 62c, but i noticed that the cpu frequency would drop back to 700 mhz, and stay stuck there during the stutter despite being overclocked to 950 mhz.

 

i think the  ondemand governer is dropping the cpu frequency during a 'lull' and then it never comes back because of the stutter. the ondemand up_threshold is 95% cpu by default, so i dropped it down to 60%. et voilà, no stutter !

 

unfortunately, this change is lost at every reboot. i read somewhere that a rc.local file could be created with "echo 50 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold" in /etc. but i can not get access to this directory (it is read only).

 

i also tried inserting this command into autostart.sh, but when i check it has either not worked, or been overwritten.

 

what do you think. and how can i make the threshold change persist ?

 

 

- scott

aha !

solved it by adding the following in autostart.sh :

modprobe cpufreq_ondemand

i will see how it behaves this weekend. if anyone has a simple way to output cpu load, i'm interested.

- scott

...So how did it work out? The stuttering is an inconvenience I've experieced, and is one of the things keeping me from making a Rasplex unit available to the rest of the family. Whenever I put something out for everyone else to use, they somehow expect me to fix anything that doesn't work :)

hello,

i've had almost no stutter. i put the up threshold at 60 because at 50 it seemed like it jumped around too much.

i also set the sampling factor (/sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor) to 25.

when i watch the cpu frequency it still goes down to the lower limit sometimes, and i believe that this is the danger. 

keep experimenting !

- scott

why not just use the force_turbo setting?

why not just use the force_turbo setting?

yes,

or use the 'performance' governor. i've been trying to avoid having the rpi run flat-out all the time...

it would be great if we could do this dynamically when video play-back started.

- scott

yes,

or use the 'performance' governor. i've been trying to avoid having the rpi run flat-out all the time...

it would be great if we could do this dynamically when video play-back started.

- scott

it works great with dynamic overclock on my pi with rasplex.

hmm i set mine to forced turbo and its still stuttering at 720p 4,5Mb/s h264 + AC3 448kb/s. The CPU jumps constantly to 100%...

edit: i got the cache set to 30% and it decreases by 10MB in 20 seconds.

edit: i checked it via ssh and the cpu only runs at 700 MHz. Could you upload your config file?

My config.
 
arm_freq=950
core_freq=450
sdram_freq=450
over_voltage=1
hdmi_force_hotplug=1
hdmi_drive=2
gpu_mem_256=100
gpu_mem_512=200
decode_MPG2=
decode_WVC1=
hdmi_force_edid_audio=1

So i got it running at 950 MHz now, set the up_threshold to 50 but it is still running at 100% with  2,94 Mb/s h.264 720p file. Even tho i buffered 25% i can not watch a single episode without stuttering.

edit: is there a reason why we are not overclocking core_freq instead of gpu_freq and or h264_freq? Now running at 1GHz and 500MHz for the core, still running at 100%

Hi.

I also have problems with stuttering.

I dont really understand how you change the values in 

/sys/devices/system/cpu/cpufreq/ondemand/up_threshold and /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

Do you make a autostart.sh file and add config here? If so could you please upload the config inside these files?

Ok, i think my problem is my WiFi Dongle. I got a 300Mbit dongle, with 100% signal strength, but my cpu runs at 100% according to rasplex. If i connect via LAN it is working flawless at <80%. I will now get myself this Powerlan set: http://www.amazon.de/gp/product/B0041JKGW8/ref=noref?ie=UTF8&psc=1&s=computers

edit: so how does your autostart.sh look like?

i created it using the openelec wiki:

echo "#!/bin/sh" > /storage/.config/autostart.sh && chmod +x /storage/.config/autostart.sh

Ok.
But what have you written inside the autostart.sh file?

aha !

solved it by adding the following in autostart.sh :

modprobe cpufreq_ondemand

i will see how it behaves this weekend. if anyone has a simple way to output cpu load, i'm interested.

- scott

but i have no idea if that is all i have to write into it and if it works...

So i tried powerlan, got a total of 13Mbit/s :( Now i ordered two WLAN Bridges Netgear and TP-LINK and a Netgear N300 Micro dongle.

On my laptop i got 80Mbit via WLAN. 

hi,

my autostart.sh looks like this :

#!/bin/sh


modprobe cpufreq_ondemand
echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 55 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold
echo 100 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor

 
it sets new values for up_threshold and sampling_down_factor. i hope this helps...
 
 
- scott

So i tried powerlan, got a total of 13Mbit/s :( Now i ordered two WLAN Bridges Netgear and TP-LINK and a Netgear N300 Micro dongle.

On my laptop i got 80Mbit via WLAN. 

you can`t compare your pi and laptop, your laptop has a lot more cpu power, more memory, faster disk and so on. the network is based on the usb 2 controller on the pi which delivers bandwidth to network, usb and sd card. that means that everything has about 400 mb/s to share.

Just finished setting up Rasplex on B-version 512MB. Setup went nicely following the instructions. Had zero problems and the system was fully functional after completing the initial Rasplex setup wizard.

But it seems like the current version cannot handle high bit rate (~10Mbps) 1080p movies at all. 720p movies play (~4Mbps) fine with no evident problems but 1080p movies simply start to stutter and go off lip-sync in about 1 minutes into the movie. My pie is connected through wired connection.

Most of my movies are BR rips with bitrates 8+ Mbps and some go beyond 20Mbps. I have no problems using either Win8 PHT or Samsung Plex app to watch these. I saw someone mentioning having problems even with 720p at 4Mbps. So what is actually considered high bit rate?

Edit: Just took a look through SSH on CPU usage. For 720p 4Mbps it 60-70% and for 1080p 8Mbps it was fluctuating between 65% and 96%. High bit rate scenes clearly caused a higher CPU usage and the most highest ones caused complete stutter/off-sync. Player however recovered from this if I jumped forward. Is there any chance that this could be caused by bad power supply as some one suggested? I'm using a Nokia quality supply suggested by the dealer I got the Raspberry from.

Edit2: Also there seems to be quite a lot of work still to be done to get this to a usable level. Fully understand this is marked as beta but I would say this is more like alpha or proof of concept. And this is with no disrespect to the devs, I'm just saying this is no way near to be usable for an average user and might give a totally wrong impression what Plex can really do especially if this would be the first Plex client you try out. I'm comparing this to PMC or PHT running on PC and I'm a bit amazed about some of the comments that they are running this just fine.

Edit3: Followed this guide to install raspbmc + plexbmc to see whether this issue is rasplex or raspberry related. Turns out that the CPU usages are way lower on the latest raspbmc compared to rasplex. 30-40% vs 60-70% for 720p 4Mbps and 40-70% vs 65%-96% for 1080p 8Mbps. There were occasional spikes near to 95% put they were very shortlasting and did not affect video playback which was perfect on the brief look. Also the menus were working very nicely both with the default Confluence and recommended Quartz skins.

But plexbmc is not not Plex, actually quite far from it. And since I used the suggested USB-stick data partition installation method I should try it also for rasplex. Just have to do some reading first.

Edit4: Re-installed to SD+USB combo using these instructions. CPU usage is pretty much at the same level but the stuttering/freezing is not present any more. Also the ui is much more responsive (but still not near the PC based PHT). I also experimented with the system/audio settings by enabling/disabling all the combinations but they did not have any effect on CPU usage on these sample videos (these might have been all DD5.1).

With the SD+USB installation method, I've finally reached a usability which allows experimental testing using other family members as guinea pigs ;)