Help with streaming rtmp server
#1
I try this script:
import xbmc, xbmcgui

playpath = "MetroTV"
rtmp_url = "rtmp://cdn.mivo.tv:1935/mivotv"
swf_url = "http://mivo.tv/ImediabizTV.swf"
page_url = "http://www.mivo.tv"
item = xbmcgui.ListItem("mivotv")
item.setProperty("PlayPath", playpath)
item.setProperty("SWFPlayer", swf_url)
item.setProperty("PageURL", page_url)
item.setProperty("tcUrl", rtmp_url)
item.setProperty("IsLive", "true")
xbmc.Player(xbmc.PLAYER_CORE_DVDPLAYER).play(rtmp_url, item)


but when i try using flvstreamer
flvstreamer -r rtmp://cdn.mivo.tv:1935/mivotv/MetroTV --flv rec.flv

it works and start recording.

Any idea what is going wrong? Thank you!
Reply
#2
Check debug log for info from librtmp as it connects and comunicates with the flash server. Possibly one of the parameters above is not the same as used by the real SWF player and/or flvstreamer.
If you have a problem, first search to see if it's already been addressed.
Then, read this. Include exactly which version of XBMC and plugin/script you're using. 'latest' means nothing and may lead to rage and/or a lack of helpful replies.
Reply
#3
20:27:05 T:2831125360 M:1401409536 NOTICE: -->Python Interpreter Initialized<--
20:27:05 T:3077982096 M:1402933248 NOTICE: DVDPlayer: Opening: rtmp://cdn.mivo.tv/mivotv/
20:27:05 T:3077982096 M:1402933248 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
20:27:05 T:3000802160 M:1402933248 NOTICE: Creating InputStream
20:27:06 T:3000802160 M:1402912768 NOTICE: Creating Demuxer
20:27:08 T:2873084784 M:1399492608 WARNING: Skin has invalid include: DialogInfo
20:27:08 T:2873084784 M:1399492608 WARNING: Skin has invalid include: DialogInfo
20:27:17 T:3000802160 M:1399500800 ERROR: HandleInvoke, error decoding invoke packet
20:56:34 T:3000802160 M:1399287808 ERROR: ReadPacket, failed to read RTMP packet header
20:56:34 T:3000802160 M:1399287808 NOTICE: Opening video stream: 0 source: 256
20:56:34 T:3000802160 M:1399287808 NOTICE: Creating video codec with codec id: 0
20:56:34 T:3000802160 M:1399160832 ERROR: Unsupported video codec
20:56:34 T:3000802160 M:1399033856 WARNING: OpenVideoStream - Unsupported stream 0. Stream disabled.
20:56:34 T:3000802160 M:1399033856 NOTICE: Opening audio stream: 1 source: 256
20:56:34 T:3000802160 M:1399033856 NOTICE: Finding audio codec for: 0
20:56:34 T:3000802160 M:1398652928 ERROR: Unsupported audio codec
20:56:34 T:3000802160 M:1398652928 WARNING: OpenAudioStream - Unsupported stream 1. Stream disabled.
20:56:34 T:3000802160 M:1398652928 WARNING: Process - Could not detect frame rate for: rtmp://cdn.mivo.tv/mivotv/. Using default of 25.000 fps for conversion of any commercial break frame markers to times.
20:56:34 T:3000802160 M:1398652928 NOTICE: CDVDPlayer::OnExit()
20:56:34 T:3000802160 M:1398652928 NOTICE: DVDPlayer: eof, waiting for queues to empty
20:56:34 T:3000802160 M:1398652928 NOTICE: CDVDPlayer::OnExit() deleting demuxer
20:56:34 T:3000802160 M:1398652928 NOTICE: CDVDPlayer::OnExit() deleting input stream
20:56:34 T:3000802160 M:1398652928 NOTICE: Deleted CRTMP
20:56:35 T:3077982096 M:1398669312 NOTICE: CDVDPlayer::CloseFile()
20:56:35 T:3077982096 M:1398669312 WARNING: CDVDMessageQueue(player):Tongueut MSGQ_NOT_INITIALIZED
20:56:35 T:3077982096 M:1398669312 NOTICE: DVDPlayer: waiting for threads to exit
20:56:35 T:3077982096 M:1398542336 NOTICE: DVDPlayer: finished waiting
20:56:35 T:3077982096 M:1398923264 ERROR: Unable to open audio mixer

any suggestions?
Reply
#4
Works fine for me, using this code...

http://trac.xbmc.org/ticket/8971

I have no idea why you're getting an immediate EOF. Since you can use flvstreamer successfully, with only the rtmp url and playpath, have you tried it already with just those parameters? (I.e., omit the pageurl and swfurl)
Reply
#5
So, the code works fine with your system.
The problem should be in my xbmc.

How to apply the patch?
thanks.
Reply
#6
acaisampah Wrote:... useless log ...
any suggestions?

That isn't a debug log, and therefor isn't any help. http://wiki.xbmc.org/index.php?title=Log_file
If you have a problem, first search to see if it's already been addressed.
Then, read this. Include exactly which version of XBMC and plugin/script you're using. 'latest' means nothing and may lead to rage and/or a lack of helpful replies.
Reply
#7
this is the debug log

http://pastebin.com/gMzYq6Qp

script crash at the end.
Reply
#8
acaisampah Wrote:this is the debug log

http://pastebin.com/gMzYq6Qp

script crash at the end.

Your script shows problems with two different RTMP URLs. For the first one,
rtmp://202.158.49.22/allohuakbar fails because the server uses secureToken authorization, and XBMC's code doesn't support that. You can see that in these lines of the log:

Code:
#
14:12:37 T:3031432048 M:1398804480   DEBUG: Property: <Name: objectEncoding,  NUMBER: 0.00>
#
14:12:37 T:3031432048 M:1398804480   DEBUG: Property: <Name: secureToken,  STRING: 1e508c7fcfd6f13a13dd82d86a645d642f0e20d6cd97701d8dd3e61fc2598636d3831aeb>

For the second one rtmp://cdn.mivo.tv/mivotv, it fails because the server sends some data types that XBMC doesn't support:

Code:
#
14:19:21 T:3031432048 M:1397923840   DEBUG: GetNextMediaPacket, received: invoke 259 bytes
#
14:19:21 T:3031432048 M:1397923840   DEBUG: Decode - unknown datatype 0x08
#
14:19:21 T:3031432048 M:1397923840   DEBUG: Decode - unknown datatype 0x64
#
14:19:21 T:3031432048 M:1397923840   ERROR: HandleInvoke, error decoding invoke packet

The rtmpdump librtmp supports both of these, but you need to find the correct key to use for the secureToken server. It is usually embedded in the web page or the SWF player that was used to play that RTMP URL. If you don't provide the right key, you can't access the stream.

edit: I've updated the patch http://trac.xbmc.org/ticket/8971 to handle the secureToken key. But you still have to find the actual key yourself.
Reply
#9
Hi, i have one question about how i could implement this patch (http://trac.xbmc.org/ticket/8971)? should i compile source files by myself, or there is somewhere compiled binaries.
Sorry mayby it is silly question but thanks for any help Smile
Reply
#10
How to apply Token authorization in python?
use item.setProperty?
Reply
#11
Append the key to the rtmp URL.

rtmp://host/app/whatever token=the_key
Reply

Logout Mark Read Team Forum Stats Members Help
Help with streaming rtmp server0