x264 decoding stutters on Raspberry Pi
#1
Hi,

I use openelec (now version 5) on a Raspberry Pi. I always encode my blurays using x264 to an external hard drive which is connected to the raspberry.
Now, sometimes the video stutters for a bit. Not only with 1080p, but also 720p. Most of the time it seems to appear in dark scenes. Most of the time, it goes away after a scene changes. The funny thing is, if I go back 30 seconds and replay the same scene, everything is smooth, no stuttering at all, which seems to implicate some kind of buffering problem?

Just now I encountered this problem, rewinded and then the stuttering was gone. I stoped the playback, started something else, and then went back to the same file, and the stuttering startet again. It is always at the same point in the video, which seems to implicate wrong encoding settings? (which would be bad... I dont want to encode everything again Big Grin). When I want to play the same file back with vlc on my pc, everything is smooth as it should be.

And the last thing, I could swear that in an older version of openelec ... something like 3.2, this issue was not present.

Any Ideas?
Thx.
Reply
#2
Upload a debug log (wiki) that includes the stuttering.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#3
I like to brute force the issue:

SD Card Only ?
RPi version ?
Confirming your RPi is overlocked ?
How much gpu_mem is set in your Config.txt ?

And the usual question, what sort of power supply and USB cord thickness are you using ?

Reply
#4
Here's the log. There is no error or warning while the mkv is playing.
http://pastebin.com/7kVvLAkF

@wrxtasy:
Tried it on USB harddrive and on SD Card
Raspberry Pi B, Openelec 5.0.0
Not overclocked
No Idea about the gpu_mem, but its on default values.

The power supply is able to supply 1.2 A. I really dont think this is the issue, since the point where the stuttering begins is reproducable.
Reply
#5
Get rid of your advancedsettings.xml and test again.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#6
1. Remove the advancedsettings.xml file you have in there.
2. There is a lot of rubbish in the Config.txt, keep the minimal you actually need to get video sync to your tv and HDMI negotiation working properly.
Use overclock Turbo settings for config.txt and:
over_voltage_sdram=4
gpu_mem=224 or 256
hdmi_ignore_cec_init=1
force_turbo=1
3. make sure you use a 5V/2.0 Amp power supply, don't use a cheap thin USB cord and then Overclock.

4. Keep it simple if you want to fix this issue Smile

Reply
#7
(2015-01-18, 04:42)Milhouse Wrote: Get rid of your advancedsettings.xml and test again.

I had the issue before I created the advancedsettings.xml file.
Reply
#8
Power supply !

Reply
#9
Definitely worth getting rid of:
Code:
pause_burst_frames=1
avoid_fix_ts=1
from config.txt, and testing again. You shouldn't have either of those unless you know you need them.

Test with a stock system and go from there - several of your settings are just as likely to cause a problem than solve it.

Don't add settings unless you know what they do and why you need them.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#10
(2015-01-18, 04:48)Ntor Wrote: I had the issue before I created the advancedsettings.xml file.

So why did you add a setting that is less optimal than the system default?
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#11
(2015-01-18, 04:49)wrxtasy Wrote: Power supply !

Imho, if the power supply would not be capable to supple enough current, it would never be able to do it, not only at certain times when playing a file.

(2015-01-18, 04:51)Milhouse Wrote:
(2015-01-18, 04:48)Ntor Wrote: I had the issue before I created the advancedsettings.xml file.

So why did you add a setting that is less optimal than the system default?

I wanted to see if this could be a buffering issue. And on the page explaining the parameters it actually says that the default for readbufferfactor would be 1, so I tried 2. I did not know that the actual default was 4.

Sorry, I did not read it here, but on a page I found and it was at least valid for xbmc 13


I cant find

pause_burst_frames=1
avoid_fix_ts=1

in my config.txt

edit: just tried overclocking to 900 mhz. No change.
edit2: Now I also tried a 3A Power Supply. No change.
Reply
#12
One more thing I noticed. I was playing the mkv and went into the video options. When I reached the point of stuttering, I set deinterlace to off, then the video went dark for a fraction of a second, and when it came back, it was smooth.
After a restart of the video it was stuttering again at the same position, setting deinterlace back to automatic, and when the video went dark and came back, it was smooth again.

Its like, when it stutters, it is out of sync with something and after a while, or a scene change, it resyncs ... I really hope its not some incompatible encoding option ...
Reply
#13
(2015-01-18, 04:53)Ntor Wrote: I cant find

pause_burst_frames=1
avoid_fix_ts=1

in my config.txt

edit: just tried overclocking to 900 mhz. No change.
edit2: Now I also tried a 3A Power Supply. No change.

Ok my mistake, the values listed in kodi.log are the current settings, which includes defaults, and not just the values present in config.txt. I know at some point properties such as avoid_fix_ts and page_burst_frames were added to fix problems with certain files.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#14
(2015-01-18, 05:33)Ntor Wrote: Its like, when it stutters, it is out of sync with something and after a while, or a scene change, it resyncs ... I really hope its not some incompatible encoding option ...

Upload a sample file, 100MB or so, that demonstrates the problem.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
#15
hmm, what about copyright issues? Smile
Reply

Logout Mark Read Team Forum Stats Members Help
x264 decoding stutters on Raspberry Pi1