rtmp stream location guess too clever #9
Comments
So now you can configure for example: rtmp: 'rtmp://s3b78u0kbtx79q.cloudfront.net/cfx/st' that's the location of RTMP server. Then there is the file name which is given with Thanks |
Allow full rtmp addresses in a new config option. Like |
How do I know which part of the URL is the netConnectionUrl and which part is the file ? |
Impossible to know netConnectionUrl from this for example:
The goal is to make it easy to configure both HTML5 and RTMP urls. |
Perhaps ask the AS3 cracks how they handle this in fp3? Otherwise you can't use rtmp in many real world scenarios. |
Related: http://flowplayer.org/forum/#!/moot/594 - although I hope to solve this for fp3, see:flowplayer/flash#21 - I simply just did not have the time for it. But yes, I think there should also be an option to configure an independent clip url for flash - automatisms are nice, but getting caught in them is not. |
I think this would be rather nice way to configure it: <source type="rtmp/mp4" src="mp4:bauhaus/foo"/>
<source type="rtmp/flv" src="foo.flv"/> |
As I want to avoid additional options as much as you do, how about this:
This would even take care of e.g. cloudfront signed urls which alternate between http for html5 and rtmp for flash - if I were to introduce html5 for this demo: http://flowplayer.blacktrash.org/cfxsigned.php, the signatures for http and rtmp would differ completely. We don't need 2 flash urls, imho. You either serve mp4 or flv. |
Those were just possible examples of configuring the |
+1 on having the option to configure a different url for flash in fp5. It's currently a hassle to handle cloudfront urls. |
Sure Mickey, will do. Just discussing how. I personally prefer to use additional |
@mickey can you describe your use case so I can provide a good fix here |
We have mp4 videos served with cloudfront. We're currently using this hack to make it work: HTML: <div class='flowplayerv2 minimalist audition-player' non_encoded_url='#{url}'>
<video autoplay src='#{encoded_url}' type="video/mp4" /> JS: function supports_video() {
return !!document.createElement('video').canPlayType;
}
function supports_h264_baseline_video() {
if (!supports_video()) { return false; }
var v = document.createElement("video");
return v.canPlayType('video/mp4; codecs="avc1.42E01E, mp4a.40.2"');
}
$(function() {
var support = supports_h264_baseline_video();
if (support != "" && support != false) {
$(".flowplayerv2 video").attr("src", $(".flowplayerv2").attr("non_encoded_url"));
}
$(".flowplayerv2").flowplayer({
swf: '/flash/flowplayer-5.0.0.swf',
key: "$7777",
analytics: "5555"
});
}); I guess flowplayer has his own browser video support detection. So ideally I would transform my code to this: $(".flowplayerv2").flowplayer({
swf: '/flash/flowplayer-5.0.0.swf',
flashurl: $(".flowplayerv2").attr("encoded_url"),
key: "$7777",
analytics: "5555"
});
}); |
@mickey - unfortunately codec support detection does not work reliably, at least according to my experiments e.g. to fail over to baseline profile for small iOS devices. @tero - one simple example is: For flash I deploy a different file with a different filename than for html5 to profit from the fact that flash allows reliably high encoding profiles for h.264, I therefore get better quality at lower bitrate in flash. |
Thanks @mickey and @blacktrash. So I'll implement following <video>
<!-- for html -->
<source type="video/mp4" src="bauhaus/foo.mp4"/>
<!-- for flash, overrides html/mp4 -->
<source type="video/mp4/flash" src="bauhaus/foo-xyz.mp4"/>
</video> Does that work for you? |
Perfect, makes sense to have it directly here. |
I don't know why you want to specify mp4, why not just |
Because I suggested something. Will use |
@blacktrash do we need |
Ignore my last question; we need it so we know which part of the url belongs to Flash netConnection |
Done. Here is a demo: http://example.flowplayer.org/basics/rtmp.html flash engine now understands "video/flash" the order of the the URL determination is now dummy. no wisdom. just given directly to the play() method |
As long as the probably "illegal" html5 source type does not cause problems: good. But the "video does not play through" issue is back with rtmp. Stops at 36 or 37 seconds here. |
It has actually been there always but haven't been debugged with RTMP before. Now also fixed from RTMP. |
I know it had always been there, but did not want to get on your nerves ;-) |
heh, thanks... with this speed I think we're getting close to 5.1 |
I can't get rtmp to work anymore - with or without video/flash: |
Your example does not really try to configure rtmp. Please follow this demo: |
What's wrong with: flowplayer.conf = {
swf: "http://example.flowplayer.org/flowplayer.swf",
engine: "flash",
rtmp: "rtmp://stream.blacktrash.org/cfx/st"
}; ??? |
btw, I tried with data-* attributes first actually - failed as well. |
AHA - only works with |
I was looking at this page: http://flowplayer.blacktrash.org/fp5/mp4only.html |
Yes. It has the mentioned global config. |
Now also the data-* attributes. If video/flash is not specified as first source, it does not work. |
Updated flowplayer.js. Your page works now. |
Thumbs up! |
HELLO BLACKTRASH PLEASE HOW CAN I DOWNLOAD THIS EMBEDED VIDEO |
As far as I can see the rtmp fallback assumes an mp4 file with an identical filename in an identical filesystem (bucket) layout as the http url. There is no way to specify an rtmp filename.
This will fail in a lot of circumstances for a lot of reasons. For instance:
or in case of a different rtmp directory/bucket or filename layout etc. etc.
An option to configure the actual rtmp stream location is needed for the cases where the deriving logic is not applicable.
The text was updated successfully, but these errors were encountered: