-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support stream headers #254
base: Omega
Are you sure you want to change the base?
Conversation
with this, kodi dies even earlier when it tries to log the property
stream_headers is the next property i set. Once again, if i change the user-agent - its OK
|
That means the bug is nothing to do with |
@phunkyfish I'm trying to use this feature as the movie CDN is blocking the default user-agent sent by FFMPEG (Lavf/60.3.100) - Using Kodi v21-RC1 Windows, FFMPEGDirect addon version - 21.3.4. From the debug logs, I can see the ffmpeg library is skipping the #KODIPROP values which could be the reason. Please advise. Debug logs excerpt: HTTP Failure messages: 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] User-Agent: Lavf/60.3.100 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] Accept: / 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] Range: bytes=0- 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] Connection: keep-alive 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] Host: str01.strplayallu01.site 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] Icy-MetaData: 1 2024-03-11 05:01:46.890 T:24088 debug : ffmpeg[0x18818d92530]: [https] 2024-03-11 05:01:46.895 T:25080 debug : ------ Window Init (DialogBusy.xml) ------ M3u8 file content: CDN is successfully accepting if request has user-agent set to "VLC/3.0.20" - valided the working behavior using ffplay --user_agent VLC/3.0.20 command. Thank you! |
And our you saying you can’t set the user agent directly in the addon settings? |
I've set the user agent under addon settings and still got 403 response from CDN for the request made by Kodi and then upon checking the logs I found that It's skipping ffmpegdirect plugin which explains why the user agent change is not working. The content I'm trying to watch is general VOD (not DRM protected one) so not sure if ffmpegdirect can only be triggered only DRM enabled contents which would be parsed and fed through my python addon.. Logs clearly state that Kodi identified the stream as HLS and chose to skip ffmpegdirect. I can retest if you confirm the user-agent overwrite is supposed to work even with HLS VOD. For now, I've added a threaded HTTP relay server capability to my addon which would rewrite the request with custom user agent and that works as expected. 😊 |
If you want to use ffmpegdirect you need to have KODIPROPs for each M3U entry. There should be no reason for it not to work. Make sure you set a Just checking but you definitely have ffmpegdirect installed? Note, that this should work fine with unprotected streams, most streams are. |
Thank you, @phunkyfish. I've added two KODIPROPs - Do I need to add stream_headers as well? Also, KODIPROP need to be added for all M3U entries? 😮 i.e., if M3U8 has 100+ entries then all those entries should be appended with the props? Attached the M3U8 file Regarding the ffmpegdirect addon installation, yes, I've installed the Omega-RC1 version + installed ffmpegdirect v21.3.4 to test it. Also, can I install just the ffmpegdirect addon 21.x version with 20.x Kodi GA release? If yes, how can I do it? I only see build instructions for Linux & macOS and not for Windows. :( |
On windows you just need to install it, it comes from binary add-on repos, Windows, OSX and Android all work this way. What you have won't work, KODIPROPS only work in the M3U file that iptvsimple loads. M3U8s or HLS streams are like channels and each of those can have KODIPROPS. Here is an example. I don't think you need stream headers at all. All you need is a correctly formed M3U file
|
Thank you, @phunkyfish. Yep that's what I thought too that mine won't work as I'm not using IPTV stream or IPTV client. Mine is a movie stream that I parse from internet service. So no way to add custom stream headers for movie streams that we feed to Kodi through python addon? |
So you call the parent steam or the child segments individually? you should still be able to set the right properties |
I pass the master m3u8 link and let Kodi to handle the rest. Movie site I parse made some changes to their CDN which then started to block stream request made by Kodi (ffmpeg & curl user-agent) so thought of downloading m3u8 and then modified it have the KODIPROP values which doesnt work. So you're saying that If I add the right properties to all child streams as youve called out in the earlier comment. It should work? |
@phunkyfish I'm confused when you said "I don't think you need stream headers at all".. so adding user-agent to the URL with | is not the stream headers? (I thought thats what we call as stream headers) Maybe my understanding about stream headers are wrong.. 😁 my apologies if I mixed things up. |
Sorry, what I meant was the stream headers property in this PR. using the there is no reason to do anything to the child URLs. |
@phunkyfish URL that'll get the master m3u8 is not having user agent filtering - it's the child urls that's inside the m3u8, hence I've downloaded the m3u8 file stored it in filesystem and used a regex substitute to add the |
Yes, but ffmpeg processes the user-agent on the master m3u8 and will automatically add to any child segments. The child segments will be added in realtime as the stream progresses so adding them to the initial ones is of no use. Does this make sense? inputstream.adaptive also supports HLS. So if you have no luck with ffmpeg you can always try that. That addon supports the stream headers properly natively so worth trying if ffmpeg is a dead end. |
v21.3.0