Do you have any trouble getting your videos to play in some browsers with FV Player (or any other HTML 5 video player)? Here's how to fix it.
If your mp4 videos on Amazon S3 do not have the proper MIME type, also known as content-type, you will have to edit them to be able to play these videos. This can be fixed as a batch operation using Bucket Explorer.
Follow these simple steps to fix the problem:
- Where to check if MIME type of my video is set up properly?
Log in to your Amazon Web Services (AWS) account at https://console.aws.amazon.com, and click S3 in the menu:
- Click the bucket to which your video was uploaded, and click Properties:
- and then click Tags:
There should be the following values:
Key: Content-Type Value: video/mp4
but definitely NOT application/octet-stream.
How to fix it?
In your AWS account, click your username and then click My Security Credentials.
If a window shows up, informing you that you are accessing the security credentials of your AWS account, close it by clicking X in its top-right corner.
- Select Access Keys. You will need both your secret Access Key and Access Key ID.
You cannot view your Secret Access Keys. If you do not know them, you can create a new pair by clicking Create New Access Key. At the next window, click Download Key File to save it, as you will not be able to get it later.
- Download a trial version of Bucket Explorer by following this link: https://bucket-explorer.en.softonic.com. Once downloaded, install it.
- When opening Bucket Explorer for the first time, click Get 30 days Free-Trial License. The other times just click Continue with trial version.
- When Bucket Explorer opens, enter the access and secret keys from Amazon Web Services and type "Amazon S3" into the Name field. Then press GO.
- Choose the Save Without Password option when the dialogue box opens.
Now you can see all your buckets from Amazon S3. Choose a bucket and press Show Full Path.
- Now you can see the full path of the selected bucket.
- Click on the magnifying glass icon and select the Search By Prefix and Delimiter option.
- In the new window, type mp4 into the Delimiter field and press Search.
- Now you can see how many items match the search request.
- Select all the files. Click on the Batch Operation icon in the bottom row of icons. Select Update Metadata and then Edit Metadata.
- A new Edit Metadata window will open. Press Add to continue.
- Another box will open. Choose Content-Type from the drop-down list in the HTTP Header field.
- Type video/mp4 to the Header Value field and press Add.
- The Content-Type key with the video/mp4 value will appear in the Custom Header field of the Edit Metadata window. Click Edit Metadata.
- You can see the progress of editing when you click on the Queued Files tab. The duration of the editing will depend on the number of files. It may take several minutes.
- The actual count of the queue is available in the Statistics tab.
- When the editing is finished, choose a video from the edited bucket to test if it played correctly. The Video OK admin note will appear above the video.
From now on, your videos should play well in HTML 5 and specifically in FV Player. If you run into any other issues or have any further tips for using Amazon S3 for HTML 5 videos, do not hesitate to let us know.
Thanks for using FV Player!