-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
added RTMP support. fixes #559 #605
Conversation
This is great, thanks. It might take some time to dig through the changes here and in the swf. If I could get you to write some unit tests around some of this, that'd help a lot. I like the comma separated url method, it's pretty clean. Trying to think if there's any edge cases where another comma might be in the URL. |
I'll try and get some unit tests added by the end of the weekend. I also wasn't sure with the comma, I thought about using a pipe but I imagine we could think of edge cases for just about everything. |
Great. Yeah, I can't think of anything better off the top of my head. On Jun 27, 2013, at 10:41 AM, Jeremy West notifications@github.com wrote:
|
You probably already know this, but for others coming across this thread you can also put streaming media in a source tag and video.js will play it on iOS/Mac OSX Safari.
|
@tim-peterson good point! But we must not confuse HTTP streaming (which is not a mainstream thing yet) with RTMP streaming. |
…nd allow for it to be missing. Add unit tests for changes. Add in the latest video SWF.
Checking if this still applies with the recent swf RTMP update |
Too many tabs open. What I meant to say here is that you should pull in #634 instead. |
…double quotes to validate under JSHint ruleset
@@ -49,6 +49,24 @@ When adding additional Tech to a video player, make sure to add the supported te | |||
techOrder: ["html5", "flash", "other supported tech"] | |||
}); | |||
|
|||
Flash Technology | |||
================== | |||
The flash playback tech is a part of the default `techOrder`. You may notice undesirable playback performance in browsers that are subject to using this playback tech, in particular when scrubbing and seeking within a video. These performance issues are a result of flash's progressive video playback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actual docs, fantastic! Looks good to me. Looks like this is now the pull request to take in and delete the other two. I have a few small comments in here, but nothing major...
A nitpick, but I always see "flash" as "Flash".
Is it playback performance that's the problem with progressive video, or just "playback behavior"? I assume this scrubbing/seeking comment is about the fact that you can't seek into a progressive video as done currently. I was confused here for a second, wondering what the "performance" part of this was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it might be fair to call it "behavior." Technically the browser is doing progressive playback too with HTML5, its just that its able to request content ranges so it appears to be more responsive when seeking.
@heff perhaps b/c you work at Zencoder, you might include in this thread a link or short description of how this Video.js RMTP integration would work with Zencoder's API? |
…ed seek check for flash RTMP playback in progress control
@heff This is the pull request that to me looks to have everything in it. @iamjem I checked over the last two commits, the only things I haven't looked at yet, and they look fine to me too. The only thing I didn't know about was whether anything else needed to be done when adding a new function on player.js. |
…mp-support Conflicts: src/js/media/flash.js
Awesome, thanks everyone! This is great work. Pulling it in. |
Fantastic to see! Thanks for all of the work @iamjem! |
And now we have a live demo. |
I've confirmed that 4.2 does work with Cloudfront rtmp, but I can't seem to get it to work with Cloudfront Signed URLs. My signing process works fine for downloaded content and the rtmp URL appears to be correct. Can anyone else confirm that it plays with signed URLs? |
I'm not familiar with signed URLs for RTMP myself. Anyone else? |
Hi folks, thanks for the awesome job! What about live support? You say in the blog "We haven’t updated the UI to support live yet." Can I run live stream in a "dev" mode somehow? |
I'm entering this discussion a little late, but as far as the signed URLs go, is this referring to the RTMPS protocol? I was not able to get RTMPS to work with Cloudfront during testing, but that may have been user error on my part if there are additional steps involved to use RTMPS. |
@avaranovich, you can play live video, however the UI (progress bar) stays on 0 because there isn't a "duration" on a live video. You could add to the css to display a better graphic, showing the user that the video is live and cannot be scrubbed. Here is an example: I'm currently contributing to enhancements to live video soon. |
The issue is with the & prior to the file name. What is the purpose of it? Can we update the .swf so that it doesn't require it or uses a different symbol? Cloudfront uses a querystring to pass the signed values resulting in something similar to the below: rtmp://sXXXXX.cloudfront.net:1935/cfx/st/&mp4:{FileName}.mp4?Expires={Epoch}&Signature={Signature}&Key-Pair-Id={KeyPairID} I have confirmed that my signed URL does work properly by testing using the Amazon Diagnostic Client here: http://d1k5ny0m6d4zlj.cloudfront.net/diag/CFStreamingDiag.html |
The ampersand is a delimiter that separates the connection from the stream. It needs to be separated in order for Flash to connect to rtmp and then play the stream. Although, I'm not sure the regex supports the port number in your rtmp url, I'd have to research. Can you send me a working url privately? I can debug it for you to help the research against the port number. |
I have verified that the port number is not necessary, but removing it does not fix the issue. I sent you an email via your website, please reply when able for a signed example. |
This has been resolved, 4.2.1 does play with Amazon Cloudfront signed and unsigned RTMP videos. I hope this helps someone else, when signing HTTP downloads, use the full path to the file, including the domain. When signing RTMP files, only use the path to the actual video, excluding the leading /, if your video is in the root of the bucket, use Video.mp4, not /Video.mp4. For subfolders, use Subfolder/Video.mp4, not /Subfolder/Video.mp4. |
This has been a savior! Thanks to @LeDeau and all those who have commented out here. I was stuck at using signed URL's in videojs. Signing only the path to actual video and excluding the domain helped! |
I made these additions last year and have been using in production for a while with no problems. I've also committed a pull request to the video-js-swf project, and that same compiled SWF is included here.
Using streaming is pretty simple now, you can add a
<source>
element with type set tortmp/mp4
orrtmp/flv
whose src attribute uses this comma separated format: {{ connection url }},{{ stream url }}For example, using Amazon Cloudfront, you might have a
<source>
element that looks like this:The only caveat is that RTMP sources need to appear BEFORE other flash compatible progressive types, because the Flash tech will pick the first compatible one it finds.
You should also be able to use the
playerInstance.src()
method with RTMP strings like this: