Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to play rtmp from AWS Cloudfront RTMP distribution #57

Closed
danielrsgomes opened this issue Aug 12, 2016 · 14 comments
Closed

Not able to play rtmp from AWS Cloudfront RTMP distribution #57

danielrsgomes opened this issue Aug 12, 2016 · 14 comments

Comments

@danielrsgomes
Copy link

danielrsgomes commented Aug 12, 2016

I can reproduce with no problem here on the their debug player: http://d1k5ny0m6d4zlj.cloudfront.net/diag/CFStreamingDiag.html

My setup is ok, cause it works fine when playing rtmp from nginx server.
I also can play the RTMP vod file from wowza flash player:
https://www.wowza.com/testplayers

host: rtmp://rtmp.conanewborn.com.br:1935/cfx/st
file/stream: entrada

My player setup:

<script> var player = new Clappr.Player({ source: "rtmp://rtmp.conanewborn.com.br:1935/cfx/st/entrada", poster: "poster.jpg", parentId: "#player_57ae3ed6cd36f", plugins: { container: [TextOverlay], playback: [RTMP] }, textOverlay: "test", rtmpConfig: { swfPath: '//cdn.jsdelivr.net/clappr.rtmp/latest/assets/RTMP.swf', scaling:'stretch', playbackType: 'vod', bufferTime: 1, startLevel: 0 } }); </script>

Does anybody knows if that is a limitation or bug? Any tip?
Thanks

@gfronza
Copy link
Collaborator

gfronza commented Aug 15, 2016

@daniel2surf

I tried to reproduce this stream URL
rtmp://rtmp.conanewborn.com.br:1935/cfx/st/entrada But I'm getting StreamNotFound.

Can you provide me with another valid URL?

@danielrsgomes
Copy link
Author

danielrsgomes commented Aug 15, 2016

@gfronza I just tried again... And it is playing...
Can you try again here: http://d1k5ny0m6d4zlj.cloudfront.net/diag/CFStreamingDiag.html
Streaming distribution: rtmp.conanewborn.com.br
Video filename: entrada
Thanks

@gfronza
Copy link
Collaborator

gfronza commented Aug 15, 2016

Ok now it's working! Thanks!

@gfronza
Copy link
Collaborator

gfronza commented Aug 15, 2016

@daniel2surf I added some logging and noticed a security error when loading the URL. The streaming is not playing because of that. I'll add more debugging lines to help identify those cases.

@danielrsgomes
Copy link
Author

@gfronza If the other rtmp players are able to play it, Clappr RTMP should play as well... Don't you think?
Any idea how to solve it?

@gfronza
Copy link
Collaborator

gfronza commented Aug 15, 2016

@daniel2surf Yes, but so far I couldn't identify the reason for this MediaErrorEvent Connection Failed. I'll have to rebuild Adobe OSMF with logging directive enabled to have a more detailed view of the problem.

@gfronza
Copy link
Collaborator

gfronza commented Aug 15, 2016

@daniel2surf I found the issue. OSMF (a very old Adobe project) is ruling out the application instance in the path (in your case the app instance is st. Then, when trying to connect to app /cfx without specifying the instance name, the result is Connection failed.. I never noticed this because all streaming servers I worked with used the default instance (_definst_) and OSFM has a special treatment for it (rsrs).

I have a "fork" of the OSMF project and will make the fix.

@danielrsgomes
Copy link
Author

@gfronza Haha...
AWS Cloudfront RTMP is the first one behaving this way for me as well...
Good Job! Thanks

@gfronza
Copy link
Collaborator

gfronza commented Aug 17, 2016

@daniel2surf I found out that the fix is not as simple as I first thought :(
As a temporary solution, is it possible for you to use the default instance? (definst)? I'm still thinking on how I'm going to solve this without breaking anything.

@danielrsgomes
Copy link
Author

@gfronza Thanks for your effort. I cannot use default instance as it is all setup by aws cloudfront distribuition... The "/cfx/st/" is their standard path...
I'm using a nginx-rtmp for now...
What do you think about using as parameters: host and filename. So it would be passed to the rtmp plugin and the swf player...

@gfronza
Copy link
Collaborator

gfronza commented Aug 19, 2016

@daniel2surf Adding host and filename/streamname as arguments wouldn't be a clappr-like solution. So I decided to add a boolean parameter called useAppInstance. In your case you just have to set it to true.

https://github.com/flavioribeiro/clappr-rtmp-plugin/releases/tag/0.0.14

Let me know if I can close this issue (after your validation).

@danielrsgomes
Copy link
Author

danielrsgomes commented Aug 19, 2016

@gfronza Still not able to play... Using your rtmp.min.js release...
Here is the code i'm using:
https://gist.github.com/daniel2surf/ed82d7da0f9ff87366f9ed10170c1969

@gfronza
Copy link
Collaborator

gfronza commented Aug 19, 2016

@daniel2surf the CDN (jsdelivr) is outdated due to the repo ownership change. We already asked them to update, but nothing so far. You'll have to host the SWF file yourself for now.

Oh, and you have to use both rtmp.min.js and the RTMP.swf from this latest release.

@danielrsgomes
Copy link
Author

@gfronza Working perfect now... Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants