Home › Forums › Community Forum › JWPlayer & S3 – Video Not Found
This topic contains 18 replies, has 3 voices. Last updated by Philly 4 years, 4 months ago.
Topic Author | Topic |
---|---|
Posted: Tuesday Sep 4th, 2012 at 12:15 pm #24041 | |
|
|
I’ve been working on this for a while now, but for some reason I can’t quite seem to setup a stream using JWPlayer. I am currently using another forum users plugin build: http://phillymax.com/web/s2member-video-shortcode/ Which seems to match up fine with the code provided by s2member. However, I continue to receive the following error when I click play on the player: Video not found: video.mp4?response-cache-control=no-cache%2C+must-revalidate%2C+max-age%3D0%2C+post-check%3D0%2C+pre-check%3D0&response-content-disposition=inline%3B+filename%3D%22video.mp4%22&response-content-type=video%2Fmp4&response-expires=Tue%2C+28+Aug+2012+15%3A51%3A41+GMT&AWSAccessKeyId=AKIAIOMI74ZQ4D23KRLA&Expires=1346773931&Signature=tUzaSpytcxQOzqZOu1m3lBFjjBw%3D”,”url”:”http:\/\/s2member-files.ironphoenix.com.s3.amazonaws.com\/video.mp4?response-cache-control=no-cache%2C+must-revalidate%2C+max-age%3D0%2C+post-check%3D0%2C+pre-check%3D0&response-content-disposition=attachment%3B+filename%3D%22video.mp4%22&response-content-type=video%2Fmp4&response-expires=Tue%2C+28+Aug+2012+15%3A51%3A41+GMT&AWSAccessKeyId=AKIAIOMI74ZQ4D23KRLA&Expires=1346773931&Signature=9%2F9scfwnjxsS9QG2UzW2Vs%2FNP7k%3D The video file I am attempting to play is located in my s2member file bucket on S3. S3 & s2m seem to be configured correctly since the following URL will download the video: http://ironphoenix.com/?s2member_file_download=/video.mp4 I have an inkling it may be a server configuration issue, but I need some help determining where I look next. A test page for this implementation has been setup at: http://ironphoenix.com/video-test/ Thanks in advance for the help. |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Tuesday Sep 4th, 2012 at 12:39 pm #24044 | |
|
|
Hello, Please can you download s2Member’s Server Check Tool, upload the PHP file to your WordPress directory, and then load the URL to the file in your browser. It will run a bunch of tests to determine if there’s anything amiss on the server-side. Lets see what that say’s and then go from there :) |
|
Posted: Tuesday Sep 4th, 2012 at 1:45 pm #24048 | |
|
|
Passed everything. Only gave me a warning to increase WP memory limit to 64MB. |
|
Posted: Tuesday Sep 4th, 2012 at 2:06 pm #24052 | |
|
|
The shortcode don’t seem to be parsing correctly, can you disable your plugins one by one starting with the shortcode plugins your using, checking after each one to see if it works, maybe one is conflicting? |
|
Posted: Tuesday Sep 4th, 2012 at 4:34 pm #24063 | |
|
|
I deactivated all except s2member and the video shortcode plugin. No change in behavior. What part isn’t being parsed correctly and what should it be? |
|
Posted: Tuesday Sep 4th, 2012 at 4:55 pm #24065 | |
|
|
Can you put this in your page and see what it outputs? If its the same error then we can at least narrow it down to a conflict with the s2member shortcode as opposed to the video one
It’s supposed to output something like
|
|
Posted: Tuesday Sep 4th, 2012 at 5:36 pm #24071 | |
|
|
Here is what the s2File shortcode is giving me:
|
|
Posted: Tuesday Sep 4th, 2012 at 5:45 pm #24073 | |
|
|
I think your right when you say it may be a server configuration issue as one thing i notice is the link has expired so I would check what time your server thinks it is. I think there maybe more going on than that though, but I can’t think what. Lets see what the Cristián or Raam thinks? |
|
Posted: Tuesday Sep 4th, 2012 at 7:12 pm #24082 | |
|
|
Time is good on the server. The response-expiration being a week behind looks to be coming from s2member’s amazon_s3_url function:
However, that is only in the file part, the AWSAccessKeyID and Signature use now + 30 seconds. |
|
Posted: Wednesday Sep 5th, 2012 at 5:04 am #24137 | |
|
|
Funny, when I tried http://s2member-files.ironphoenix.com.s3.amazonaws.com/video.mp4 I got the file download prompt in Firefox. I don’t know if it’ll help, but have you read this? Knowledge Base » JW Player sample code not working About your server time, if you do this [hilite code][/hilite] in a PHP file, what do you get when you open it with your browser? Is it correct? |
|
Posted: Wednesday Sep 5th, 2012 at 8:42 am #24152 | |
|
|
I have nearly 20 hours investigating this issue over the past couple days, reading every thread I can find, trying every trick I know, and combing through endless lines of code. The good news is that I know a lot more about the inner workings and how everything should work. The bad news… I still can’t figure out why this doesn’t! I looked over what you have in the KB. My AWS S3 setup with S2M is correct. I have image files on S3 that are being pulled without any issue. The data being sent in looks to be formatted correctly too (I am using raw tags around the shortcode). Time was also checked and it is spot on. So here is where I am at now. The streamer being passed is:
That seems to be correct. The file parameters being passed:
This also looks correct. Here it is again with each parameter broken out for readability:
Next step was to look at the request & response headers to see what was actually being sent vs what was being passed to JW Player. Request URL
Request Method
Status Code
Request Headers
Query String Parameters
Response Headers
So a couple of things jumped out at me. Main one was the request URL. If you look just past the domain you get the following:
I’m not sure if the “?file=” is meant to be part of the URL and thus unable to find a file and throwing a 403 error. Does anyone else see the same in their request URL? |
|
Posted: Wednesday Sep 5th, 2012 at 8:58 am #24153 | |
|
|
The streamer being passed is incorrect it should be
I notice your not using the latest version of wordpress, are you able to upgrade? And as a test can you switch to the twentyeleven theme with only the s2member plugin activated, and see what the response is. I think the 403 is because amazon is seeing the request as expired |
|
Posted: Wednesday Sep 5th, 2012 at 9:43 am #24160 | |
|
|
Can you also check the contents of your crossdomain.xml file in your amazon bucket, on some installations this gets corrupted |
|
Posted: Wednesday Sep 5th, 2012 at 1:45 pm #24183 | |
|
|
I’ve updated to the latest version of WP. The streamer is giving me HTTP because I am using S3 to distribute instead of Cloudfront (which would use rmtp). However, when I try and use cloudfront I still get the same problem. The request isn’t expired. The response is expired. That is done purposefully in s2member for what I assume is to prevent caching of the file. The request has the current time + 30 seconds. Just so I could test the URL myself, I added a filter to increase the expiration to now() + 10 minutes. Now you can go to the test page ( http://ironphoenix.com/video-test ), and while it still creates a “Video not found” error and 403, you can copy the URL being passed into JW Player and run it in your browser. Doing so will cause the video to open(inline if your browser is HTML5 compatible, otherwise D/L). So the file URL being passed (to JWP), with all of its parameters, seems correct to me. JWP is modifying this URL. This could be why I’m getting a 403 because the signature won’t match if the URL changes. My next question is why JWP is modifying the URL? Also, I am using the latest version of JWP (5.10). |
|
Posted: Wednesday Sep 5th, 2012 at 1:47 pm #24184 | |
|
|
My crossdomain.xml was corrupt (seemed to be a PHP error with s2member function), but I corrected that yesterday and opened access to all.
|
|
Posted: Wednesday Sep 5th, 2012 at 2:42 pm #24188 | |
|
|
Sorry but I think its my fault when you said streaming I thought you were using cloudfront as well. So the limitation is with the plugin, So i will fix that now. My apologies |
|
Posted: Wednesday Sep 5th, 2012 at 6:17 pm #24207 | |
|
|
Right I’ve been at this for hours but still cannot get it to work. I thought it may have been the shortcode plugin because it was setting
as the default. That turned out not to be the case as I was replicating the problem without the plugin. For some reason the JW player doesn’t like that url when in flash mode via http, in flash via rtmp its fine and in html5 mode its also fine. The only way it seems to work in flash-html mode was passing the url like
Which you cannot do with the plugin at the moment. I don’t know why but its probably to do with what you said. If you dont need to set download keys and any features like that, you can use JW’s official plugin which seems to work as long as you don’t intend on using rtmp. I’m going to have a look at adding more options to the shortcode plugin to account for this |
|
Posted: Wednesday Sep 5th, 2012 at 8:23 pm #24225 | |
|
|
Thanks for looking into this! RTMP: I ended up going back to Cloudfront and got that to work. I think the one time I tried it before I had a corrupt crossdomain.xml, but I didn’t fix it until after I reverted back to S3 only method. It is worth noting that I had checked “Yes” to have s2member configure CF for me which generated the corrupt crossdomain.xml file. Looks like there was a PHP error during the generation based on what I saw in the file. So now I am using the following:
Just opening access from my domains. HTTP: Getting the HTTP pseudostreaming won’t take when you are authenticating via signature with S3. I was able to clear the 403 errors by faking the signature (JWP’s addition of “?file=” before the filename causes AWS to calculate the signature without the filename OR the first parameter, which in this case was response-cache-control). However, even thought I received 200 status, I still couldn’t get a video file. The modification to the URL causes AWS to return a bucket list rather than a file. So I’m concluding that HTTP pseudostreaming is currently not possible with JWP. JWP places the filename into a query string which S3 doesn’t parse and act on the file attribute. HTML5 works fine with just S3, but Flash is going to be a challenge. |
|
Posted: Wednesday Sep 5th, 2012 at 8:47 pm #24232 | |
|
|
HTTP Yes you are right about that. The only way to get HTTP pseudostreaming to work is like this
The plugin tries to serve the file via rtmp and flash first, then if flash is not supported it switches to the html5 player and server via http. Which works fine. |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.