x264 decoding stutters on Raspberry Pi
#16
(2015-01-18, 05:33)Ntor Wrote: 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.

When you set the deinterlacing to Automatic did you also scroll further down and select - "Set as default for all videos" ?
Kodi will then remember this setting when you stop the video and restart play again.

Reply
#17
Your call.
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
#18
funny ... while cutting out 2 minutes of it, I tried reencoding it for fun ... guess what, the stuttering is gone ...
If I just copy the video stream, it still stutters at the same time index.
Reply
#19
Just an FYI, short copyrighted clips for the purposes of technical testing should fall under "fair use".
Reply
#20
Tried Raspbmc, same issue.

I tried Openelec 3.2.4, which uses xbmc 12.2, and it does NOT show the stuttering ... so, what is the difference in the video player between 12.2 and 14.0? Is it possible to compile kodi 14.0 with the videoplayer from 12.2?
Reply
#21
(2015-01-18, 17:28)Ntor Wrote: I tried Openelec 3.2.4, which uses xbmc 12.2, and it does NOT show the stuttering ... so, what is the difference in the video player between 12.2 and 14.0? Is it possible to compile kodi 14.0 with the videoplayer from 12.2?

No. Might be worth disabling omxplayer acceleration to see if the problem also occurs with dvdplayer.
If you provide a sample file that shows the problem then I expect it can be fixed.
Reply
#22
I tried disabling omxplayer, and interestingly, the stuttering starts at the same time, but only lasts a couple of seconds. With omxplayer enabled, it lasts for about a minute.

Here in Germany there is no such thing as fair use, so I am a bit reluctant uploading copyrighted stuff, even 2 minutes of it ...
Do you think this would be far less "risky" if I just send a link via private messaging or so?
Reply
#23
(2015-01-18, 18:01)Ntor Wrote: I tried disabling omxplayer, and interestingly, the stuttering starts at the same time, but only lasts a couple of seconds. With omxplayer enabled, it lasts for about a minute.

Here in Germany there is no such thing as fair use, so I am a bit reluctant uploading copyrighted stuff, even 2 minutes of it ...
Do you think this would be far less "risky" if I just send a link via private messaging or so?

You can send a link by PM if you prefer.
Reply
#24
Done.
Reply
#25
A very quick analysis suggests the timestamps are broken.

You can see pts (presentation timestamp), dts (decode timestamp) and packet number here:
http://pastebin.com/vG19wEr7

Packets 1,2, 18 and 19 look bogus to me and I suspect that is triggering the stuttering behaviour.

What options are you using to encode with x264?

When I have more time I'll try to work out exactly what behaviour these timestamps provoke and if there's a way of improving it.
Reply
#26
I used these options in ffmpeg:
-level 41 -me_method umh -bf 16 -crf 20 and a rescale. This was a while ago, maybe at that time there was a bug in ffmpeg and I just did not notice because older xbmc version did not react to it ...

How can I look at the timetamps?

(2015-01-18, 20:36)popcornmix Wrote: ... and if there's a way of improving it.

I'm sure there is, since xbmc 12.2 did not react with stuttering Big Grin
Reply
#27
(2015-01-18, 21:57)Ntor Wrote: How can I look at the timetamps?

I used "avprobe -show_packets"
Reply
#28
(2015-01-18, 05:47)Ntor Wrote: hmm, what about copyright issues? Smile

Fair use?
Reply
#29
@Ntor,

Had a look at that sample movie file and it appears the encoding definately gives the RPi stutter problems. Its not a bitrate or audio issue.
Video plays smoothly on Kodi Ubuntu and OSX.
Even running it through Handbrake and re-encoding video and audio to 5.1 still gives stutters on the RPi.
Whatever encoding settings that were used to encode video on this file disagrees with Kodi on the RPi only.

MediaInfo Output:
Code:
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is ©2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: 19 Jan 2015 11:56:22 am AWST
Report for file: test_stutter.mkv

General / Container Stream #1
    Total Video Streams for this File.................1
    Total Audio Streams for this File.................1
    Video Codecs Used.................................AVC
    Audio Codecs Used.................................AC3
    File Format.......................................Matroska
    Play Time.........................................2mn 0s
    Total File Size...................................52.5 MiB
    Total Stream BitRate..............................3 662 Kbps
    Title (Tag).......................................S01E08
    Encoded with......................................Lavf56.12.103
    Encoding Library..................................Lavf56.12.103
Video Stream #1
    Codec (Human Name)................................AVC
    Codec (FourCC)....................................V_MPEG4/ISO/AVC
    Codec [email protected]
    Frame Width.......................................1 280 pixels
    Frame Height......................................720 pixels
    Frame Rate........................................23.976 fps
    Total Frames......................................2881
    Display Aspect Ratio..............................16:9
    Scan Type.........................................Progressive
    Color Space.......................................YUV
    Codec Settings (Summary)..........................CABAC / 4 Ref Frames
    QF (like Gordian Knot)............................0.142
    Codec Settings (CABAC)............................Yes
    Codec Settings (Reference Frames).................4
    Video Stream Length...............................2mn 0s 162ms
    Video Stream BitRate..............................3 141 Kbps
    Bit Depth.........................................8 bits
    Video Stream Size.................................45.0 MiB (86%)
    Video Encoder.....................................x264 - core 133 r2 a3ac64b
    Video Encoder (Settings)..........................cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=6 / lookahead_threads=1 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=16 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=23 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=69 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Video Stream Language.............................English / English
Audio Stream #1
    Codec.............................................AC-3
    Codec (FourCC)....................................A_AC3
    Audio Stream Length...............................2mn 0s 161ms
    Audio Stream BitRate..............................448 Kbps
    Audio Stream BitRate Mode.........................CBR
    Number of Audio Channels..........................6
    Audio Channel's Positions.........................Front: L C R, Side: L R, LFE
    Sampling Rate.....................................48.0 KHz
    Bit Depth.........................................16 bits
    Audio Stream Delay................................1mn 5s
    Audio Stream Size.................................6.42 MiB (12%)
    Audio Stream Title................................3/2+1
    Audio Stream Language.............................English / English
Menu / Chapters Stream #1

Reply
#30
Thats odd. Are you sure that handbrake did an actual reencoding and not just copied the streams? Because if I do a reencode with ffmpeg, the stuttering is gone.
Reply

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