0
votes

I am wondering if I am using HTML5 to develop UI for both mobile (for both Android and iPhone) and PC. If I have a video recorded for PC (high bandwidth, screen size and Windows codec, etc.), and I am not sure if HTML5 could automatically generate adaptive video stream for mobile client (so that on server side, I only need to keep one copy of video)? If not, what is the best practices to support video rendering from both PC and mobile (do I have to encode into different formats using different codec)?

Any related documents or code samples are appreciated.

thanks in advance, Lin

1
Best practice is to upload it to a service that does that for you (like Vimeo, Youtube), since there are many things you need to take into consideration - there are whole bunch of video and audio codecs each supported by different browsers. Look here for starters: w3schools.com/html/html5_video.aspMiha Rekar
Hi Miha, sorry I cannot upload the video to external web site. So, I want to confirm if client browser does not support the video codec, I have to encode the video using different codec? And HTML5 will not help to adaptive making client browser adapt video at server side, is that correct?Lin Ma

1 Answers

0
votes

You have many, many options.

Typically you convert all possible formats at once. Amazon web services offers a pay-as-you-go video encoding service, but they're not the only game in the market. They are typically the cheapest since other processing farms usually sit on their stack.

We usually convert to mp4/h264 and ogg/theora and occasionally webm/vp8.

You can use the AWS conversion api to put files in the queue, then pull them down from S3 when ready, or leave them there as your video source URL. You can even make them private with the api, and login to your service with your app or webserver depending on the application.

I've also run FFMepg on the server to output various formats, but then you need to manage your own queue and can be a headache.