Home › Forums › Community Forum › s2Member & JW Player – Video Stalls
This topic contains 23 replies, has 6 voices. Last updated by Cristián Lávaque 4 years, 5 months ago.
Topic Author | Topic |
---|---|
Posted: Tuesday Jul 3rd, 2012 at 4:40 pm #18222 | |
|
|
Video files under the protection of s2Memeber (in the s2member-files directory) are being served through JW Player on a WordPress blog. Some of these videos play for a while and then stall. It is not like the usual stop-n-go rebuffering we often see with videos. These just stall, the spinner spins forever, and they can’t be restarted. The videos are H.264, mp4, 640×480, bit rates from 980-1500kbps, Baseline@Level 3.0, no CABAC, no b-frames, no p-frames and with 60kbps audio AAC Low Complexity. When the videos are in a directory NOT protected by s2Member, they play well. No stalls, not even rebuffering pauses. Watch the progress bar in two examples. What is it about s2Member that constrains the file delivery in this way? Test cases: Credentials to use: ID=s2tester pw=free-preview |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Wednesday Jul 4th, 2012 at 11:37 pm #18329 | |
|
|
Hi Mary. Do you have the protected files in your s2member-files dir or did you integrate with Amazon to host the files and serve them from there? The thing with protected files is that, in order to protect them, they’ll be served through the script instead of directly and, depending on the server’s configuration, this can give timeout problems if the file is large. http://www.primothemes.com/forums/viewtopic.php?f=36&t=423 For streaming or large files, it’s much better to use the Amazon service. Video » s2Member® File Downloads (Amazon S3/CloudFront/JW Player) I hope that helps. :) |
|
Posted: Thursday Jul 5th, 2012 at 6:18 am #18367 | |
|
|
Yes Cristián, the files are in the s2member-files directory as mentioned in the very first sentence. We have a dedicated server with more than enough storage and more than enough bandwidth, and NO desire to introduce the added cost of Amazon S3. What can we change on a dedicated server to improve the situation? |
|
Posted: Friday Jul 6th, 2012 at 6:55 am #18453 | |
|
|
I understand. There’s this knowledbase article to help with download problems. Could you try the suggestions made there? Knowledge Base » Resolving Problems with File Downloads And you can try this server check tool to see if everything looks fine there. http://www.s2member.com/r/server-check-tool/ Let me know if that helps. :) |
|
Posted: Saturday Jul 7th, 2012 at 3:13 pm #18571 | |
|
|
Knowledge base article was interesting, but did not help with this case. Passed all tests with the server test tool. Serving the files through a script is almost as inefficient as having a man stand at a service window and hand out video frames one-by-one. We have resolved the problem. |
|
Posted: Sunday Jul 8th, 2012 at 6:54 am #18603 | |
|
|
I’m glad you solved it! Thanks for the update. :) Yes, it’s not ideal, but it’s very secure to validate the user before serving it, and not making it possible for someone to share the URL to the actual file later. We’re looking at how to improve it in the new s2Member. |
|
Posted: Sunday Jul 8th, 2012 at 5:11 pm #18624 | |
|
|
Hello Mary May, curious to know the resolution. Can you share? |
|
Posted: Monday Jul 9th, 2012 at 7:39 am #18662 | |
|
|
Hamid, After learning of this script-based method, we investigated a number of other membership plugins which advertise strong file protection. When asking them technical questions about how they secure files, two basic methods emerged. For locally stored files (local=same server as the web site) many use the script method, which must have been quite popular a few years ago, the same method that s2Member uses for local files. The other method uses various forms of authentication tokens (often time limited) and URL obfuscation to authorize content delivery from remote sources such as Content Distribution Networks. s2Member is capable of using this approach with Amazon S3. So, instead of having our own server resources clogged up with continuously running scripts, we coughed up yet more money and moved the content to Amazon S3. |
|
Posted: Monday Jul 9th, 2012 at 7:53 am #18663 | |
|
|
Hello Bob, your response came in just in time… I had been debating whether to serve files off of Amazon S3 and CloudFront. I decided to go with Amazon and I just finished setting up my new bucket and configuring s2member. Let hope the cost isn’t that much :) Thanks for sharing… you made me feel good about our decision to go with s2member (even though I’m a newbie to s2member, I’m really starting to love it). |
|
Posted: Monday Jul 9th, 2012 at 10:52 pm #18750 | |
|
|
Thanks for the heads up on this request for support.
If you’re having trouble with large file downloads and/or streaming audio/video, I recommend a media server like Amazon S3 w/ CloudFront, so that files are delivered directly from the media server, as opposed to being protected and served locally via PHP scripts (i.e with s2Member local file storage). The hang ups that you’re seeing, are related specifically to PHP-based file downloads, via scripts. Depending on server configuration and the hosting environment, scripts timeout limits, memory limits, etc… you may have different results and unreliable file delivery (with very large files). PHP is not a good way to serve large files, it’s prone to the issues you’ve described; and this is why Amazon S3/CloudFront have been integrated with s2Member. To clarify… It’s not a server capacity issue, it’s related to the way files are served locally via PHP scripts, which almost always have execution time & resource limits associated with them. When s2Member is integrated with Amazon S3, authentication is still performed via PHP, but the actual file delivery occurs through a signed link, which leads directly to the media server. So it’s a much better approach, bypassing issues that are commonly seen with very large files (i.e. streaming audio/video). You can try increasing the max_execution_time directive in your PHP.ini file, and increasing your memory_limit to see if it helps, but I consider those to be temporary workarounds, and not a permanent resolution for this issue. In my opinion, the best solution for large files, is to integrate s2Member with Amazon S3, so that files are protected by Amazon S3, and permissions integrated with s2Member. Adding CloudFront to the mix is optional, but I recommend that as well; particularly for faster delivery of streaming audio/video. |
|
Posted: Tuesday Jul 10th, 2012 at 8:46 am #18803 | |
|
|
I cannot seem to get jwplayer to work (even after following the instructions) using s3 and CloudFront. I CAN download the same file via a different test page using the shortcode:
I just can’t get jwplayer to stream the file. The test page Im using for jwplayer comes up with the following text:
Raw html plugin is installed and all four checkboxes for Disable wptexturize, Disable automatic paragraphs, Disable convert_chars, Disable smilies are checked. Here is the code for the test page:
JWplayer is installed in root directory and I can access the player.swf directly. Not sure why it’s not working. Any ideas? What am I missing or doing wrong. Really need some help her guys :( |
|
Posted: Tuesday Jul 10th, 2012 at 11:21 am #18812 | |
|
|
@ Hamid You just have the incorrect location for your file. That script is looking for the file located relative to wp-content/plugins/s2member-files/ or your s3 bucket. |
|
Posted: Tuesday Jul 10th, 2012 at 1:33 pm #18823 | |
|
|
Thanks Philly, But the file is in the root directory of my s3 bucket…. that’s why I cant figure this out. |
|
Posted: Tuesday Jul 10th, 2012 at 4:19 pm #18829 | |
|
|
@ Hamid Yes sorry of course you do if your able to download it. Can you disable plugins see if there is a conflict? |
|
Posted: Tuesday Jul 10th, 2012 at 5:21 pm #18835 | |
|
|
Hamid, could you check out this article and see if it helps with this? Knowledge Base » JW Player sample code not working |
|
Posted: Wednesday Jul 11th, 2012 at 9:11 am #18916 | |
|
|
Hamid, When all you see is text “JW Player® appears here” instead of the player itself, that means the player .swf file was not found. Fix that first. Then, go for the content. I like to make small simple steps. So, simplify your script using real URLs instead of variables. Get each of the pieces properly located. Then, figure out which variables to use / change. |
|
Posted: Saturday Jul 14th, 2012 at 12:44 am #19203 | |
|
|
Hello Bob, thanks for the suggestion. I’ve been trying to resolve s3 and cloudfront since I’ve installed s2member. I’m going nuts… I ended up reinstalling WordPress and s2member with very few plugins activated. Here are my results: If I only use s3 (without cloudfront), I am able to download my files using example shortcode and links such as:
The moment I add cloudfront, the above links all fail with the following error (even after creating new keys):
Anyone have any ideas why? P.S. JWPlayer still doesn’t work for me but will get to that later after resolving my Cloudfront issue. |
|
Posted: Saturday Jul 14th, 2012 at 6:45 am #19239 | |
|
|
Hi Hamid, Did you allow s2Member to auto-configure your CloudFront Distributions? Also, have you double-checked your CloudFront configuration in Dashboard -› s2Member® -› Download Options -› Amazon® S3/CloudFront CDN Storage? |
|
Posted: Saturday Jul 14th, 2012 at 8:27 am #19245 | |
|
|
Hey Raam, Yes I allowed s2member to auto configure the distributions and it said it was set up correctly. The distros were created and I could see them via my AWS console. I have deleted and recreated the download and streaming distros a few time now, all with the same results :( I have deleted them again for now as I’m not sure what the problem could be, although I am able to download via my s3 bucket (as long as cloudfront isnt configured). Has anyone else seen this before? |
|
Posted: Saturday Jul 14th, 2012 at 10:47 am #19255 | |
|
|
Issue Resolved with Cloudfront :) I’m not quite sure which of the two resolved it but… 1.) I deleted all my Amazon key pairs and recreated new keys. Now back to JWPlayer… still shows “JW Player® appears here.” I can access the player.swf if I point my browser to http://www.domain.com/jwplayer/ so Im not sure why it cant find it thru s2member/wordpress. |
|
Posted: Saturday Jul 14th, 2012 at 12:05 pm #19258 | |
|
|
@ Hamid Glad you resolved that part. I think its because you have not setup your download restrictions. Dashboard => s2Member® => s2Member® File Download Options => Basic Download Restrictions Let us know how that goes and if you need any help configuring a shortcode |
|
Posted: Sunday Jul 15th, 2012 at 3:38 am #19282 | |
|
|
OK, I admit it. I’m an idiot!!! I finally got it to work, hurray :) Here is what I did. 1.) I entered 999999 in ALL the fields for “Basic Download Restrictions” even though I’m only using member level 0 and 1 (at the moment) I have supplied my modified example code for other to see. Please note, that you may not be able to edit your page after publishing it the first time due to the (raw) tags. When I edited the page after publishing it, it would break again, I believe because of the (raw) tags redoing its thing on the already modified code. Please Note: I used parenthesis () instead of brackets [] around the raw tag due to the posting restriction of this forum. If you use the code below, make sure to change the raw tags to include brackets (and not parenthesis as displayed below).
Thanks everyone… now on to the next |
|
Posted: Sunday Jul 15th, 2012 at 3:55 am #19283 | |
|
|
Oh I forgot to add this. I’m not sure if this was an issue but in any case… 5.) The crossdomain.xml in my bucket was empty so I re-uploaded it with the following data:
|
|
Posted: Monday Jul 16th, 2012 at 7:32 am #19344 | |
|
|
Thanks for the update, Hamid. Very glad you solved it! :) |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.