How can I convert from mp4 to webm?

Just to update this answer, I would not recommend using Miro Video Converter any more. It used to be my weapon of choice for creating HTML5 video for web, but the current version 3 of the program has issues with converting into ogg theora: the quality of the converted video is far too low and to create a higher quality version you have to use ffmpeg command line utility.

Easyhtml5video is really good as it automatically creates all video formats with flash fallback with embed code but you will have to pay $69 for it – the free version adds watermarks to the videos.

At the minute I’m using VLC player to do the video conversions. To convert mp4 files in VLC I do the following:

Conversion to .webm

  1. Select Media > convert/save from the menu.
  2. Click ‘add’ button and select the file you want to convert
  3. Click ‘Convert/Save’ button
  4. in the ‘profile’ dropdown select ‘Video – VP80 + Vorbis (Webm)’
  5. click on the button next to the drop down (“edit selected profile” – looks like a spanner+screwdriver icon)
  6. Encapsulation tab should be set as Webm.
  7. Click on ‘video codec’ tab. In the encoding parameters, the codec should be selected as ‘VP8’.
  8. In the Audio Codec tab, ‘keep original audio track’ should be unselected. The Codec should be set to ‘Vorbis’
  9. Click ‘Save’
  10. important: select the destination file location and name. Click on browser, go to the folder you want the converted filename to go in, and enter the new filename. If you dont do this, VLC will not create your converted file (well not in version 2.1.5 anyway)
  11. Click ‘Start’ to start the conversion.

Conversion to .ogv:

  1. Select Media > convert/save from the menu.
  2. Click ‘add’ button and select the file you want to convert
  3. Click ‘Convert/Save’ button
  4. in the ‘profile’ dropdown select ‘Video – Theora + Vorbis (OGG)’
  5. click on the button next to the drop down (“edit selected profile”)
  6. Encapsulation tab should be set as Ogg/Ogm.
  7. Click on ‘video codec’ tab. In the encoding parameters, the codec should be selected as ‘theora’ and the bit rate should be 1000kb/s if you have text in it. Lower bitrate might be fine for smaller videos.
  8. In the Audio Codec tab, select ‘keep original audio track’
  9. Click ‘Save’
  10. select the destination file location and name.
  11. Click ‘Start’ to start the conversion.

If you need to resize or crop your video, I would recommend you do this to the .mp4 file first using Handbrake. Trying to create resized versions of .ogg/ogv or webm files using VLC does not give you great results in my experience.

When putting the videos on a webpage, I use VideoJs – this allows you to create html5 video with flash fallback for older browsers very easily. Slightly more work than easyhtml5video, but its free to use.

Leave a Comment

tech