Specifying a start location on an RTMP stream
#1
Hi

I'm writing a plugin to stream entire concerts of a webpage.
The website has 1 stream per concert, but I've fetched a list of songs in each concert and their starting location in the stream.
I just haven't been able to figure out how to start playing the stream, and then skipping to a certain point in the stream. Can anybody help me here?

I've tried looking a some other alike plugins, but I haven't found any examples of this, or any location where this could be documented.

Any help would be gladly accepted.

/Tenzer
Reply
#2
xbmc.Player().seekTime?

edit:
Oh, wait, plugin... hmmm...
Reply
#3
Okay, so I've found out that xbmc.Player().seekTime() is probably what I'm looking for. However, everytime I call that function the XBMC interface locks up (Testing on Windows 7), but the sound from the video continues to play.
At this point I can only force quit XBMC. Any suggestions?
Reply
#4
Oh, stupid me, I didn't include the messages from the log file. This starts a bit before I attempt to jump ahead in the stream:
Code:
16:33:27 T:788 M:2558574592   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66279 bytes
16:33:27 T:788 M:2558136320   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 58747 bytes
16:33:28 T:788 M:2556805120   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66777 bytes
16:33:28 T:788 M:2557841408   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65746 bytes
16:33:28 T:788 M:2557812736   DEBUG: RTMP_LIB::CRTMP::SendBytesReceived, Send bytes report. 0x2eefd2 (3076050 bytes)
16:33:28 T:788 M:2557816832   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65926 bytes
16:33:28 T:788 M:2557816832   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 63382 bytes
16:33:29 T:788 M:2557816832   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 69214 bytes
16:33:29 T:788 M:2557816832   DEBUG: demuxer seek to: 2643000
16:33:29 T:788 M:2557816832  NOTICE: RTMP Seek to 2643000 requested
16:33:29 T:788 M:2557816832   DEBUG: demuxer seek to: 2643000, success
16:33:29 T:788 M:2559184896 WARNING: CDVDMessageQueue(teletext)::Put MSGQ_NOT_INITIALIZED
16:33:29 T:3096 M:2559234048   DEBUG: CApplication::OnPlayBackSeek - Playback skip
16:33:29 T:3096 M:2559234048    INFO: Scriptresult: Success
16:33:29 T:788 M:2559234048   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66156 bytes
16:33:29 T:3096 M:2559234048    INFO: Python script stopped
16:33:29 T:3096 M:2559234048   DEBUG: Thread 3096 terminating
16:33:29 T:788 M:2559254528   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65888 bytes
16:33:30 T:788 M:2559234048   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 60790 bytes
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 69327 bytes
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66016 bytes
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandlePing, received: ping, type: 1
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandleChangeChunkSize, received: chunk size change to 4096
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandlePing, received: ping, type: 4
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandlePing, received: ping, type: 0
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: invoke 173 bytes
16:33:30 T:788 M:2559238144   DEBUG: START AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: Property: <no-name. STRING: onStatus>
16:33:30 T:788 M:2559238144   DEBUG: Property: <no-name. NUMBER: 0.00>
16:33:30 T:788 M:2559238144   DEBUG: Property: NULL
16:33:30 T:788 M:2559238144   DEBUG: Property: OBJECT ====>
16:33:30 T:788 M:2559238144   DEBUG: START AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: level,  STRING: status>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: code,  STRING: NetStream.Seek.Notify>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: description,  STRING: Seeking 2643000 (stream ID: 1).>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: details,  STRING: astroid/astroid_F8_1Mb>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: clientid,  STRING: A15QVru2>
16:33:30 T:788 M:2559238144   DEBUG: END AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: END AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandleInvoke, server invoking <onStatus>
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandleInvoke, onStatus: NetStream.Seek.Notify
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: invoke 146 bytes
16:33:30 T:788 M:2559238144   DEBUG: START AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: Property: <no-name. STRING: onStatus>
16:33:30 T:788 M:2559238144   DEBUG: Property: <no-name. NUMBER: 0.00>
16:33:30 T:788 M:2559238144   DEBUG: Property: NULL
16:33:30 T:788 M:2559238144   DEBUG: Property: OBJECT ====>
16:33:30 T:788 M:2559238144   DEBUG: START AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: level,  STRING: status>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: code,  STRING: NetStream.Play.Start>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: description,  STRING: Started playing astroid/astroid_F8_1Mb.>
16:33:30 T:788 M:2559238144   DEBUG: Property: <Name: clientid,  STRING: A15QVru2>
16:33:30 T:788 M:2559238144   DEBUG: END AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: END AMF Object Dump:
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::HandleInvoke, server invoking <onStatus>
16:33:30 T:788 M:2559295488   DEBUG: RTMP_LIB::CRTMP::HandleInvoke, onStatus: NetStream.Play.Start
16:33:30 T:788 M:2559324160   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: notify 24 bytes
16:33:30 T:788 M:2559324160   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: notify 44 bytes
16:33:30 T:788 M:2559324160   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: notify 340 bytes
16:33:30 T:788 M:2559352832 WARNING: CDVDPlayer::CheckContinuity - stream forward jump detected (2)
16:33:30 T:788 M:2559266816   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65882 bytes
16:33:30 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::SendBytesReceived, Send bytes report. 0x38569c (3692188 bytes)
16:33:31 T:788 M:2559258624   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 64162 bytes
16:33:31 T:788 M:2559258624   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 68938 bytes
16:33:31 T:788 M:2559258624   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65952 bytes
16:33:31 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 67049 bytes
16:33:32 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 60301 bytes
16:33:32 T:788 M:2559238144   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 71453 bytes
16:33:32 T:788 M:2559025152   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 67882 bytes
16:33:33 T:788 M:2558963712   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 67194 bytes
16:33:33 T:788 M:2559000576   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 56259 bytes
16:33:33 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::SendBytesReceived, Send bytes report. 0x41c599 (4310425 bytes)
16:33:33 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 70170 bytes
16:33:33 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 67741 bytes
16:33:33 T:788 M:2558828544   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 69485 bytes
16:33:33 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 53254 bytes
16:33:34 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66974 bytes
16:33:34 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 67287 bytes
16:33:34 T:788 M:2558836736   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65762 bytes
16:33:35 T:788 M:2558816256   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 62901 bytes
16:33:35 T:788 M:2557386752   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65567 bytes
16:33:35 T:788 M:2555924480   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 68043 bytes
16:33:35 T:788 M:2555924480   DEBUG: RTMP_LIB::CRTMP::SendBytesReceived, Send bytes report. 0x4b2d9c (4926876 bytes)
16:33:36 T:788 M:2555924480   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 65571 bytes
16:33:36 T:788 M:2555944960   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 63805 bytes
16:33:36 T:788 M:2555961344   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 68949 bytes
16:33:36 T:788 M:2555924480   DEBUG: RTMP_LIB::CRTMP::GetNextMediaPacket, received: FLV tag(s) 66136 bytes
Reply
#5
The seek handling in the old RTMP code is buggy. Works fine if you use the new librtmp. http://forum.xbmc.org/showthread.php?tid=70512

But also, using librtmp you can just specify to start playing at a specific point, you don't need to send separate Play+Seek commands. Just add " start=<milliseconds>" to the RTMP URL.
Reply
#6
Great, thank you. I guess I'll just insert the start pointer in the URL for now, and then remove the seekTime() call.

I should probably also test on a newer dev release, just to make sure it will work with future versions as well.
Reply

Logout Mark Read Team Forum Stats Members Help
Specifying a start location on an RTMP stream0