When working on an application that streams videos from S3 I noticed that whenever an S3 object has a space in its name it fails to stream. However, when streaming objects without spaces in the name it works fine.
The solution is as follows:
I am using PHP and JW Player 4.3. The problem is due to JW player not encoding url when
rtmp:// protocol is used (specifically in
RTMPTModel.as file). So to fix the problem with playing files that have spaces you need to either:
- Replace spaces with “+” and urlencode() the whole url after that. For example:
- Double urlencode() the whole url. For example:
urlencode(urlencode("mp4:amazons3//file name with spaces.m4v"));