mardi 2 juin 2015

mp4 files transcoded by handbrake, stored in s3 stream very slowly in firefox

FF 38 on Mac, Linux, and Windows.

I am talking about h.264 mp4s throughout this question.

We have a content curation app; one where users upload multimedia to s3, transcode the file using elastic transcoder and playback the transcoded version. Using this workflow, every file behaves as expected.

We recently added a feature to allow users to add already transcoded (using any variety of services, handbrake for example) files directly to s3, and play them back in the browser. This works as expected in Chrome.

However, in Firefox, the videos take minutes to begin playback at all, then struggle to continue streaming. We have seen this behavior in files as small as 200mb and up to 600mb.

We use jwplayer for playback.

Sometimes, and I stress sometimes, after clicking play, we see a 416 http error code where the browser has requested the last byte of the file. I can refresh the page several times, and might see it, but might not. If I come back to the same file in 10 minutes, the error may be gone, but the file still does not playback correctly.

We do see, for each 206 part request, a SHA1 warning for the SSL cert.

Chrome seems to make one request with range header set to 0-, another request for bytes towards the end of the file, and then a couple part requests. It immediately begins playback after. Firefox (if it is not getting the 416) does similar, but instead will request upwards of 8 parts and then hang.

Finally, Firefox blocks upload of these files using our standard uploader as well. I get a 403 Forbidden on the initial POST request.

These files are not corrupt, as far as I can tell, as they playback fine locally, and in Chrome. Chrome also allows the upload of the files. I should also mention that I can download the file from S3 and playback works locally.

I will provide whatever other diagnostic information you might need.

Are there any known issues that we have missed in our googling/bug hunting? Any other avenues we can go down? Any ideas on how to improve playback?




Aucun commentaire:

Enregistrer un commentaire