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.

JW Player RTMP streaming MP4, Amazon® S3

Home Forums Community Forum JW Player RTMP streaming MP4, Amazon® S3

This topic contains 47 replies, has 8 voices. Last updated by  Bruno 4 years, 1 month ago.

Page 2 Of Topic Replies

Viewing 22 replies - 26 through 47 (of 47 total)
Author Replies
Author Replies
Posted: Thursday Nov 15th, 2012 at 7:20 am #31670
Username: brunoedig

Here no good.

Checked downlaod options, disabled visual editor for Exec-PHP, activated all options for Raw HTML plugin, added code … no good

Posted: Thursday Nov 15th, 2012 at 9:17 am #31685

James, that’s great news! I’m glad you found the problem. :)

I’m not sure what code JW needs to specify the image. Have you tried the video shortcode by Philly for s2Member? From what I read there, it lets you specify the thumbnail image.

Bruno, there was another user getting the same openssl_sign error. Yesterday Jason pointed out what the problem could be, and the user just confirmed that it solved the the problem. Could you check if that’s the same for you, please?

Posted: Thursday Nov 15th, 2012 at 10:11 am #31694
Username: brunoedig

Ok, got it.

My mistake was that the first I’ve indeed installed with the PRIVATE key, but forgot to set the download restrictions.

Then when I tried again I’ve downloaded the PUBLIC key and only now I saw that message saying “PRIVATE KEY NEEDED”

So that was the problem.

BTW, a few recommendations:

I don’t remember seeing on the JWPlayer video that I MUST set the basic download restrictions, which I didn’t at first and that’s why it didn’t work.

Then I messed up when setting that and by trying to reinstalling I’ve used the PUBLIC key (my mistake).

I’d recommend that you insert a short note on that video saying “Please don’t forget to set your basic download restrictions”

If this is mentioned in another video it doesn’t really matter because there is no “right” order to watch videos so I just watched that one basically.

Another thing: what is the recommended ACL for files?

Do I need to give “Read” right to authorized users or something like that? I don’t remember seeing that in the movie as well.

Another question: any plans for when are you going to switch to JWPlayer 6?

It looks WAY better ..

Anyhow, indeed partly was my mistake because I got the wrong key when I was trying to fix things up. In my first attempt I did get the right key, but I had no idea I had to set the basic restrictions,

Anyways, glad this is fixed now :)

Thanks guys. Really appreciated.

  • This reply was modified 4 years, 1 month ago by  Bruno.
  • This reply was modified 4 years, 1 month ago by  Bruno.
Posted: Friday Nov 16th, 2012 at 9:01 am #31761

Thanks for the update! I’m very glad that solved it for you too. :)

I’ll see what can be done about the video. The troubleshooting article does suggest checking the Basic Downloads Restriction configuration, though. Knowledge Base » JW Player sample code not working

I believe the ACL doesn’t need to give read permissions, since s2Member creates a link with a key to access the file. You could do a quick test for this and see how it goes.

I don’t know if the sample code works just as well with JW Player 6, but you’re free to use your own code, or whatever they provide. You may also want to check if Philly’s video shortcode works with that version.

Posted: Friday Nov 16th, 2012 at 9:11 am #31764
Username: brunoedig

Yeah, I checked that article, but only THEN (and after you wrote that you set the download restrictions) I realized that I needed to check that.

But that’s where the problem started: first time I configured the cloudfront access the right way (with the private key).

When I was trying to figure out what was wrong, I’ve deleted and reinstalled it … but I screwed up and used my PUBLIC key, so even with the download restrictions set it was a no-go.

Anyhow, it might be that I’m the only one who did that (maybe not), but that is indeed not clear on the video instructions.

I’ve tried with JW6 and no good. It seems to be a different code.


Posted: Friday Nov 16th, 2012 at 2:07 pm #31794
Username: tdaubs

I’m still troubleshooting myself. I feel pretty strongly that it must be something on my side wrong as others are getting this to work. I have now decided to uninstall S2 and start all over again.

It would be great if there was a page with step by step instructions to cover ALL the bases of getting S2, S3, Cloudfront and JW Player setup correctly and securely. I have watched the video a few times and its a great resource but a list of instructions would be a little more friendly when going through the process.

Posted: Friday Nov 16th, 2012 at 2:10 pm #31795
Username: tdaubs

Sorry for the back to back posting but I forgot to ask a question.

In one of the tutorials on the site it says to upload protected files to the s2-protected files directly but in another place it says to upload to the bucket at S3. Which approach is correct or will either work?

Posted: Friday Nov 16th, 2012 at 2:14 pm #31796
Username: brunoedig

Hey Todd, a few tips of what I found I was doing it wrong:

1) Your question: if you plan to integrate Jwplayer with S3/Cloudfront, you only need to upload your files to your bucket on amazon. Tip: use S3 organizer for firefox

2) Set your basica download restrictions. Just put 999999 for every 1 day

3) Set your permissions. Be very very careful because it needs your PRIVATE key for cloudfront (the one you only get it once when you create your key pair).

4) Install raw html and exec php just to be on the safe side, but I prefer using that plugin that Cristina has mentioned. It is great and does not screw things up

5) Make sure you have your /jwplayer on your ROOT or change the address accordingly (in my case it was “/ede/jwplayer/”

That is what did the trick for me.



Posted: Friday Nov 16th, 2012 at 7:27 pm #31846
Username: tdaubs

@James Can you elaborate on what the issues you were having with Raw HTML and PHP-exec?

@bruno Thanks for the suggestions.

I have gone through all the steps you mentioned. Double-checked. Triple-checked. I also uninstalled S2, reset the former S2 settings with the code mentioned here. I setup a new bucket on S3 and implemented my Cloudfront with private key. Cloudfront shows the distributions accordingly with a status of deployed and state of enabled. My jwplayer files are in the root of the site at /jwplayer/ and I have boxed checked to disable the visual editor when writing along with both Raw HTML and PHP-exec plugins installed and activated with the recommended settings. In addition, I have tried numerous code samples as suggested in the JW Player & RTMP protocol examples AND also tried the S2 Video Shortcodes plugin… and nothing works.

My download restrictions are set to 999999999 for every 1 day.

Even with all these tests, I notice one strange thing and I can’t figure out how to avoid this issue. I’m getting paragraph tags and linebreaks added to the code after submission even though the visual editor is disabled.

When I try the code sample suggested by S2Member, the source looks on the page looks like this…

<div id="jw-container">JW Player® appears here.</div>
<p><script type="text/javascript" src="/jwplayer/jwplayer.js"></script><br />
    <script type="text/javascript">
   jwplayer("jw-container").setup({modes: /* JW Player®. */
       /* First try real-time streaming with Flash® player. */
       {type: "flash", provider: "rtmp", src: "/jwplayer/player.swf",
           config: {streamer: code removed here but looks correct... </p>
<p>            /* Else, try an HTML5 video tag. */
       {type: "html5", provider: "video",
           config: {file: more code removed but looks correct... </p>
<p>            /* Else, this is a safe fallback. */
       {type: "download", /* Download the file. */
           config: {file: "code removed but looks correct... }}
   /* Set video dimensions. */ width: 480, height: 270

Lots of p tags everywhere. Why? I have no idea.

I’m now trying the S2 Video Shortcodes plugin as I seem to get a bit closer but still a couple of p tags.

[s2video html5="true" download="true" downloadkey="true" width="1024" height="768" video="myvideofile.mp4"]

When I go into view the source for the video post it looks something like this…

<div id="videoplayer" class="videoplayer"></div>
<p>		<script type="text/javascript" src=""></script><br />
		<script type="text/javascript">all this code removed but looks good</script><br />
		<script type="text/javascript">
			if(typeof mp4 === 'object')
							{type: "flash", provider: "rtmp", src: "",
								config: {"streamer": mp4['streamer'], "file": mp4['file']}},{type: "html5", provider: "video", config: {"file": mp4['url']}},{type: "download", config: {"file": mp4['url']}},],
			"author": "",
			"description": "",
			"duration": "",
			"image": "",
			"start": "",
			"title": "",
			"controlbar": "bottom","width": "1024","height": "768","plugins": ""});
		document.write("Sorry, you do NOT have access to this file.");

Finally, when I use the code suggested by S2Member, I do get a “JW Player® appears here”. However, when I use the shortcode, I get nothing that displays on the front end.

Anybody got any ideas on what else I can do to troubleshoot?

Posted: Saturday Nov 17th, 2012 at 2:25 am #31861
Username: tdaubs

I discovered the issues. They are not related to S2. However, this may be good to have in case anyone else runs into the same problem.

After I purchased S2Member I found a recommendation Jason made regarding a theme from MySiteMyWay. In fact, one of the themes at MySiteMyWay actually powers although with some modifications in place.

After reading his recommendation, I decided to checkout their themes and was pleasantly surprised at the quality of the themes and the power of them. So I licensed their theme called Construct.

The theme can be responsive and has some fairly complex functionality to resize content on a page based on the size of the screen viewing it. Each of MysiteMyway themes allow for the responsive functionality to be turned off.

After trying about everything in the universe to get JWplayer to play movies… I defaulted back to the 2010 theme that WP ships with and… sure enough… JWplayer loaded up just fine and my content was streaming beautifully from S3 and Cloudfront. I DID have those settings correct! :)

However, in the Construct theme, it simply would not load UNLESS I unchecked responsive functionality in the theme. So there is some javascript conflict between JWplayer and the JS that makes Construct (I’m guessing this affects all their themes as they are all based on the same framework) responsive.

So I have everything working with S2Member as needed but my site is no longer responsive. :(

I’m hoping the MySiteMyWay guys can help me figure this out. Read more here.

**Please note*** I also had to comment out two lines in the themes framework. More info on this at the above link.

  • This reply was modified 4 years, 1 month ago by  Todd.
  • This reply was modified 4 years, 1 month ago by  Todd.
Posted: Saturday Nov 17th, 2012 at 8:37 am #31872
Username: Eduan

Excellent Todd! Glad you found the problem. :)
Let’s hope that MySiteMyWay can find an easy solution. :)

Posted: Saturday Nov 17th, 2012 at 8:58 am #31874

Thanks for the update, Todd! I’m glad you found the source of your problem, that’s a great step to solve it. I hope the theme guys help you sort it out soon.

Bruno, got it: you set it up right first, but not after when trying to fix the problem. I’m sorry I didn’t catch it sooner, but I’m glad we could solve it.

Yeah, like I said, I’ll try to improve the videos, or make new ones.

Posted: Tuesday Nov 20th, 2012 at 2:20 am #32058
Staff Member

Thanks for all of the follow-ups here.

I just want to post this related thread for others researching this issue. Sometimes problems related to the openssl_sign() error, are related to your PEM file, as input into your s2Member configuration.


Posted: Tuesday Nov 20th, 2012 at 7:24 am #32074
Staff Member

Regarding JW Player v6

There is nothing in s2Member that would prevent compatibility with JW Player v6. However, it will require you to change the way you integrate s2Member with JW Player (changes in the code snippet that you use).

We will see about adding code samples into the next maintenance release for JW Player v6. Until then, here is a quick example that should help you out. This example assumes that your /jwplayer/ directory contains the files from JW Player v6 instead of v5.

This code sample is to integrate a CloudFront RTMP stream, with an MP4 fallback for iOS.
The only change is in the way you build the call to jwplayer.setup(), which changes slightly in JW Player v6. See also:
// Configuration.
$s2_jw_config&#91;"jwplayer"&#93; = "/jwplayer/"; // Relative URL path to JW Player files directory.
$s2_jw_config&#91;"mp4_video_file_name"&#93; = "video.mp4"; // Name of your MP4 test file.
// Don't edit anything else below unless you know what you're doing.

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="<?php echo $s2_jw_config&#91;"jwplayer"&#93;; ?>jwplayer.js"></script>

<?php /* A direct URL to the RTMP source; counting the file against the current User in real-time. */
$cfg = array ("file_download" => $s2_jw_config["mp4_video_file_name"], "url_to_storage_source" => true, "count_against_user" => true); ?>

<?php /* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4 = s2member_file_download_url ($cfg, "get-streamer-array"))) { ?>

    <script type="text/javascript">
                                    {type: "rtmp", file: "<?php echo $mp4&#91;"streamer"&#93;; ?>/<?php echo $mp4&#91;"file"&#93;; ?>"},
                                    {type: "mp4", file: "<?php echo $mp4&#91;"url"&#93;; ?>"}
        /* Set video dimensions. */ width: 480, height: 270

<?php } else /* Access is denied to the current User. */ { ?>
    Sorry, you do NOT have access to this file.
<?php } ?>
Posted: Tuesday Nov 20th, 2012 at 7:29 am #32075
Staff Member

Regarding ACLs. By default only you (the file owner), should have read/write permission, and no other permissions granted to anyone else. Files in your S3 Bucket are private until s2Member makes them available to certain members through digitally signed URLs generated automatically by s2Member (based on your configuration of s2Member).


Posted: Tuesday Nov 20th, 2012 at 8:22 am #32081
Username: brunoedig

I see.

Thanks a lot Jason – that indeed helped :)

Posted: Tuesday Nov 20th, 2012 at 11:47 pm #32190
Username: tdaubs

Thanks Jason.

I’m anxiously looking forward to two pieces of functionality in a future release of S2. JWplayer 6 support and Stripe support.

Keep up the fantastic work!

Posted: Sunday Dec 2nd, 2012 at 1:45 pm #33219
Username: tdaubs

@Jason Did you update the code samples with the latest release for JWPlayer 6?

Posted: Sunday Dec 2nd, 2012 at 4:55 pm #33244
Username: Bruce
Staff Member

Hi Todd,

Based on the JWPlayer Changelog, this code should still work properly.

If it does not function correctly we’ll gladly take a look at it for you.

Posted: Tuesday Dec 4th, 2012 at 4:39 pm #33474
Staff Member

@ Todd

The code changes I posted here that provide compatibility with JW Player v6 did NOT make it into the latest maintenance release. The existing code samples work with JW Player v5. We’ll get the JW Player v6 code samples into the next maintenance release however. Thanks for your patience :-)

Until then, the code samples I provided in this thread reflect the coming addition to the next maintenance release, and will work in the current release. If you’re running JW Player v6, please use the code samples I posted here, instead of those provided in your Dashboard.
Posted: Wednesday Dec 5th, 2012 at 2:16 pm #33590
Staff Member

JW Player v6 code samples were added into the release of s2Member v121204.

Posted: Wednesday Dec 5th, 2012 at 2:23 pm #33593
Username: brunoedig

Thanks Jason!

Now we only need that plugin for s2member videos to be updated as well ^^

That plugin is best thing since sliced bread!

Viewing 22 replies - 26 through 47 (of 47 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.