Kodi Community Forum

Full Version: RTMP wrapper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Dear devs,

The title of the post might be confusing but I'll try to make it the clearest I can:

When playing m3u files in the PVR section, namely using IPTV simple client, and if the video uses the RTMP protocol it simply won't play. For instance this file:

Create a file named rtp.m3u with the following content:

Quote:#EXTM3U
#EXTINF:-1,RTP
rtmp://ec25.rtp.pt/livetv/2ch5h264 swfUrl=http://programas.rtp.pt/play/player.swf?v3 live=true timeout=15

Add this link to the m3u8 playlist in the IPTV simple. Or even simple, add this link to a playlist.

I thought it could be a limitation of the protocol or simply not supposed to work this way. However, the same file plays okay in kodi (out of the PVR) - either being a static file on your computer, or using the PlayMedia function from python. So I think this is something not supported on the PVR API only.

Why I need this:
Instead of updating a playlist manually I think a service addon like an http server written in python is more than enough to proxy/redirect to the parsed link. However, this doesn't work with the rtmp protocol. If the PVR addon was capable of playing this files (like kodi does) the httpserver service addon would just redirect to a m3u file containing the rtmp link.

Hope the explanation was clear. I think the change might not be that big.

Thanks for reading or considering it.

Regards,

enen
Just realized you guys organized the forum a bit better. Would some moderator be kind to move this thread to the 'PVR development' section so it can be noticed by the ones involved in pvr addon development?

Cheers
moved :)
RTMP works, at least the last time I've tried, for example the followings worked perfectly for me (radio stations):
Code:
rtmp://live1.ashams.com/live playpath=live swfUrl=http://www.ashams.com/admin-aps/inc/player/player.swf pageUrl=http://www.ashams.com/live.html

rtmp://fms3.mediacast.co.il/liveradio playpath=102.stream swfUrl=http://radio.mediacast.co.il/players/fp325/flowplayer-3.2.5.swf?0.2779204686896638 pageUrl=http://face.mediacast.co.il/102fm/audio/

I might be wrong but I believe there was an issue in 14.0 related to RTMP that was fixed in 14.1.

Personally I stopped using IPTVSimple, most of the services on my playlist are HLS streams and Tvheadend + FFmpeg is a better solution with them (the price is that I dropped the RTMP service, though I might be able to add them with rtmpdump).
Yes I know rtmp links play ok inside a list but my request/suggestion here is to support rmtp links wrapped in some other "format". So:

m3u8 list -> calls another file (m3u or strm) -> plays rtmp

Kodi supports it but it seems not available in the pvr. The main advantage is, the rtmp protocol (which causes issues sometimes) could be wrapped in a file that can be accessed trought http. So, instead of updating the links everyday, I would make a simple script that grabs this rtmp url from the source site and would be served by http to iptv simple, hence being updated all the time. You're also right about iptvsimple but unfortunately my main htpc now is a crappy android one and no backends are available for android. I don't know C/C++ but I guess the change might be simple, just match 'rtmp://' when reading a m3u file maybe.

Thanks for moving it ned.
I failed to understand the logic of the requested feature.

You want the following config: playlist a (listing multiple items) -> playlist b (listing one item) -> stream

If you plan to write a script for updating the linked playlist (b) with the updated stream then why don't you just update the original playlist (a) ?

p.s.
I believe that Kodi is automatically classifies m3u8 as HLS and sending it to FFmpeg so using m3u8 extension for a playlist might not be a good idea. Edit: although IPTVSimple do parse m3u8 as playlist so nothing wrong there if you use the IPTVSimple addon.
What enen92 is refering to is "redirected streams". The PVR-addon reads the m3u file in order to fetch the channels list. Each channel then points to a another m3u file, which again points the propper stream-url (in rtmp format).

I think the problem is that the channel-url, in the first m3u file (channels-list), ends with 'm3u' or starts with 'http' (or some other protocol other than rtmp) and based on that Kodi decides what demuxer to use. In this case it will use the default DVDDemux. And that type of demuxer most probably would not run rtmp streams (not even redirected ones).


enen92, try changing your rtp.m3u file to rtp.m3u8 (notice the 8 at the end). This will force Kodi to use FFmpeg demuxer instead of the default dvddemux. But the question is if it will manage to redirect to this type of rtmp-url (rtmp://... playpath=... swfUrl=... pageurl=...) This is no normal url.
(2015-03-02, 23:45)dhead Wrote: [ -> ]I failed to understand the logic of the requested feature.

You want the following config: playlist a (listing multiple items) -> playlist b (listing one item) -> stream

If you plan to write a script for updating the linked playlist (b) with the updated stream then why don't you just update the original playlist (a) ?

p.s.
I believe that Kodi is automatically classifies m3u8 as HLS and sending it to FFmpeg so using m3u8 extension for a playlist might not be a good idea. Edit: although IPTVSimple do parse m3u8 as playlist so nothing wrong there if you use the IPTVSimple addon.

Because I've to do that in a time basis, updating the playlist daily (or so) just because of 3 or 4 rtmp links (mostly the rtp play website). Plus the pvr addon has it's own database which is also updated from x to x time. If you update the playlist and change the overall link the old link might still remain in the database. Hence you need to restart the pvr as well after updating the links.

Plus by doing this you still have the huge possibility that your link (you updated 5 hours ago) is not valid anymore. This is fine for me since I can understand what is happening and run the script again but not really for my older relatives for instance. I also have the video addon I made for this but this lacks the EPG data. So the ideia is, instead of replicating complicated stuff (such as adding an epg + skinning to a simple video addon) take advantage of the already builtin PVR engine of kodi and use the addon as both a video addon or a service (http server).

This way I can have a stable playlist, with stable links (e.g. http://127.0.0.1:9222/rtp.m3u) that would return the rtmp link only as per my request.

PS: m3u8 doesn't work either. I tried it before. In this case it doesn't even play in kodi itself if I remember correctly. m3u does from video -> files or inside a strm.
Hi!
I also looking for possibility described by enen92.
Hi guys,

Same issue here. Right now I have a script that redirects to the rtmp stream. E.g. http://domain.com/rtmp/stream will redirect to rtmp://streamdomain.com/rtmp/stream . Not the best solution but works. Also, it works for some reason with Kodi 14.1 (helix) only, in the newer versions this method does not seem to work.

If anyone has a better idea how to handle this kind of situation, I would like to know also.
Here is a rtmp stream that used to work in 13.2 and 14.2 but doesn't work anymore in 15.1 or 16

#EXTINF:-1 ,ALJAZEERA DOC
rtmp://5.196.84.28:1935/live?idu=dakroubalan_61744679000/aljazeera_doc

is any bodu have a solution please ?
thanks in advance for your help
This suggestion has nothing to do with rtmp links not working.
Also, to be honest it doesnt make any sense lol.
Any redirection might be solved by tweaking the code of the PVR addon itself...
Please consider this feature request with no effect.
In my case, I have a script which is generating a token for the links, so it does make sense, as I cannot put the link without the token, or generate the token somehow in the m3u.
The only way to do it, is as client4tv suggested, so the url will generate an m3u file where inside is the link to the stream with the generated token (dynamically) or, as I did it, by redirecting the link to the correct one with token.

This feature was working fine (and is, in kodi 14.1) so there was no reason to remove or break it. Anyway, for now at least I reverted to 14.1 and probably wont update till this is fixed unfortunately.
+1 for that request.

I've all my channels in PTV simple client with EPG but I can't use any RTMP links... but they works in kodi.
I want to use IPTV simple client for the EPG.
More and more people are having the same issue. IMHO a lot op people who use Simple PVR client IPTV cannot use it anymore in Kodi 15. See also http://forum.kodi.tv/showthread.php?tid=...pid2100623
and http://forum.kodi.tv/newreply.php?tid=23...rocessed=1.
Pages: 1 2