RPi 3 Video stuttering.

  • Hi, i've run LibreElec about 1-2 months, and all of sudden my h264/x264 files are starting to stutter badly. I'm running through Emby plugin (Direct Play).

    I've never had these problems when i used OSMC on the Rpi 3. Dunno if this could be heat issue in the Rpi 3 or something else, suggestions are welcome!

    Regards Brian.


  • Are you sure they are H264 and not H265?

    Media dump of a video file would assist.

    Yes sure, thats why i'm wondering about the stutter.

    This is the info on 1 of them:Media InfoVideoCodecH264
    AVCYes
    ProfileHigh
    Level41
    Resolution1920x800
    Aspect ratio2.40:1
    AnamorphicNo
    InterlacedNo
    Framerate23.97602
    Bitrate11765 kbps
    Bit depth8 bit
    Pixel formatyuv420p
    Ref frames5
    NAL4AudioLanguageeng
    CodecDCA
    ProfileDTS
    Layout5.1
    Channels6 ch
    Bitrate1536 kbps
    Sample rate48000 Hz
    Bit depth24 bit
    DefaultYes
    TitleEng DTS 5.1 Default
    [hr]


    "Video stuttering..."

    Since we have no magic crystal ball here, please start with providing a kodi.log file.

    I know if you're gonna dig deeper a log is needed. But i asked without logs, to get to know whether this was some obscure known problem with rpi 3 and libreelec.

    Ill try to find out how to log and post it.

    And maybe video stuttering isnt the best way to put, it actually pauses in several seconds 5-10 before continuing playback..

    Edited once, last by best74 (December 17, 2016 at 2:57 PM).

  • Hmm. Still suffering from major lag.. Tried the krypton beta, and now its getting worse.. maybe expected.. here's a snip of my log where playing back a file.

    I'm using the emby plugin in direct play via smb share. So no transcoding is going on... This is wierd.. My rpi 1 never had issues playing anything..

    20:05:54.934 T:1962536960 NOTICE: VideoPlayer: Opening: smb://192.168.1.6/Movies/something.mkv
    20:05:54.935 T:1962536960 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
    20:05:54.935 T:1494139808 NOTICE: Creating InputStream
    20:05:54.984 T:1494139808 NOTICE: Creating Demuxer
    20:05:55.464 T:1494139808 NOTICE: Opening stream: 0 source: 256
    20:05:55.465 T:1494139808 NOTICE: Creating video codec with codec id: 28
    20:05:55.475 T:1494139808 NOTICE: Creating video thread
    20:05:55.475 T:1494139808 NOTICE: Opening stream: 1 source: 256
    20:05:55.475 T:1469051808 NOTICE: running thread: video_thread
    20:05:55.475 T:1494139808 NOTICE: Finding audio codec for: 86020
    20:05:55.476 T:1494139808 NOTICE: Creating audio thread
    20:05:55.476 T:1460663200 NOTICE: running thread: CVideoPlayerAudio::Process()
    20:05:55.476 T:1494139808 NOTICE: Opening stream: 0 source: 1024
    20:05:55.579 T:1460663200 NOTICE: Creating audio stream (codec id: 86020, channels: 6, sample rate: 48000, pass-through)
    20:05:55.610 T:1962536960 NOTICE: Display resolution ADJUST : 1920x1080 (1920x1080) @ 23.98 - Full Screen (34) (weight: 0.000)
    20:05:55.871 T:1962536960 NOTICE: VideoPlayer: OnLostDisplay received
    20:05:56.115 T:1778185120 NOTICE: EMBY.kodimonitor -> Method: Player.OnPlay Data: {"item":{"title":"","type":"movie"},"player":{"playerid":1,"speed":1}}
    20:05:56.117 T:1778185120 NOTICE: EMBY.kodimonitor -> Item is invalid for playstate update
    20:05:56.647 T:1469051808 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    20:05:56.786 T:1460663200 ERROR: CDVDAudio::AddPacketsRenderer - timeout adding data to renderer
    20:05:57.148 T:1469051808 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    20:05:58.649 T:1962536960 WARNING: Previous line repeats 1 times.
    20:05:58.649 T:1962536960 NOTICE: VideoPlayer: OnResetDisplay received
    20:06:00.323 T:1778185120 NOTICE: EMBY.player -> Could not find itemId, cancelling playback report...
    20:06:05.106 T:1460663200 NOTICE: CVideoPlayerAudio::Process - stream stalled
    20:06:16.459 T:1469051808 WARNING: CRenderManager::WaitForBuffer - timeout waiting for buffer
    20:06:59.466 T:1778185120 NOTICE: EMBY.kodimonitor -> Method: Player.OnSeek Data: {"item":{"id":187,"type":"movie"},"player":{"playerid":1,"seekoffset":{"hours":0,"milliseconds":0,"minutes":0,"seconds":10},"speed":1,"time":{"hours":0,"milliseconds":542,"minutes":1,"seconds":0}}}
    20:07:02.268 T:1778185120 NOTICE: EMBY.kodimonitor -> Method: Player.OnSeek Data: {"item":{"id":187,"type":"movie"},"player":{"playerid":1,"seekoffset":{"hours":0,"milliseconds":0,"minutes":0,"seconds":10},"speed":1,"time":{"hours":0,"milliseconds":525,"minutes":1,"seconds":18}}}
    20:07:07.473 T:1778185120 NOTICE: EMBY.kodimonitor -> Method: Player.OnSeek Data: {"item":{"id":187,"type":"movie"},"player":{"playerid":1,"seekoffset":{"hours":0,"milliseconds":0,"minutes":0,"seconds":10},"speed":1,"time":{"hours":0,"milliseconds":438,"minutes":1,"seconds":34}}}
    20:07:12.101 T:1460663200 NOTICE: CVideoPlayerAudio::Process - stream stalled
    20:08:07.687 T:1669133216 NOTICE: ES: Client from ::ffff:192.168.1.100 timed out
    20:08:21.963 T:1930425248 NOTICE: CAESinkPi:AddPackets Underrun (delay:0.00 frames:512)
    20:09:11.822 T:1643967392 NOTICE: EMBY.websocket_client -> Message: {"MessageType":"UserUpdated","Data":{"Name":"Brian","ServerId":"4588e0c049e845c18938494e2049d894","ConnectUserName":"blj","ConnectUserId":"145841","ConnectLinkType":"LinkedUser","Id":"edcb3b02b5e948fbb4b3cf576baaa1ca","HasPassword":true,"HasConfiguredPassword":true,"HasConfiguredEasyPassword":false,"LastLoginDate":"2017-01-26T18:51:30.7371559Z","LastActivityDate":"2017-01-26T19:09:07.9383146Z","Configuration":{"AudioLanguagePreference":"dan","PlayDefaultAudioTrack":false,"SubtitleLanguagePreference":"dan","DisplayMissingEpisodes":false,"DisplayUnairedEpisodes":false,"GroupedFolders":,"SubtitleMode":"Smart","DisplayCollectionsView":false,"EnableLocalPassword":true,"OrderedViews":["253bc9fc2ae4cb0a47d99e75b7e36923","ab3b4e6f2add6be1f9569fd1b136c577","bc3a7d1d3dac1f10e170387270df67fa","35b3ef63909f50a17c5eb999099d18be","8a05b0252259a1dbd62df97522638439"],"LatestItemsExcludes":,"PlainFolderViews":,"HidePlayedInLatest":true,"RememberAudioSelections":true,"RememberSubtitleSelections":true,"EnableNextEpisodeAutoPlay":false},"Policy":{"IsAdministrator":false,"IsHidden":false,"IsDisabled":false,"BlockedTags":,"EnableUserPreferenceAccess":true,"AccessSchedules":,"BlockUnratedItems":,"EnableRemoteControlOfOtherUsers":true,"EnableSharedDeviceControl":true,"EnableLiveTvManagement":true,"EnableLiveTvAccess":true,"EnableMediaPlayback":true,"EnableAudioPlaybackTranscoding":true,"EnableVideoPlaybackTranscoding":true,"EnablePlaybackRemuxing":true,"EnableContentDeletion":true,"EnableContentDownloading":true,"EnableSync":true,"EnableSyncTranscoding":true,"EnabledDevices":,"EnableAllDevices":true,"EnabledChannels":,"EnableAllChannels":true,"EnabledFolders":["35b3ef63909f50a17c5eb999099d18be","ab3b4e6f2add6be1f9569fd1b136c577","253bc9fc2ae4cb0a47d99e75b7e36923","8a05b0252259a1dbd62df97522638439","bc3a7d1d3dac1f10e170387270df67fa"],"EnableAllFolders":false,"InvalidLoginAttemptCount":0,"EnablePublicSharing":false}}}
    20:09:53.466 T:1962536960 NOTICE: CVideoPlayer::CloseFile()
    20:09:53.466 T:1962536960 NOTICE: VideoPlayer: waiting for threads to exit
    20:09:53.483 T:1494139808 NOTICE: CVideoPlayer::OnExit()
    20:09:53.483 T:1494139808 NOTICE: Closing stream player 1
    20:09:53.483 T:1494139808 NOTICE: Waiting for audio thread to exit
    20:09:53.483 T:1460663200 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
    20:09:53.483 T:1460663200 NOTICE: thread end: CVideoPlayerAudio::OnExit()
    20:09:53.483 T:1494139808 NOTICE: Closing audio device
    20:09:53.484 T:1494139808 NOTICE: Deleting audio codec
    20:09:53.484 T:1494139808 NOTICE: Closing stream player 2
    20:09:53.484 T:1494139808 NOTICE: waiting for video thread to exit
    20:09:53.484 T:1469051808 ERROR: Got MSGQ_ABORT or MSGO_IS_ERROR return true
    20:09:53.484 T:1469051808 NOTICE: thread end: video_thread
    20:09:53.484 T:1494139808 NOTICE: deleting video codec
    20:09:53.487 T:1494139808 NOTICE: Closing stream player 3
    20:09:53.493 T:1962536960 NOTICE: VideoPlayer: finished waiting
    20:09:53.496 T:1778185120 NOTICE: EMBY.player -> Clear playlist properties.
    20:09:53.758 T:1962536960 NOTICE: CVideoPlayer::CloseFile()
    20:09:53.758 T:1962536960 NOTICE: VideoPlayer: waiting for threads to exit
    20:09:53.759 T:1962536960 NOTICE: VideoPlayer: finished waiting
    20:09:53.759 T:1962536960 NOTICE: CVideoPlayer::CloseFile()
    20:09:53.759 T:1962536960 NOTICE: VideoPlayer: waiting for threads to exit
    20:09:53.759 T:1962536960 NOTICE: VideoPlayer: finished waiting
    20:09:54.399 T:1778185120 NOTICE: EMBY.kodimonitor -> Method: VideoLibrary.OnUpdate Data: {"id":-1,"type":""}
    20:09:54.400 T:1778185120 NOTICE: EMBY.kodimonitor -> Item is invalid for playstate update

  • Post a complete debug enabled log (use a paste site).

    Your log does have some Emby compaints.

    Code
    20:05:56.117 T:1778185120  NOTICE: EMBY.kodimonitor -> Item is invalid for playstate update
    20:06:00.323 T:1778185120  NOTICE: EMBY.player -> Could not find itemId, cancelling playback report...

    I'd suggest disabling Emby and first test playback of the file locally (e.g. copy to sdcard or locally attached USB stick).
    If that is okay then try playing from a network share (without using Emby).

    Testing with a clean install may be the best option if you have a spare sdcard.


  • Post a complete debug enabled log (use a paste site).

    Your log does have some Emby compaints.

    Code
    20:05:56.117 T:1778185120  NOTICE: EMBY.kodimonitor -> Item is invalid for playstate update
    20:06:00.323 T:1778185120  NOTICE: EMBY.player -> Could not find itemId, cancelling playback report...

    I'd suggest disabling Emby and first test playback of the file locally (e.g. copy to sdcard or locally attached USB stick).
    If that is okay then try playing from a network share (without using Emby).

    Testing with a clean install may be the best option if you have a spare sdcard.

    Hi again,

    First of all, - i fixed it :-).. It seems it was a stupid switch that acted up. I restarted the switch, and now it plays fine again. I hope, -haven't tried a whole movie yet.

    Before i tried this i moved /storage to a USB stick, and edited the cmdline.txt to run /storage from the USB. I also tried playing directly via smb (not through emby addon) and it was the same.

    I do still get the emby.kodimonitor and emby.player in my logs, but i think this may be due to the fact that i'm not running emby plugin in Add-on mode but Native(direct paths). This maybe a dumb choice, but i wanted to make sure it's not transcoding on my emby server..

    Anyway, thank you all for your replies and help!