Foliovision › Forums › FV Player › How to … › Multiple Resolutions – Quality Switching
-
Hi there,
I’ve been using FV Flowplayer for WordPress for a few months on my site, and I’m quite pleased with it.
I do have one nagging problem, however. I had several customers unable to stream my videos, apparently due to bandwidth restrictions on their end. As a result, I had to downgrade my video resolution to 360p to ensure everyone could view them.
This has led other customers of mine to complain about the video quality, observing rightly, that my video content really ought to be available in HD.
Is there a way to get FV Flowplayer for WordPress to serve different files for different bandwidths? Or perhaps allow viewers to select a desired resolution? I’ve looked on your site, and the info on this seems inconclusive. Any help would be appreciated.
Thanks,
David.
-
-
Hello David,
as our licensed user, you can install FV Player Pro (a Pro addon for our plugin) which contains this feature.
Here’s how to get the beta version which has this feature in it:
1) Please upgrade to latest FV Flowplayer.
2) Make sure your license key is in the plugin settings.
3) Open the plugin settings and add &pro_beta=yes to the end of URL and open that. So is you had
“http://your-site.com/wp-admin/options-general.php?page=fvplayer”
it will be
“http://your-site.com/wp-admin/options-general.php?page=fvplayer&pro_beta=yes”4) You should see the settings page again with a gray notice at the top: “Thank you for purchasing FV Flowplayer license!” and a “Get the FV Player PRO now!”
If you don’t see anything, please de-activate and re-activate the plugin and open the URL from step 3. again.
If you see the button, click it.
5) This will automatically download and install FV Player Pro. Then the page will reload and you will notice there is a “Pro Features” box.
Now I’ll describe the example use:
6) Enter following into the “Video quality switching (beta):” text box:
-360p,Low
-480p,Medium
-720p,High7) Now insert your video like this:
[fvplayer rtmp="https://cdn.foliovision.com/videos/your-video-480p.mp4" qsel="true"]
The qsel parameters tells the shortcode, that your //cdn.foliovision.com/videos/your-video-480p.mp4 video is also available in -480p and -720p and it also sets the default video quality to play. It literally just replaces “-360p” with “-480p” and “-720p”, so all the videos where you use qsel=”true” have to respect the naming.
So you have to have the following files ready:
/videos/your-video-360p.mp4
/videos/your-video-480p.mp4
/videos/your-video-720p.mp48) This was all tested on a fresh site here: ‘http://martin.domainearl.com/2014/04/quality-selection’
Our goal will be to make this work with WP cache plugins (if you do use one, exclude users with fv_player_quality cookie) and also switching the streams on-the-fly – without page reload (at least for most devices).
Thanks,
MartinAfter the video buffering times-out, I get the following error:
http://screencast.com/t/bSlouniwHello David,
1) It might take a week or two, as we are currently adjusting our internal license management interface.
It’s nothing that should stop you from trying out the plugin.
2) sorry about that, I haven’t checked the test RTMP stream.
I put up new MP4 videos into the test post: ‘http://martin.domainearl.com/2014/04/quality-selection’
As you can see, it currently reloads the page for quality selection, but we will work on improving that to work as seamlessly as possible (should work perfectly on any modern browser except iPad and iPhone which on the other hand support HLS with automated quality selection).
Thanks,
MartinThanks, Martin. I understand now.
This is a great start. I look forward to further refinements. As you mention, the page reload is a bit jarring, and a more seamless transition would be ideal.
Also, support for secure RTMP streaming via CloudFront is a priority for me. I think that deploying my videos on a CDN (especially the HD videos) will help my customers who currently experience streaming issues, but they need to be secure and not accessible to the general public. +1 on that.
Thanks again.
Martin, two other questions:
1) I notice in the shortcode above, RTMP is specified:
[fvplayer rtmp="https://cdn.foliovision.com/videos/your-video-480p.mp4" qsel="true"]Is that necessary? I’m currently hosting my videos in an S3 bucket, which isn’t an RTMP stream, is it? Can I simply add qsel=”true” to the end of the short code I’m already using? For example:
[fvplayer src='https://s3.amazonaws.com/PortraitDrawingCourse/640x360webm/PD5.5_Modeling_the_Ear_640x360.webm' src1='https://s3.amazonaws.com/PortraitDrawingCourse/640x360mp4/PD5.5_Modeling_the_Ear_640x360.mp4' qsel="true"]
2) I’m linking to both mp4 and webm files in my current shortcode to better accommodate Chrome users. Can the webm files also make use of quality switching, or just the mp4’s?
Hello David,
thank you for your kind words! We are always full of ideas about how to improve things and we try to listen to our users as well.
Your shortcode will work just fine. MP4 + WebM is not a problem, but an advantage, good to see that you take your video seriously!
I assume that in your case the naming scheme is like following:
640×360,Medium
1280×720,HighIn that case, you files:
“https://s3.amazonaws.com/PortraitDrawingCourse/640x360webm/PD5.5_Modeling_the_Ear_640x360.webm”
“https://s3.amazonaws.com/PortraitDrawingCourse/640x360mp4/PD5.5_Modeling_the_Ear_640x360.mp4”Needs to have higher quality versions:
“https://s3.amazonaws.com/PortraitDrawingCourse/1280x720webm/PD5.5_Modeling_the_Ear_1280x720.webm”
“https://s3.amazonaws.com/PortraitDrawingCourse/1280x720mp4/PD5.5_Modeling_the_Ear_1280x720.mp4”You are including 640×360 twice in your URLs, so it will be replaced twice.
However if you these files need Amazon S3 access keys, I’m not sure if that will work at this point.
It appears that you will have to swap lines
$media = $this->get_amazon_secure( $media, $this, $url_only );
and
$media = apply_filters( 'fv_flowplayer_video_src', $media, $this );
in fv-wordpress-flowplayer/models/flowplayer-frontend.php and only then it will work.
I’ll be able to test that at start of next week and release a new version if needed.
Thanks,
MartinHi Martin,
Thanks for the detailed info. My videos do in fact require access keys, so I think I’ll wait until you test this function next week. I’m only hesitating because I have a large number of videos and shortcodes that will need to be renamed/rewritten and I want to be reasonably sure everything I need works before proceeding.
Thanks and have a great weekend!
-DavidHello David,
please reinstall FV WordPress Flowplayer, it will have the required fix in it.
Then you can install FV Player Pro and get the quality switching.
By the way we recommend your files use prefixes like -mobile, -sd, -hd – much better than -240p, -480p, -720p, as you can vary the resolution across the files as needed.
Thanks,
MartinHello Chan,
looks like you are using an old version of PHP, at this point I’m not exactly sure what else could cause the error.
Could you please install this plugin to found out what your PHP version is? http://wordpress.org/plugins/display-php-version/ Or you can ask your web host support about the PHP version, they should know.
Thanks,
MartinHello Chan,
Glad to hear FV Player Pro works for you now. We will prepare the documentation for the quality switching, basically you need to enter something like this into its configuration box:
_432,Low
_720,HighThen in each video which is available in both qualities, you need to add qsel=”true” into the shortcode.
The quality selection buttons show up above the video. It could be integrated into the control bar at some point, it’s just a lot of styling to do and we put priority on making sure this works without having to reload the video.
Thanks,
MartinI posted a video with the switching and it seems not to work. It seems to play the highest video when selecting the others.
http://revivalishere.org/sermons/video-5-4-14-revival-is-here-church-service/
I don’t think I have a cache plugin. It might be in the theme. If so, I am working on another better theme.
Hello Chan,
Quality switching – your setup has some issues:
1) You only need to type in the video file once. Just input the video URL in the quality which you want as default. You currently have all three of them. So only keep this one:
http://example.rackcdn.com/5-4-14-432.mp4
2) Then fix your configuration of the quality types. It appears you have:
-360p,Low
-432p,Medium
-720p,HighWhile it should be:
-720,High
-432,Medium
-360,LowYou enter this together with qsel=”true” so that you don’t have to always enter all the video qualities. The file names must contain the “-720”, “-432” or “-360” part in URLs though.
3) The buttons are not looking the best on your website, we will make the styling more resilient.
Thanks,
MartinHello Chan,
it works for me now. Also, I’m not noticing any buffering issues.
You can include other file types, but HLS is currently not supported, as HLS contains automated quality switching built-in. But you can use RTMP for better streaming to devices which can’t play MP4 using HTML5 (Firefox on Mac, old Internet Explorer, Linux computers).
Thanks,
MartinIt seems to be a bug. I tried your site example of switching and it still does the same thing. I just wanted to let you know. It’s not really a big deal but it is a bug.
Also, I tried the Rackspace ios and streaming url for different src to make sure the file would play on all devices in a test page I made to try it. The switch will not shop up them. The video tested ok but will show the switch. It might be because as the end of the url is the same file name just different server feed. Would I have to rename the file alittle differently but with the same ending prefix and upload them for that to work?I have also seemed to have seen something in firefox. When trying the video you must first select high medium etc before clicking play or it will show a html5 file not found error. The one about adding different server feed was a error in wordpress adding a code when I forgot to hit text when entering it in. The bug with the ios needing to tap three times is still there.
Hello Chan,
1) The iPad bug – having to click the player 3 times – I can confirm this is related to the quality switching. I’ll work on fixing it tomorrow. We released FV Player Pro into public today, so our auto-updates channel is ready.
In our testing we avoided this by adding HLS I think.
2) Quality switching should work across servers. Could you please post the shortcode you used? Oh, I see you found the error in the shortcode.
3) Firefox issue – could you please double check that your video is available in all the qualities? If you provided WebM for Firefox, double-check that it’s there in all the qualities.
Thank you for all the useful feedback!
Martin
I updated to the latest pro today. It is nice. It’s still hard to play on ios but it will get fixed over time. It still plays that is what counts. Rackspace does have a ios link I can add. I don’t know if that will help or not. I seems to be the switching.
The error about adding different src was a wordpress thing. I was using visual and it added code for the little code at the end for fv. I saw it when I clicked text.
On firefox I noticed that you need to click a quality setting before clicking play. It plays well after that. I haven’t tried it after todays update though. Firefox plays good without the webm so I see no reason to add it. I can if it will help though.Over all the plug in plays better than all the others I have used. It works really good with Rackspace Akamai cdn I think. It’s really fast.
I think the clicking the quality that isn’t on the bar is growing on me. It would be easier for a lot of people to see that instead of it small on the bar.
I updated the design on the website. You can check it out. It seems to work good with fv. The only thing I seen is that is puts a white box around the logo on fv. Thank you for a nice plug in. Do you write other plug ins if requested?
Hello Chan,
the quality switching now happens live (no page reload): http://foliovision.com/2014/06/video-multiple-qualities
Thanks,
MartinHello Chan,
thank you for the bug report!
I see the problem and I see what’s wrong, but I can’t reproduce the problem. Could you please:
1) check step 6. in our guide here? http://foliovision.com/player/switch-video-quality What does the “Show hint” feature say? Does it recognize the quality prefixes properly? In your case if you enter your video like
`http://your-server.com/6-1-14-360.mp4`
It should say it will look for:
http://your-server.com/6-1-14-432.mp4
http://your-server.com/6-1-14-720.mp42) post the exact shortcode you are using and the content of your Settings -> FV WordPress Flowplayer -> Pro Features -> Video quality switching textarea?
3) I checked your video files and I wouldn’t recommend you use HD (720p) for these videos at all as your camera picture quality is not sharp enough. On the other hand, your low quality (360p) is creating quite big files already. You should be fine with using our mobile and SD qualities as recommended at the end of our article here: http://foliovision.com/player/switch-video-quality
I also recommend you use -sd and -mobile as your quality prefixes, so you can change the resolutions a bit with any file if needed. You would have to rename all of your files which you already use though.
Thanks,
MartinI did address it. I said it matched when showing the hint.
You said to look at step 6. Step 6 asked about showing hint. I showed the hint and it says the it matched a quality and to make sure the other file names are there. Just like the screen shows in step 6 it what it showed me. The other step you ask is ok to for shortcode.Hello Chan,
thank you, we able to reproduce the bug now. It was just a small thing were the quality prefixes were treated as numbers instead of strings.
Fixed, FV Player Pro 0.1.7 update should be available on your site, just try reloading the plugins screen later if it’s not there right away.
Thanks,
MartinHello Chan,
there is no limit on number of the video qualities, but it’s best to keep the count down – the lowest quality video out of three should be already optimized for mobile. We plan to add a mobile auto-detection, to make sure mobile users get that video right away.
If you can provide a sample URLs for some Rackspace video (we won’t make the URLs public if you don’t want to), then we can recommend how to embed it.
Thanks,
Martin