0

I have one Flash player (only SWF file, no sources) that we use on our intranet project to play RTMP streams. Today I'm stuck with new RTMP URL that could not be played with this player. At the same it easily played with MediaElements.js buit-in SWF-player. I wonder, what could it be?

I have only one clue: when I use rtmpdump, stream is loading only with --live flag. But debug output is controversial for me. Since --live flag only invoking FCSubscribe, then server answers that Method not found (FCSubscribe) and now stream is starting.


Some rtmpdump output.

Without --live flag I get this:

DEBUG: Invoking createStream
DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <createStream>
DEBUG: SendPlay, seekTime=0, stopTime=1000, sending play: livestream_3
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: RTMP_ClientPacket, received: invoke 185 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING: error>
DEBUG: Property: <Name:               code, STRING: NetStream.Play.StreamNotFound>
DEBUG: Property: <Name:        description, STRING: Failed to play livestream_3; stream not found.>
DEBUG: Property: <Name:            details, STRING: livestream_3>
DEBUG: Property: <Name:           clientid, STRING: qAASQnAA>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.StreamNotFound
ERROR: Closing connection: NetStream.Play.StreamNotFound
DEBUG: Closing connection.

With it I get this:

DEBUG: Invoking createStream
DEBUG: FCSubscribe: livestream_3
DEBUG: Invoking FCSubscribe
DEBUG: RTMP_ClientPacket, received: invoke 29 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_result>
DEBUG: HandleInvoke, received result for method call <createStream>
DEBUG: SendPlay, seekTime=0, stopTime=1000, sending play: livestream_3
DEBUG: Invoking play
DEBUG: sending ctrl. type: 0x0003
DEBUG: RTMP_ClientPacket, received: invoke 119 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING: error>
DEBUG: Property: <Name:               code, STRING: NetConnection.Call.Failed>
DEBUG: Property: <Name:        description, STRING: Method not found (FCSubscribe).>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <_error>
ERROR: rtmp server sent error
DEBUG: HandleChangeChunkSize, received: chunk size change to 4096
DEBUG: HandleCtrl, received ctrl. type: 0, len: 6
DEBUG: HandleCtrl, Stream Begin 1
DEBUG: RTMP_ClientPacket, received: invoke 166 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING: status>
DEBUG: Property: <Name:               code, STRING: NetStream.Play.Reset>
DEBUG: Property: <Name:        description, STRING: Playing and resetting livestream_3.>
DEBUG: Property: <Name:            details, STRING: livestream_3>
DEBUG: Property: <Name:           clientid, STRING: qAARQnAA>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.Reset
DEBUG: RTMP_ClientPacket, received: invoke 160 bytes
DEBUG: (object begin)
DEBUG: Property: NULL
DEBUG: (object begin)
DEBUG: Property: <Name:              level, STRING: status>
DEBUG: Property: <Name:               code, STRING: NetStream.Play.Start>
DEBUG: Property: <Name:        description, STRING: Started playing livestream_3.>
DEBUG: Property: <Name:            details, STRING: livestream_3>
DEBUG: Property: <Name:           clientid, STRING: qAARQnAA>
DEBUG: (object end)
DEBUG: (object end)
DEBUG: HandleInvoke, server invoking <onStatus>
DEBUG: HandleInvoke, onStatus: NetStream.Play.Start
Starting Live Stream

P.S. I'm not AS2/AS3 developer, so I'm not to familiar with all RTMP-like things in Flash.

VC.One
  • 14,790
  • 4
  • 25
  • 57
Lehych
  • 166
  • 1
  • 12
  • how do you tell the swf to play the video? – BadFeelingAboutThis Jun 30 '14 at 19:18
  • @LDMediaServices I pass rtmp URL in flashvars. It worked like this with previous streams. But don't work now with different stream from different server (and I do not know anything about this server unfortunately for now). – Lehych Jun 30 '14 at 19:50

1 Answers1

1

Sorry, but the short answer is you cannot fix this without the source code. There is a function missing to handle the onFCsubscribe method that some CDN servers use.

Not all streams/servers will do this request so that's why you've been lucky so far. But really that coder should have done better testing instead of assuming all RTMP streams are equal.

I answered a similar question [ link below ] and if you look at that source code, you will see there is a onFCSubscribe function. If you (or someone who can help) compile that example code with your own stream link it would most likely work.

Or you could just contact the SWF creator to update their code and send you a new recompiled SWF. The fix is a simple copy/paste from the above link's answer. Your complication is lack of source file...

Community
  • 1
  • 1
VC.One
  • 14,790
  • 4
  • 25
  • 57
  • Thanks. And do you know any source where I can find some description of what is FCsubscribe? I've found only this but I do not completly understood all the things about CDN-server-player interaction. I wanna try to talk with owners of stream that I have problems with to fix problem from theire side. So I want to know whether I can ask them to "turn of FCsubscribe requirement". – Lehych Jul 02 '14 at 08:47
  • 1
    `FCsubscribe` is a method of serving out streams. It's used by `Video-On-Demand` (VOD) to decide who can watch the stream. To explain simply: Think of a Sports channel, if you pay only for two hour boxing then your connection will be **FC UN-Subscribed** when the three hour football starts next after boxing. I don't know about turning it off as that affects their business model and frees the stream for everyone. In Flash its silly because to fix you just need a function to handle a `onFCsubscribe` request. It can even be empty but as long as its a handler for the that request, it all works – VC.One Jul 03 '14 at 09:30