Stuttering/buffering videos with Amazon VOD plugin

Hello,
I just installed the Amazon VOD plugin on my Pi 3B+ running the last version of OSMC, with everything up-to-date. Unfortunately, the player seems to be buffering all the time, the video and audio are jerky. CPU usage is very high.
Is there any way to optimize the settings somewhere ? I tried different changes with no luck.

Note that I can play perfectly fine highres videos from my NAS or in the Youtube app, so it’s not a wifi/bandwidth issue.

OSMC 2021.12-1 / Kodi 19.3
Amazon VOD 0.9.4+matrix.1 from Sandmann79’s repo

Try limiting playback to 720p.

I already tried that, but no changes.

In the Inputstream extension settings, I’ve changed :

  • Max resolution general decoder from Max to 720p
  • Max resolution secure decoder from Max to 720p
    Even tried to change it to 480p, same results…

Without logs, it’s hard to speculate, but it’s possible that the device is simply underpowered. The newer versions of Kodi use more resources.

Here are the logs : https://pastebin.com/NU4TbRZX
Tried to play something at 12:11.

They are not full logs – so your guess is as good as mine.

not full logs? I pasted the whole kodi.log file, with DEBUG enabled.

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

Sorry I didn’t know. Here are the full logs then :wink:
https://paste.osmc.tv/ifiqutequh
I tried to play something around 16:46
thanks for your help

It’s Amazon VOD also required Widevine CDM ???

If yes i thinks it’s related to issue/trouble i have reported here:

@chewiiie you can check the version of CDM installed on your osmc setup ?
You can do it from inputstream.helper…

On my recent TEST i have also tryed to REMOVE completely the CDM (renamed the CDM folder) and after that i reboot my Raspberry.
At reboot i have (re)install it by inputstream.helper and i have obtain this:
CDM 4.10.2391.0 Extracted from Chrome OS FIEVEL 14268.67.0.

On my case i have tryed to watch a DAZN content using the Maven85 DAZN addons (here → GitHub - Maven85/plugin.video.dazn).

The trouble/issue reported here it’s very similar how i obtain whit my osmc setup :slight_smile:

*EDIT *

On my side i have also tryed to restore a OLD version of CDM… the previous version 4.10.2252.0 but apparently it’s not help to resolve the issue.

Also…
On my recent test… on Inputstream Adaptive setting tryed to disable “Media Played” value:
If i select “Video” only all struttering/buffering issue it’s disappears.
If i select “Audio” only or “All” trouble and all content it’s unwatchable.

On my side i can’t test Amazon VOD content… but as already sayd the issue/trouble reported it’s very similar to my :slight_smile:

I don’t know if it’s important but on “normal” log level i can see some errors also present on your debug log… look:

2022-01-17 17:19:37.541 T:2883     INFO <general>: VideoPlayer::OpenFile: plugin://plugin.video.dazn/?mode=play&title=The+Making+Of+%7C+Neymar+Jr%3A+Episodio+1+%E2%80%93+La+Gioia&id=kn7o2aezwinf10xukfhtoel1q&params=ArticleId%3Akn7o2aezwinf10xukfhtoel1q&verify_age=False
2022-01-17 17:19:37.545 T:3082     INFO <general>: Creating InputStream
2022-01-17 17:19:37.547 T:3082     INFO <general>: AddOnLog: inputstream.adaptive: SetVideoResolution (1920 x 1080)
2022-01-17 17:19:37.741 T:3082     INFO <general>: AddOnLog: inputstream.adaptive: Successfully parsed manifest file. #Periods: 1, #Streams in first period: 2, Type: VOD, Download speed: 6038562.8378 Bytes/s
2022-01-17 17:19:45.923 T:3082     INFO <general>: Creating Demuxer
2022-01-17 17:19:45.926 T:3082     INFO <general>: Opening stream: 1006 source: 256
2022-01-17 17:19:45.949 T:3082     INFO <general>: Creating video codec with codec id: 27
2022-01-17 17:19:45.950 T:3082     INFO <general>: CDVDVideoCodecDRMPRIME::Open - using decoder V4L2 mem2mem H.264 decoder wrapper
2022-01-17 17:19:45.984 T:3082     INFO <general>: Creating video thread
2022-01-17 17:19:45.984 T:3091     INFO <general>: running thread: video_thread
2022-01-17 17:19:45.986 T:3082     INFO <general>: Opening stream: 1008 source: 256
2022-01-17 17:19:46.009 T:3082     INFO <general>: Finding audio codec for: 86018
2022-01-17 17:19:46.013 T:3082     INFO <general>: CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac
2022-01-17 17:19:46.013 T:3082     INFO <general>: Creating audio thread
2022-01-17 17:19:46.014 T:3093     INFO <general>: running thread: CVideoPlayerAudio::Process()
2022-01-17 17:19:46.463 T:3093     INFO <general>: Creating audio stream (codec id: 86018, channels: 2, sample rate: 48000, no pass-through)
2022-01-17 17:19:46.471 T:2896     INFO <general>: CActiveAESink::OpenSink - initialize sink
2022-01-17 17:19:46.671 T:2896     INFO <general>: CAESinkALSA::Initialize - Attempting to open device "default"
2022-01-17 17:19:46.695 T:2896     INFO <general>: CAESinkALSA::Initialize - Opened device "default"
2022-01-17 17:19:46.699 T:2896     INFO <general>: CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats
2022-01-17 17:19:46.699 T:2896     INFO <general>: CAESinkALSA::InitializeHW - Using data format AE_FMT_S24NE3
2022-01-17 17:19:49.443 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1029.619791
2022-01-17 17:19:49.573 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1079.593801
2022-01-17 17:19:49.728 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1230.616666
2022-01-17 17:19:49.948 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1380.600052
2022-01-17 17:19:50.077 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1429.602916
2022-01-17 17:19:50.230 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1579.551926
2022-01-17 17:19:50.454 T:2895  WARNING <general>: ActiveAE - large audio sync error: -1729.599321

Thanks for your help @FaustoGSR
Indeed, it looks a lot like your issue.
I have Widevine 4.10.2391.0, just installed it with Amazon VOD a few days ago, so I don’t think reinstalling it will solve the problem.
I confirm that the video plays fine with Video only in the Inputstream Adaptive settings.
I tried adding the advancedsettings.xml file in .kodi/userdata/ and reboot to disable HTTP2 as mentionned in the link you provided, but it did not change anything.

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings>
    <network>
        <disablehttp2>true</disablehttp2><!--stutter problems on livestreams-->
    </network>
</advancedsettings>

Yeah… also on my Pi2 i have tryed to add this disablehttp2 and also for me it’s not help (now i left the option in the file but set it to false… i.e. activated like default setting).
I did not understand this statement… you said:
" I confirm that the video plays fine with Video only in the Inputstream Adaptive settings."

I thinks it’s changed somethings in some addons using CDM…somethings need to fix in the addons himself if you use it on a raspberry device…

What I meant is :
in Inputstream Adaptive settings, if you change Media from All to Video only, then the video plays perfectly fine, no buffering issues anymore. But you’re not getting the audio anymore if you do that.

So the issue seems to be related to the audio decoding maybe?

Hmm this might be related with Vero 4k iptv issues after August update - #40 by nunojsa. That line in the log is very suspicious and hell of a coincidence:

“INFO : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac”

I also experienced this issue on Live TV streams where the streams are just not watchable… What I found out is that it only happens for streams that are AAC encoded. The others work fine.

To say that my issue is on vero4k and not on pi but I’m starting to think this is more an issue related with OSMC (or maybe with the ffmpeg drivers). Also to add that, for me, this is not an issue on kodi running it on x86 and the Amazon 4k stick.

When I have the time, I want to try my setup on pi2 using both OSMC and maybe libreelec to see if there are any differences.

  • Nuno Sá

ah ok… now i understand :wink:

@nunojsa i have suspect, in my case, dazn have changed something on your streaming flux and that create some issue whit that specific hardware.

whit my bad knowledge about that can see whit another streams using widevine like mediaset play streaming… (livestream or all programs on demand) this issue it’s not reproducible.

in my case i don’t have a prime account to verify if works on my pi2…

I had the same problem with amazon prime VOD on RPi3 after I updated widevine.
After going back to widevine 4.10.2252.0 via the Inputstream Helper Plugin (don’t forget to reboot), the buffering and stuttering disappeared :+1:

Ha that’s good to hear !
Unfortunately, my Inputstream helper only offers me to revert to 4.10.1679.0, which may be too old because it won’t play anything after reboot.
How do I install Widevine 4.10.2252.0 ?
EDIT: found how, and it works !!! yay !!! Thank you @aLiEnHeAd

curl https://k.slyguy.xyz/.decryptmodules/widevine/4.10.2252.0-linux-armv7.so | sudo tee /home/osmc/.kodi/cdm/libwidevinecdm.so >/dev/null
5 Likes

@aLiEnHeAd

And

@chewiiie

OMG… i need to specific one things.

From the SSH i have restored THAT widevine version suggested by “curl”… reboot Kodi on my Pi2 and try to open one event on DAZN and…

IT’S WORKS!!! ALL STRUTTERING issue it’s completely disappears…

And it’s very strange because in this days i have tryed so many times to restore that exact version of widevine (because by inputstream.helper i have 4 backup for this version) and every time i do this it’s not resolve this issue (i don’t know… problably it’s because it’s restored from a different chrome os image and the library himself maintain same version but inside it it’s little different ?).

For moment also for me this is a very great WORKAROUD…

For prevent some future update i backup this library also on my pc… and i have download the same file but copyed to a differnt name whit this:

curl https://k.slyguy.xyz/.decryptmodules/widevine/4.10.2252.0-linux-armv7.so | sudo tee /home/osmc/.kodi/cdm/libwidevinecdm.so.working >/dev/null

It appears that the stuttering issue is back again with the latest version of Widevine … using the tips above to downgrade to 2252.0 again works to restore the lack of stuttering. @sam_nazarko is there a more permanent solution?

This would be a question for widevine or Amazon plugin developers. OSMC has no bearing here…