HandBrake Guide

How to Convert WebM to MP4 in HandBrake

Make an MP4 your player or editor can open. Keep the right soundtrack and decide when you can copy VP9 or AV1 without re-encoding.

An autumn film frame beside a memory card and compact adapter

To convert WebM to MP4 in HandBrake, open the WebM, choose a preset, then set Summary > Format to MP4. For an SDR playback copy, choose H.264 (x264) on Video and AAC on Audio. Select AAC (avcodec) on Windows or the official Linux Flatpak, and AAC (CoreAudio) on macOS. If the receiving app already accepts your VP9 or AV1 video in MP4, I'd check whether its tracks can be copied before spending time on another video encode.

Think about where the finished file needs to open. The WebM might be a screen recording with tiny text, a 60 fps clip, or a file with separate microphone and desktop audio. Each needs a different check before you queue the conversion. Keep the WebM so you can start again from the source if the first copy misses something.

Check what the WebM contains

WebM and MP4 are containers. A WebM can hold VP8, VP9 or AV1 video and Opus or Vorbis audio. The player or editor needs to accept the actual streams inside the new container. Renaming the original file leaves its container and codecs unchanged.

Read the source codec, frame size and frame rate. Check for the microphone, system audio, other languages and any subtitle track you need. HandBrake shows the source and track choices after it scans the file. For stream-copy decisions or a scan that comes back incomplete, use ffprobe to list the streams and container details.

ffprobe -v error -show_streams -show_format -of json "recording.webm"

Use codec_type and codec_name to identify video, audio and subtitle streams. Check the resolution and channel count, plus any language or title tag that helps distinguish tracks. Listen to ambiguous audio tracks in the source. A track marked English could be commentary or microphone audio.

What you have or needWhat I'd choose
VP8 WebM, or a destination that asks for H.264Encode H.264 and AAC to MP4 in HandBrake.
VP9 or AV1 plus Opus, with a destination that explicitly accepts both in MP4Copy the streams into MP4 with FFmpeg, then verify playback.
VP9 or AV1 that the destination accepts in MP4, but the existing audio is incompatible with the destination or the destination requires AACCopy the video with FFmpeg and encode the selected audio to AAC.

The FFmpeg 8.1 MP4 writer lists VP9, AV1, Opus and Vorbis. With that writer, VP8 video needs to be re-encoded for MP4. FFmpeg uses a nonstandard MP4 object type for Vorbis, so I'd convert Vorbis to AAC for broad playback compatibility. Check both muxing and actual playback. Test the saved MP4 in the actual player, editor or upload workflow.

Make an H.264 and AAC MP4 in HandBrake

  1. Open one source. In HandBrake, choose Open Source, select the local WebM and let it scan. Check the title and duration. Leave the full range selected for your final file.
  2. Pick the preset before changing its settings. For SDR video where a 1080p resolution limit and a 30 fps cap are acceptable, choose General > Fast 1080p30. The 1.11.2 preset uses H.264 (x264) at RF 22, a 1920 × 1080 limit, 30 fps Peak Framerate and AAC stereo at 160 kbps. If you need the lines in a 1440p screen recording or the motion of a 60 fps clip, choose a starting preset with limits that fit that delivery. Confirm the actual settings afterward.
  3. Confirm MP4. Set Summary > Format to MP4. Select a separate output path using the destination chooser. On Windows, Save As shows the full path. In the Mac layout, choose the folder in To and enter the filename in Save As. Give the copy a name you can distinguish from the WebM and earlier tests.
HandBrake on Windows with recording loaded and Summary Format set to MP4
Open recording.webm and choose MP4 in Summary > Format. The Source row shows the name without its extension. Open full size.

If the finished name ends in .m4v, HandBrake still wrote an MP4 container. Choose the .mp4 extension when the receiver requires it.

Keep the frame and timing you need

Open Dimensions and check the final size. HandBrake's automatic crop uses a best guess. Set Cropping to None if the source edges matter, especially when the recording shows menus, tooltips or a cursor close to the edge. Check Resolution Limit and leave Allow Upscaling off for a copy at the source size or smaller.

On Video, choose H.264 (x264). Use Constant Quality when the copy has no hard size ceiling. HandBrake's quality guide suggests RF 20–24 as a starting range for 1080p x264. RF 22 is a useful first sample. A lower RF requests higher quality and usually takes more space. Compare the result at its actual viewing size. Watch text and motion in a short sample. If your source is HDR, choose an SDR color conversion or use a supported HDR encoding path before you set up this copy.

Use Same as Source with Variable Framerate if you want the source timing and the receiving app supports it. For an editor or service that requires a fixed rate, choose its specified rate and Constant Framerate. The frame-rate controls distinguish both from Peak Framerate, which puts a ceiling on faster portions.

HandBrake Video with H.264 (x264), Constant Quality RF 22, and 30 fps Peak Framerate
Fast 1080p30 starts at RF 22 and caps the frame rate at 30 fps. Check which timing your delivery needs. Open full size.

Select the soundtrack and captions

On Audio, check Source and the codec for every output row. The Fast 1080p30 preset starts with the first audio track. For a screen recording with mic and desktop audio on separate tracks, listen to each source and keep the ones you intend to deliver. Add them as separate outputs when the recipient needs a choice of tracks. If you need the mic and desktop sounds playing together, mix them in an editor first and use that soundtrack for delivery.

For a player or editor that expects AAC, choose AAC (avcodec) on Windows or the official Linux Flatpak, or AAC (CoreAudio) on macOS. HandBrake's audio encoder list shows platform availability. Stereo is a useful mixdown when the delivery needs two channels. HandBrake's MP4 container notes recommend AAC for broader player compatibility. MP4 can hold Opus, so keep an Opus track by passthrough when the destination explicitly accepts it and you've verified the output. Auto Passthru drops an audio track if the track can't be copied and the fallback is set to None. Set an explicit codec when you need that soundtrack in every delivery.

HandBrake Audio with an Opus source, AAC (avcodec), 160 kbps, and Stereo selected
This Windows example converts an Opus source track to AAC at 160 kbps in stereo. Check each output row before starting the job. Open full size.

Next, open Subtitles and see which source tracks the scan exposed. A WebM may contain WebVTT captions. If a needed track is missing in HandBrake, get the matching captions as an SRT from the original project or a subtitle editor. To use that .srt, import the SRT in the Subtitles tab. Check the character encoding and timing. Keep the captions selectable if the target app supports MP4 text tracks. Use Burn In when they must always appear and you're comfortable making them part of the image. Play a scene where the captions should appear.

Encode a short sample and check the whole copy

Open Preview and encode a sample with motion, fine text and speech. The moving preview lets you check the actual encode before converting the whole source. If you need to test the destination app itself, save a short range as a separate file, open it in that app, then restore the full range before you add or start the final job.

Restore the full range after a test copy. For a single job with an empty queue, click Start Encode on Windows or Start on Mac. If other jobs are already waiting, use Add to Queue for this copy and check its destination before you start the queue. Follow the queue workflow if you're preparing multiple jobs.

After the full encode, open the MP4 in the intended app. Seek near the end and check the final scene, listen to each required audio track, and turn captions on if you kept them selectable. Check the output dimensions and file size if the delivery has limits. Repeat ffprobe on the MP4 when the destination requires specific codecs or track counts.

Copy the video when the destination already supports it

HandBrake always encodes the picture. If you're only changing the wrapper and the recipient accepts every stream you plan to keep, FFmpeg streamcopy can put the selected encoded streams into an MP4 without encoding them again. For VP9 or AV1 with an Opus track that the destination accepts, this command copies the first video and first audio stream.

ffmpeg -n -i "recording.webm" -map 0:v:0 -map 0:a:0 -c copy "recording-copy.mp4"

If the picture is already suitable but the recipient wants AAC stereo, copy the video and encode that audio track separately.

ffmpeg -n -i "recording.webm" -map 0:v:0 -map 0:a:0 -c:v copy -c:a aac -ac 2 -b:a 160k "recording-aac.mp4"

Each -map selects a stream. These examples keep one picture and one soundtrack. Use 0:a:1 for the second audio stream if that's the one you need. For a source recorded without sound, omit the audio map and audio encoder options. Choose any additional tracks deliberately and verify that both the writer and receiver accept them. The -n option stops FFmpeg before it overwrites an existing output file.

Fix a WebM that scans, plays or exports incorrectly

  • HandBrake won't open it. Confirm the recording or download finished and the file is available locally. Try playing the full source and inspect its streams. Check the HandBrake Activity Log for a scan or decode error before changing the output codec.
  • The source plays, but the duration or progress looks wrong. Check whether the source player can seek and whether it plays through the last scene. The WebM cue index supports seeking. If the file plays sequentially, a short encode can confirm that HandBrake reads the picture and sound. Check the Activity Log while a full job runs. Compare the last scene of the saved MP4 with the original. If the source is incomplete, get a complete copy before you encode it again.
  • The MP4 plays with the wrong sound, or none. Inspect the saved audio streams, then compare them with the source. If the source has the right track, choose it explicitly and use AAC for the playback copy. If the recording contains no audio stream, recover the original recording with sound or locate its separate soundtrack.
  • The new file is larger than the WebM. Check the resolution, the quality setting and the selected audio tracks. An H.264 encode at your chosen quality can use more data than the original WebM. When the receiver enforces a maximum file size, use a duration-based bitrate budget and verify the complete file.
  • The WebM has transparency. Keep the WebM when you need its alpha channel for compositing. Treat the H.264 and AAC recipe here as an ordinary opaque playback delivery.

After one complete file works, reuse the settings for compatible sources. Check each source's timing and tracks and assign separate filenames before you start a batch in HandBrake.

Filed under Convert video