Convert webm to mp4

By  on  

There's an upcoming Mozilla trip to Hawaii on the cards and, in trying to be a good family man, I'm bringing my wife and two young sons.  Glutton for punishment?  Probably.  Anyways, I've been feverishly downloading cartoons from YouTube using youtube-dl to put onto our new iPad to keep my oldest son occupied during the long flight.

It seems as though YouTube preserves the original video format, since sometimes youtube-dl provides a webm and other times a mp4.  Since mp3s are iOS' best friend, I've needed to convert the webm files to mp4.  The following ffmpeg command will make that happen:

ffmpeg -i "Spider-Man.webm" -qscale 0 "Spider-Man.mp4"

The qscale 0 directive instructs ffmpeg not to adjust quality of the video during conversion.  And with this conversion I can now properly transfer the videos onto my iPad.

Check out my media tutorials for more magic when it comes to video, audio, and images.  You're sure to learn a few tricks along the way.

Recent Features

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

  • By
    Page Visibility API

    One event that's always been lacking within the document is a signal for when the user is looking at a given tab, or another tab. When does the user switch off our site to look at something else? When do they come back?

Incredible Demos

  • By
    Control Element Outline Position with outline-offset

    I was recently working on a project which featured tables that were keyboard navigable so obviously using cell outlining via traditional tabIndex=0 and element outlines was a big part of allowing the user navigate quickly and intelligently. Unfortunately I ran into a Firefox 3.6 bug...

  • By
    Telephone Link Protocol

    We've always been able to create links with protocols other than the usual HTTP, like mailto, skype, irc ,and more;  they're an excellent convenience to visitors.  With mobile phone browsers having become infinitely more usable, we can now extend that convenience to phone numbers: The tel...

Discussion

  1. Raph

    Hello,

    Have a look at this : https://www.onlinevideoconverter.com/firefox-addon

    This Grease adds a “convert” video to Youtube. Everything is processed on their server and it’s pretty fast !

  2. What about using the --list-formats argument with youtube-dl and download the MP4 that suits your needs?

  3. Jason Watkins

    Suggested code doesn’t work (10/22/17), Ubuntu 16.04.3 amd64

    “The encoder ‘aac’ is experimental but experimental codecs are not enabled, add ‘-strict -2’ if you want to use it.”

  4. It now says “Please use -q:a or -q:v, -qscale is ambiguous”.
    I guess -q:v 0 would be the new substitute.

Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!