Kodi Community Forum

Full Version: [LINUX] Open RTMP stream
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello everybody,

I have searched quite a while now in google and here in the forum but I am still confused.

I would like to know if it is possible to watch rtmp streams in xbmc linux, and if so, what I have to do.

So far, I was not successfull:
I use xbmc (the version from https://launchpad.net/~team-xbmc/+archive/ppa) on linux (ubuntu 10.04) and would like to open the rtmp stream:
Code:
rtmp://87.118.116.216/live/livestream.flv


To do this, i made a file test.strm which just contains the line
Code:
rtmp://87.118.116.216/live/livestream.flv
In xbmc I then go to the file, right click on it and choose "play using" and select DVDPLAYER. Unfortunatly this does not work. The logfile gives
Code:
20:45:40 T:140180687267904 M:993181696  NOTICE: DVDPlayer: Opening: rtmp://87.118.116.216/live/livestream.flv
20:45:40 T:140180687267904 M:993509376 WARNING: CDVDMessageQueue(player)::Put MSGQ_NOT_INITIALIZED
20:45:40 T:140180229879568 M:992862208  NOTICE: Creating InputStream
20:45:40 T:140180229879568 M:992735232  NOTICE: Creating Demuxer
20:45:41 T:140180229879568 M:992964608  NOTICE: Opening video stream: 0 source: 256
20:45:41 T:140180229879568 M:992964608  NOTICE: Creating video codec with codec id: 0
20:45:41 T:140180229879568 M:993091584   ERROR: Unsupported video codec
20:45:41 T:140180229879568 M:993091584 WARNING: OpenVideoStream - Unsupported stream 0. Stream disabled.
20:45:41 T:140180229879568 M:993091584  NOTICE: Opening audio stream: 1 source: 256
20:45:41 T:140180229879568 M:993091584  NOTICE: Finding audio codec for: 0
20:45:41 T:140180229879568 M:991694848   ERROR: Unsupported audio codec
20:45:41 T:140180229879568 M:991694848 WARNING: OpenAudioStream - Unsupported stream 1. Stream disabled.
20:45:41 T:140180229879568 M:991694848 WARNING: Process - Could not detect frame rate for: rtmp://87.118.116.216/live/livestream.flv. Using default of 25.000 fps for conversion of any commercial break frame markers to times.
20:45:41 T:140180229879568 M:991694848  NOTICE: CDVDPlayer::OnExit()
20:45:41 T:140180229879568 M:991694848  NOTICE: DVDPlayer: eof, waiting for queues to empty
20:45:41 T:140180229879568 M:991694848  NOTICE: CDVDPlayer::OnExit() deleting demuxer
20:45:41 T:140180229879568 M:991694848  NOTICE: CDVDPlayer::OnExit() deleting input stream
20:45:41 T:140180229879568 M:991694848  NOTICE: Deleted CRTMP

I have rtmpdump from (https://launchpad.net/~team-xbmc/+archive/ppa) installed. The svn packages (https://edge.launchpad.net/~team-xbmc-svn/+archive/ppa) are tagged with "failed to build" at the moment.

Thank you for your help
I've just tried rtmp://87.118.116.216/live/livestream.flv with rtmpdump, and it returns:

ERROR: Closing connection: NetStream.Play.StreamNotFound

So it looks as if the problem isn't XBMC.

JR
Thanks a lot, I'll check that
I have a problem when you open RTMP stream. XBMC hangs on forever.
Help to play stream Huh
Site http://www.debilizator.tv/big.cgi?kanal=18
xbmc debug log http://pastebin.com/P9yGUY7d
Plugin code (example)
Code:
#!/usr/bin/python
import xbmc, xbmcgui, xbmcplugin
item = xbmcgui.ListItem("TEST")
item.setProperty("PlayPath", "rtmp://212.113.32.210/tv")
item.setProperty("SWFPlayer", "http://www.debilizator.tv/pl.cgi?Kan=d725fe7aaa083beb44b1c02617d76dad")
item.setProperty("PlayPath", "tv")
item.setProperty("pageUrl",   "http://www.debilizator.tv/tv.cgi?kanal=18")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play("rtmp://212.113.32.210/tv", item)
Don't use xbmc.Player.play. Use setResolvedUrl instead. It's far, far nicer.

EDIT: From your debug log it seems to be stuck whilst trying to communicate with the server. It might time out if you leave it.
I changed the code to such a state. XBMC does not even try anything to play. I correctly use setResolvedUrl (...)?

Code:
#!/usr/bin/python
import xbmc, xbmcgui, xbmcplugin

item = xbmcgui.ListItem("TEST", path="rtmp://212.113.32.210/tv")
item.setProperty("PlayPath", "rtmp://212.113.32.210/tv")
item.setProperty("SWFPlayer", "http://www.debilizator.tv/pl.cgi?Kan=d725fe7aaa083beb44b1c02617d76dad")
item.setProperty("PlayPath", "tv")
item.setProperty("pageUrl",   "http://www.debilizator.tv/tv.cgi?kanal=18")
xbmcplugin.setResolvedUrl(0, True, item)

At the above site RTMP stream called stable.
In what may be the reason hangs XBMC?
Maybe swf player sends a signature?
All to no avail.
Tell my, where to dig?
Can you get the stream working with rtmpdump? It's much easier to get it working there first.

Cheers,
Jonathan
Opps, rtmpdump also hangs. What to do?
You could try contacting the rtmpdump developers - they are likely in a better position to diagnose the issue.
How to disable the ability to fast forward and rewind when playing RTMP streams?
I have XBMC hangs Sad