latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

protecting videos

Home Forums Community Forum protecting videos

This topic contains 20 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 5 months ago.

Topic Author Topic
Posted: Thursday Jul 26th, 2012 at 4:38 pm #20339

Hello,
I’ve got a number of videos that I have on my own server and while it isn’t easy for someone to find them, it isn’t impossible either. However, when I try the various methods of protecting them in the s2member-files folder, I get a “video not found or access denied” message.

I’m a bit confused as to whether I should be putting the ?s2member_file_download= stuff in there, but I read somewhere that it may be easier to just link to that folder (and I did try the ?s2member thing and that didn’t work either. )

I hope you can help. Thank you.

Here is my code:

<div style="background-color: white; border: 0 none;">

<object id="mediaplayer1" width="1000" height="778"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name="flashvars" value="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4&amp;image=../../../training/module_1.0.jpg"/>

<param name="src" value="../../../training/player.swf" /><embed id="mediaplayer1" width="1000" height="778"  type="application/x-shockwave-flash" src="../../../training/player.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4&amp;image=../../../training/module_1.0.jpg"/>

</object></div>
  • This topic was modified 4 years, 5 months ago by  Cristián Lávaque. Reason: Remove domain name

List Of Topic Replies

Viewing 20 replies - 1 through 20 (of 20 total)
Author Replies
Author Replies
Posted: Thursday Jul 26th, 2012 at 10:23 pm #20357
[hilite pre_code]
http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4&image=../../../training/module_1.0.jpg
[/hilite]

Is your movie file named [hilite code]1.1certification.mp4&image=../../../training/module_1.0.jpg[/hilite]? Because that’s what it looks like to the script. I know you’re using an ampersand entity to separate it from the image, but that works to separate vars in the querystring (after the question mark in a URL), but that’s not what you’re doing there.

Try fixing that and see if it then works.

I hope it helps. :)

Posted: Thursday Jul 26th, 2012 at 10:55 pm #20359

Cristián,

Do you mean just remove the &?

This code below works when it is in a regular folder, but then when I move it to the s2member-file folder is when I have problems. Yes, the 1.1certification.mp4 is the file name. I tried removing the ampersand, and the amp, but that didn’t help.

<object id="mediaplayer1" width="1000" height="778" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="flashvars" value="file=http://website.com/training/1.2_certification.mp4&amp;image=../../../training/module_1.2.jpg" /><param name="src" value="../../../training/player.swf" /><embed id="mediaplayer1" width="1000" height="778" type="application/x-shockwave-flash" src="../../../training/player.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="file=http://website.com/training/1.2_certification.mp4&amp;image=../../../training/module_1.2.jpg" /></object>
  • This reply was modified 4 years, 5 months ago by  Cristián Lávaque. Reason: Remove domain name
Posted: Friday Jul 27th, 2012 at 5:26 am #20374

Hi Mary,

You need to remove the & and everything after it, you cant reference the image like that because the script that protects the video wont be able to process it.

value="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4"

On another note I would recommend using something like the jw player which will give you fallback options for people who dont have flash, probably better supported here too

Hope that helps

  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Friday Jul 27th, 2012 at 7:27 am #20379

Right, what Philly said.

You see, when the file is in the s2member-files folder, the file is served via s2Member, not by the server directly, and the ampersand in your URL confuses the file’s name.

I agree with trying JW Player. s2Member even has some code examples in the documentation, which you can try. [hilite path]Dashboard -› s2Member® -› Download Options -› JW Player® & RTMP Protocol Examples[/hilite]

And it’d be a good idea to take a look at hosting those movie files in Amazon S3, which is cheap and very reliable. [hilite path]Dashboard -› s2Member® -› Download Options -› Amazon® S3 Storage[/hilite]

Video » s2Member® File Downloads (Amazon S3/CloudFront/JW Player)

I hope that helps. :)

Posted: Friday Jul 27th, 2012 at 4:52 pm #20445

I’ll try both of your suggestions. I don’t want to incur any further costs, so I wanted to host it myself. I’ll try Philly’s suggestion first and see if it works. If not, I’ll have to go with the JWPlayer or Amazon storage.

Thanks, I”ll let you know how I get on.

Posted: Friday Jul 27th, 2012 at 7:33 pm #20458

Okay, I tried it again and it still says that access is denied. Can you look at the code one more time and if it is right and it just isn’t going to work, I’ll go the jwplayer or amazon cloud route.

Thank you both for your help.

Mary

<object id="mediaplayer1" width="1000" height="778"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name="flashvars" value="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4">

<param name="src" value="../../../training/player.swf" /><embed id="mediaplayer1" width="1000" height="778"  type="application/x-shockwave-flash" src="../../../training/player.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="file=http://website.com/wp-content/plugins/s2member-files/1.1certification.mp4">

</object></div>
  • This reply was modified 4 years, 5 months ago by  Cristián Lávaque. Reason: Remove domain name
Posted: Friday Jul 27th, 2012 at 7:45 pm #20459

Hi Mary,

There is some sort of problem with your server/hosting environment.

I got the following error when trying to access that file

Error 500: Internal Server Error
The server encountered an unexpected condition which prevented it from fulfilling the request.

The problem is on the server side, not with your browser or the address. Most probably, a certain service (e.g., Tomcat engine) is down. Please contact your webmaster.

Please can you download this file unzip it and upload it to your server http://www.s2member.com/r/server-check-tool/

so that you can navigate to it here website.com/s2member-server-check-120703.php

That will run a couple of compatibility tests and hopefully give us some more info

  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Saturday Jul 28th, 2012 at 10:45 am #20536

Hi Philly,

Thanks so much for your help.

I’ve uploaded the unzipped file to the main root directory of this site, but I’m getting a “can’t find” error. But the file that I got at that link didn’t have the -120701 at the end, so first I just took out the numbers in the path, but that didn’t change anything, so I tried changing the name of the php file and that still hasn’t done anything.

Sorry for not understanding. The file is there in both versions at the moment.

Posted: Saturday Jul 28th, 2012 at 11:03 am #20537

Hi Mary,

What is the name of the file you uploaded? Have you put it in the same directory as wp-config.php?

What are you using to ftp? Can you please check the file permissions on it and also on /s2member-files/ directory.

Thank you

Posted: Saturday Jul 28th, 2012 at 11:15 am #20539

I’m using Filezilla to FTP. I changed the permissions to 777, and I did have them as that already for s2member-files.

Yes, I have that file in the same directory as wp-config.php.

When I downloaded the file you referred me to, it doesn’t have the same name, it is s2m-server-check.php. So I am looking for it at website.com/s2m-server-check.php. Is that right?

Thanks

  • This reply was modified 4 years, 5 months ago by  Cristián Lávaque. Reason: Remove domain name
Posted: Saturday Jul 28th, 2012 at 11:26 am #20543

Yes Thank you Mary,

Everything looks fine with that test.

Can you try linking to the file like this

?s2member_file_download=

instead of

wp-content/plugins/s2member-files/

So your code would be:

<object id="mediaplayer1" width="1000" height="778"  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowfullscreen" value="true" />

<param name="allowscriptaccess" value="always" />

<param name="flashvars" value="file=http://website.com/?s2member_file_download=video.mp4">

<param name="src" value="../../../training/player.swf" /><embed id="mediaplayer1" width="1000" height="778"  type="application/x-shockwave-flash" src="../../../training/player.swf" allowfullscreen="true" allowscriptaccess="always" flashvars="file=http://website.com/?s2member_file_download=video.mp4">

</object></div>
  • This reply was modified 4 years, 5 months ago by  Philly.
  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Saturday Jul 28th, 2012 at 11:48 am #20545

I’m sorry, I copied and pasted your code and I get the error

“task Queue failed at step 5: Playlist could not be loaded: Playlist file did not contain a valid playlist.

I don’t want you to waste your Saturday!

Posted: Saturday Jul 28th, 2012 at 12:51 pm #20548

Sorry Mary,

I’ve done a few tests with that player trying to get it too work but have been unsuccessful.

My advice would be to give jw player a try.

Out of interest are you able to download the video ok if you type this in your address bar?

http://website.com/?s2member_file_download=video.mp4
  • This reply was modified 4 years, 5 months ago by  Philly.
Posted: Saturday Jul 28th, 2012 at 1:59 pm #20555

Hi Philly,

Yes, what it does is download it so I can watch it, and it does run.

What a drag. He moved all of his videos already from Screencast as he was worried that they’d start charging him. To find out we have to move them again! argh.

Thanks so much for all your help,
take care

Posted: Sunday Jul 29th, 2012 at 6:54 am #20589

If the video files are large, then it may be a problem to use the s2member-files folder, because in order to secure them, they have to be served via the script, which can be problematic with large files. In that case it’s advisable to use Amazon S3. I know you said you didn’t want to pay another service, but honestly, space and bandwidth are super cheap wit h them. And if you couple it with their CloudFront distribution service, then videos can be streammed very nicely. Philly knows a ton more about video than me, and he can correct me if I’m wrong.

Posted: Monday Jul 30th, 2012 at 11:30 am #20683

Hi Cristián,

Thank you so much for all your help, on this and the other issues I’ve asked about. I’m getting there now.

I know it is great to have these questions and answers online for others to look at, but is it possible later to fuzz out the address so the company name isn’t there for all to see, or to come up in searches? I know you need it, but I don’t want the client to see his paths.

I’m going to move the videos to a service, so that will work better. You are right, the videos are quite large, and that is likely the problem as they worked going directly to my own servers.

Thanks again.

Posted: Monday Jul 30th, 2012 at 11:55 am #20689

And Philly (or Phil)

Thank you!

Posted: Tuesday Jul 31st, 2012 at 6:44 am #20765

No problem. Glad to help! :)

I just removed the domain name from my posts and yours, Philly had already done that with his.

Posted: Tuesday Jul 31st, 2012 at 9:01 am #20790

Thank you Cristián and Philly,

I can’t tell you how much I appreciate all your help.

you are both the best!

Mary

Posted: Tuesday Jul 31st, 2012 at 10:00 pm #20853

:)

Viewing 20 replies - 1 through 20 (of 20 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.