- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
ffmpeg settings for converting to mp4 and ogg for HTML5 video
Convert videos to proper formats for HTML5 video on Linux shell using ffmpeg.
When converting to an MP4, you want to use the h264 video codec and the aac audio codec because IE11 and earlier only support this combination.
ffmpeg -i input.mov -vcodec h264 -acodecaac -strict -2 output.mp4
In this example, input.mov is converted to output2.mp4 with maximum compatibility, with Quicktime support, and without an audio stream.
ffmpeg -an -i input.mov -vcodec libx264 -pix_fmt yuv420p -profile:v baseline -level 3 output2.mp4
For Firefox compatible ogg video, ffmpeg2theora should be installed. Here the input file is output file from the ffmpeg conversion done before.
Here’s the command,
ffmpeg2theora -o video_out_file.ogv output.mp4
Advertisements