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.

Stream not found, URL and S3 file permissions

Home Forums Community Forum Stream not found, URL and S3 file permissions

This topic contains 9 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 8 months ago.

Topic Author Topic
Posted: Wednesday Apr 25th, 2012 at 2:23 am #11802
Eva Galfi
Username: easylink

Hi guys,

I’m getting the Stream Not Found’ error code and I can’t figure out where I’m going wrong. I’ve uploaded Jason’s test video (video.mp4) to my S3 bucket and am using the following code, which I grabbed from the suggested codes S2Member offers. It’s the same code as shown in the AmazonS3/cloudfront/JWPlayer tutorial video.

So I need to change any of the rest of the code? For example, do I need to put my path in there somewhere? Should I put it before the video.mp4 file like this

<?php $cfg = array ("file_download" => "muS3URL/video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?> 

Do I need to change my permissions on the files in S3 to ‘everyone’ in order for people to be able to view these files when they access the paid part of my site?

Any guidance would be appreciated as I’m not a programmer. I’ve read through other people’s issues with this and found the following discuss, which was very interesting but I think/hope my issue is simpler than this. http://www.s2member.com/forums/topic/cloudfront-and-rtmp-streaming-jw/page/2/

Here’s the code I’m using:

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="/jwplayer/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" => "video.mp4", "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">
        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: "<?php echo $mp4["streamer"]; ?>", file: "<?php echo $mp4["file"]; ?>"}},
        
            /* Else, try an HTML5 video tag. */
            {type: "html5", provider: "video",
                config: {file: "<?php echo $mp4["url"]; ?>"}},
        
            /* Else, this is a safe fallback. */
            {type: "download", /* Download the file. */
                config: {file: "<?php echo $mp4["url"]; ?>"}}
        ],
        /* Set video dimensions. */ width: 900, height: 514
        });
    </script>

<?php } else /* Access is denied to the current User. */ { ?>
    Sorry, you do NOT have access to this file.
<?php } ?>

Also, Jason gave someone a really good looking code that seems to have more specific references to Amazon S3. I tried this one as well, but no luck. Here it is:

<div id="jw-container">JW Player® appears here.</div>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>

<?php
/* A direct URL to the CloudFront RTMP source; counting the file against the current User in real-time. */
$mp4_via_cf_cfg = array ("file_storage" => "cf", "file_download" => "video.mp4", "url_to_storage_source" => true, "count_against_user" => true);

/* A direct URL to the Amazon S3 source; NOT counting this variation against the current User. */
$mp4_via_s3_cfg = array ("file_storage" => "s3", "file_download" => "video.mp4", "url_to_storage_source" => true);

/* API Function `s2member_file_download_url()` returns false if access is denied to the current User. */
if (($mp4_via_cf = s2member_file_download_url ($mp4_via_cf_cfg, "get-streamer-array")) && ($mp4_via_s3["url"] = s2member_file_download_url ($mp4_via_s3_cfg))) {
?>

	<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: "<?php echo $mp4_via_cf["streamer"]; ?>", file: "<?php echo $mp4_via_cf["file"]; ?>"}},
				
			/* Else, try an HTML5 video tag with the `mp4` file. */
			{type: "html5", provider: "video",
			config: {file: "<?php echo $mp4_via_s3["url"]; ?>"}},
			
			/* Else, this is a safe fallback. */
			{type: "download", /* Download the file. */
				config: {file: "<?php echo $mp4_via_s3["url"]; ?>"}}
		],
		/* Set video dimensions. */ width: 480, height: 270
		});
	</script>

<?php } else /* Access is denied to the current User. */ { ?>
	Sorry, you do NOT have access to this file.
<?php } ?>

Any suggestions??

Thanks in advance!!

List Of Topic Replies

Viewing 9 replies - 1 through 9 (of 9 total)
Author Replies
Author Replies
Posted: Friday Apr 27th, 2012 at 9:02 pm #12107
Eva Galfi
Username: easylink

Just an update on this… I’ve installed the JW player plugin and it seems to be closer to working. The box shows up with the play button, but the video won’t play. I get an error message that says Task Queue Failed at Step 5. After emailing JW tech support, they suggested the following:

You need a crossdomain.xml file here – http://easylinkedintrainingvideosfolder.s3-website-us-east-1.amazonaws.com/crossdomain.xml

Currently one does not exist.

Reference – http://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html

Have you seen this before? Does this mean that another crossdomain.xml file is needed or do I simply add the same one? If you have any suggestions about how I can go about this, that would be great. I’m not sure how to add the file to where they suggest.

Thanks,
Eva

Posted: Saturday Apr 28th, 2012 at 4:49 am #12136

Eva, I just noticed your post. I moved it from the Community to the Customer Forum now.

When you tried this first, before installing the JW Player plugin, had you uploaded the player (not the plugin) to a /jwplayer/ dir? [hilite path]Dashboard -› s2Member® -› Download Options -› JW Player® & RTMP Protocol Examples[/hilite]

Download JW Player® here, and upload [hilite mono]/jwplayer/[/hilite] to your website’s root directory.

Have you watched this video? Video » s2Member® File Downloads (Amazon S3/CloudFront/JW Player)

Posted: Sunday Apr 29th, 2012 at 12:46 am #12181
Eva Galfi
Username: easylink

Hi Cristian,

Yes to both. I did upload JW player to the directory as per the instructions and I did also watch the video, but had no luck getting my video to play. I kept getting an error regarding the stream not fount. So, I thought I would try the plugin for JW player instead and now I get the Task queue failed at step 5 error. I asked JW player what to do and they gave me the instructions I sent in my last post to you, but I’m not sure what to do with them as they are unclear to me. What do you think about their instructions? Have you seen this issue before and did that solution work? How do I go about putting that crossdomain file where they suggest? Thanks, Eva

Posted: Sunday Apr 29th, 2012 at 1:35 am #12185

Since Jason recommends in the documentation to use the player in the jwplayer directory, I’d work with that instead of the plugin.

Could you submit your login info via contact form so I take a look? Could you also include the name of the video file in your Amazon bucket, as well as the page you tried the code to embed the file in? s2Member® » Private Contact Form

Thanks!

Posted: Thursday May 3rd, 2012 at 2:07 am #12429
Eva Galfi
Username: easylink

Hi Cristian,

Well, guess what. It was an obvious error on my part. Although I made the bucket in Amazon S3 public, I forgot to make each individual file public. Once I did that, the problem was solved.

Thanks for your help anyway! I really appreciate it!!

Eva

Posted: Thursday May 3rd, 2012 at 3:22 am #12431

Glad you solved it! Thank you for the update. :)

Posted: Thursday May 3rd, 2012 at 3:58 am #12436
Eva Galfi
Username: easylink

Well, actually I realize now that it’s actually downloading and not RTMP streaming. So, if you do have any ideas on how I can get the streaming to work, that would be great. I think with the setup I have now, people visiting the site can download the video, which is not what I want.

Thanks,
Eva

Posted: Friday May 4th, 2012 at 5:27 am #12570

Sorry for the delay, Eva. I see. I’ll run some tests tomorrow in my installation and get back to you. Thanks for your patience. :)

Posted: Saturday May 5th, 2012 at 4:24 am #12636

Thanks for waiting.

I just finished setting up my Amazon S3 and CloudFront and integrating them with s2Member. It all went fine.

Then I installed JW Player placingt he files in [hilite mono]/jwplayer/[/hilite] and uploaded the video.mp4 file to my S3 bucket for s2Member.

Then copied the player code for RTMP streaming and pasted it in a WP page, saved and viewed it. No player. Viewed the HTML source and noticed WP adding paragraph and line break tags around the script tags, so I installed the Raw HTML plugin and wrapped the script block with raw shortcodes. Reloaded the page and player worked!

I’m using the RTMP streaming code for the player (couldn’t add the raw shortcodes around the script tags in the code below because it messed up the post here):

[hilite path]Dashboard -› s2Member -› Download Options -› JW Player & RTMP Protocol Examples -> JW Player (RTMP streaming MP4, via s2Member's Amazon S3/CloudFront integration)[/hilite] [hilite pre_code]
JW Player® appears here.

"video.mp4", "url_to_storage_source" => true, "count_against_user" => true); ?>


Sorry, you do NOT have access to this file.
[/hilite]

Is that the one you’re using? Why do you say it’s not streaming but downloading?

Viewing 9 replies - 1 through 9 (of 9 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.