Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

VERY Strange. Video not found, only sometimes

6 replies [Last post]

I'm evaluating JW FLV Player for a possible commercial license and love it, especially the API. However, I've run into a problem that is truly mysterious to me. I hope you have some insight.

I'm hosting my FLV's on Amazon's S3 service which has the ability to create urls that are valid only for a certain length of time (to prevent leeching). I have a simple PHP function that returns to currently valid URL for the specified FLV file. It might sound complicated if you haven't used it before, but it's quite simple.

I have to urlencode the file name to get them to work, and it works fine. Mostly. Except on some files. Some files return a "file not found" error, even though they are there if I directly enter the URL into the browser. There's something in the way they're being interpreted by either javascript or JWFLV.

For example, if I set flashvars { file: } to
http://video.icapwebshops.com/03-01.flv?AWSAccessKeyId=0FCXSNM7KPNCFYG8QA02&Expires=1231736410&Signa...

then it works. However, if I use the follow url, it gives me the "Video not found" error:

http://video.icapwebshops.com/04-01.flv?AWSAccessKeyId=0FCXSNM7KPNCFYG8QA02&Expires=1231736410&Signa...

Here are the two lines, urlencoded:
http%3A%2F%2Fvideo.icapwebshops.com%2F03-01.flv%3FAWSAccessKeyId%3D0FCXSNM7KPNCFYG8QA02%26Expires%3D1231736410%26Signature%3DIzp%252F6ex6rKg6uIknSOPD%252FdGEge0%253D
http%3A%2F%2Fvideo.icapwebshops.com%2F04-01.flv%3FAWSAccessKeyId%3D0FCXSNM7KPNCFYG8QA02%26Expires%3D1231736410%26Signature%3D8%252BfnypVUPj2w4kCp0ekQ7lJr1QU%253D

The files would have likely expired by the time you read this, but I can assure you, when I enter the non-urlencoded URLs into the browser right now, they are found.

There's evidently something wrong with the second url, and I have no idea why. Some of the videos work perfectly, and others not at all. I've double-checked that the files have the correct permissions set at S3.

Any ideas? I told you this was a real head-scratcher!

At first I thought it might be the way swfobject.js encoded the flashvars, but it seems to be working perfectly.

Is there a way to expand on the error message ("Video not found: [url]" that's given by JWFLV? For example, to obtain the http response code?

..or at least see the entire error message returned by the flash player? The URL is cut off in the message box.

Never mind... I found the reason and a couple possible solutions at

http://www.longtailvideo.com/support/forum/Setup-Problems/7019/Intermittent-starts-with-Amazon-S3-Ex...

Turns out the problem is that Amazon's urls can contain %2B in the signature which causes an issue with flash.

I can't believe Amazon hasn't fixed this yet.

No URL should ever include the "+" character because of the long history of it being used to replace spaces in URLs.

maybe its a server setting.

I had to change (add FLV to) the MIME file types in my server (IIS) settings.

otherwise i got a simmilar error. now it works perfectly

Hi michiel.
Hvae you changed the flv = video in your Mimes??

I have the same problem.