FFMPEG - Convert WebM (or other) to X264

Published: 2018-07-29 08:23:24 +0000
Categories: BASH,




There are a lot of video codecs out there, and some of them are far, far more efficient than H.264. But, as efficient as HEVC or WebM might be, they're frustrating to stumble across if your playback device is a Raspberry pi which has neither the hardware support, nor the processing capabilities required to deal with those codecs without stuttering

It is, however, incredibly simple to convert to X264 with ffmpeg, the below snippet creates a utility script to do so by just passing in the input filename and the destination file to create


# Swap something to X264 with AAC audio


if [ "$1" == "" ] || [ "$2" == "" ]
    echo "$0 [in file] [out file]"
    exit 1

ffmpeg -i "$IN" -c:v libx264 -codec:a aac -strict -2 "$OUT"

Usage Example

to_x264.sh foo_bar.webm foo_bar.mp4



ffmpeg, x264, transcode, webm, ogg, vorbis, hevc, mkv, mp4,

Latest Posts

Remotely backing up PFsense Configuration (BASH)
FFMPEG: Converting RMVB to X264 MP4 (BASH)
Recursively print table (print_r equivalent) (LUA)
Bulk Delete Comments from (Self-Hosted) JIRA Issues (Misc)
Add a static entry to the ARP table (BASH)
SSL Cipher Hex codes to Human Readable Names (Misc)
Convert Ascii to Binary (BASH)
Intercepting Outbound DNS Queries (BASH)
Handle Google Verification files within NGinx Configuration (NGinx)
Getting WhatsApp Rich Snippet Previews Working (Misc)

Copyright © 2018 Ben Tasker | Sitemap | Privacy Policy
Available at snippets.bentasker.co.uk and snippets.6zdgh5a5e6zpchdz.onion