HandBrake Guide

Change a Video’s Soundtrack in HandBrake

Change the codec or channels of a selected soundtrack. Use FFmpeg when the video stream needs to stay intact.

Two coiled audio plugs connected to a small silver interface

HandBrake can change a soundtrack when you also want a new video encode. Open Audio, choose the soundtrack in Source, and set a codec the receiving player supports. If you need to keep the picture exactly as encoded, copy the video stream with FFmpeg and encode only the audio. For a separate MP3 or WAV, use an audio extractor.

Choose the workflow that produces the file you need

An audio codec and an output file are different things. Selecting MP3 on HandBrake's Audio tab puts an MP3 track inside the selected video container; it doesn't create an .mp3 file. Renaming that video file won't extract its soundtrack.

Your taskSuitable routeWhat happens
Make a smaller video and change its audioHandBrake: set both video and audio.Video is encoded; each audio row is copied or encoded as configured.
Keep the video unchanged and convert its audioA tool with video stream copy, such as FFmpeg.The selected video stream is copied while audio is encoded.
Save an audio file without videoAn audio extractor or converter.Choose copying for a suitable existing track, or encoding for a different audio format.

HandBrake's description of its video conversion limits explicitly rules out video passthrough. Its developers also rejected audio-only export as outside the project's scope. Use the alternative commands below if those limits affect your job; don't encode a disposable video merely to retrieve its audio afterward.

Select and convert the wanted audio track

  1. Open the source, select the correct Title and choose the video preset and output container for the destination.
  2. Open Audio. In Windows 1.11.2, use Tracks > Add New Track when another output row is needed.
  3. Set that row's Source to the main soundtrack, language or commentary you actually want.
  4. Set Codec to an encoder such as AAC, then choose the mixdown and bitrate. Configure every wanted output row separately.
  5. Choose a new output filename, encode a short range and play each retained track on the receiving device before queuing the complete video.
HandBrake Audio tab showing an English AC3 source and AAC (avcodec) selected in Codec
Select the intended soundtrack in Source first. Choose AAC in Codec when you need a new AAC track. Open full size.

The Windows Audio view uses Source and Codec; macOS labels the source selector Track. On a Mac, choose a source in the Audio tab's final None row to add it. Linux provides Tracks > Add New Track. Labels and layout differ, but the important unit is the output row: one selected source with its own conversion settings.

Two English tracks can be the main mix and a commentary. Two rows pointing at the same source can be intentional—for example, a copied surround track plus a stereo compatibility track—but they are still separate output streams. Inspect their identities and names rather than assuming a language rule has chosen the right performance.

Match the codec, container and playback route

HandBrake supports both audio encoding and bit-for-bit passthrough. Encoding changes the format; passthru preserves the existing one. Neither the container extension nor a codec's presence in HandBrake proves that your TV, phone, editor or receiver accepts that combination.

DestinationStarting choiceImportant condition
A player that accepts MP4 with AAC stereoMP4, AAC, Stereo.Match its video limits too; AAC implementations and menu names vary by platform.
A home-theater route that accepts AC3 or E-AC3The matching encoder, or matching passthru for an already suitable source.Check the player, container, connection and receiver, including channel count.
A WebM deliveryOpus or Vorbis.WebM uses these audio formats; also choose supported video.
An editor requesting a Production MOVThe requested ProRes or DNxHR preset with PCM.HandBrake 1.11 or later; match the editor's bit depth and channel requirements.

The container compatibility guide covers MP4, MKV and WebM, but omits newer MOV output. The 1.11.0 release notes document MOV and Production presets with 24-bit multichannel PCM. A broader container doesn't automatically solve a device's decoder limits. The MKV-to-MP4 workflow also explains the video and subtitle decisions that accompany that change.

For a concrete delivery specification, YouTube's upload recommendations list MP4, AAC-LC and 48 kHz audio, with stereo among the supported layouts. Use the complete upload specification when that's your destination; a generic playback preset and an upload master serve different requirements.

Set channels and bitrate without promising restored quality

Use Stereo for a two-channel delivery, and a supported surround mixdown when the whole playback route accepts it. Available mixdowns depend on the source and its channels. Dolby Pro Logic II carries matrixed surround in two channels; it isn't a discrete six-channel 5.1 track. Converting stereo to a lossless codec can't recover information already discarded by an earlier lossy encode.

The 1.11.2 Fast 1080p30 preset starts with AAC stereo at 160 kbit/s, Auto sample rate, zero Gain and zero DRC. That's a useful playback starting point, not a quality guarantee or a surround recommendation. Listen to speech, dense music and loud passages from the actual source. Raise or lower the bitrate only after comparing the result at the intended listening level.

Leave the sample rate on Auto unless the receiver or delivery specification requires another rate. A larger sample-rate number won't restore missing detail. Leave Gain and DRC unchanged while diagnosing a codec problem: changing codec, channels and loudness together makes a failed sample harder to explain.

Audio bitrate applies to the whole encoded stream, not independently to each channel. At a fixed 160 kbit/s, one hour has a calculated audio payload of 72 MB; at 640 kbit/s, it has 288 MB. Both figures exclude container overhead. Keeping two soundtracks adds both payloads, so include them in the complete file-size budget.

Use passthru and fallback deliberately

Choose a matching Passthru option when the existing soundtrack already meets the container and playback requirements. This copies the compressed audio without another lossy generation. It doesn't change its channels, bitrate, loudness or decoder requirements; those controls can't process an unchanged stream.

Auto Passthru copies a track when the source codec is allowed and the output container accepts it. If copying fails, HandBrake re-encodes the track when a valid fallback is available. With the fallback set to None, HandBrake drops the track it can't copy. Open Selection Behavior and inspect both Allow passthru of and Fallback encoder. Mac and Linux use the label Passthru Fallback. The audio defaults guide explains that bitrate, mixdown and sample-rate settings apply to fallback encoding, rather than modifying copied audio.

HandBrake Auto Passthru with AAC and AC3 allowed and AAC fallback
This example allows AAC and AC3 to be copied. Choose a fallback encoder for a track the container can't copy. Open full size.

If a batch must always deliver AAC stereo, use an explicit AAC stereo output row. A wide Auto Passthru list could retain an accepted surround source unchanged and produce a different result than intended. If you want both surround and stereo, configure and verify two rows instead.

Save selection rules before building a queue

For repeated work, open Selection Behavior, choose the languages you want, and select the appropriate rule. All Matching Selected Languages keeps every match. The first-match rule can omit another soundtrack in the same language. Use Unknown or Any when source language metadata is missing and identify those tracks yourself.

Save the dialog's rules, then press Reload on the Audio tab and inspect the current source. Windows uses Save, Mac uses OK, and Linux applies changes as you make them. Use Save New Preset to retain the configuration. Custom presets store selection rules that will apply to later files.

Check two files with different track orders before adding a whole folder. Main-window changes do not rebuild previously queued jobs. To revise an existing job, use the Queue's Edit action and add it again after your changes. Read the audio preset guide for language, passthru and fallback settings.

HandBrake Audio with Selection Behavior, Reload and two source tracks
Open Selection Behavior to set audio rules. Use Reload to see which tracks the rules select in this title. Open full size.

Change only audio while keeping the video unchanged

Use FFmpeg's stream-copy mode when you need to preserve an already suitable video stream. With FFmpeg available, this example selects the first video and first audio stream, copies the video and encodes AAC stereo at 192 kbit/s:

ffmpeg -n -i "input.mkv" -map 0:V:0 -map 0:a:0 -c:v copy -c:a aac -b:a 192k -ac 2 "output-aac.mkv"

-n prevents overwriting an existing output. The example retains only those two selected streams; it doesn't carry other audio or subtitles. Check the source's stream identities and change the mapping when the wanted soundtrack isn't the first. The receiving system must accept the copied video and the new audio in MKV; changing the extension alone won't meet another container's requirements.

For a desktop workflow, keep Avidemux's Video Output set to Copy and choose an encoder under Audio Output. Select a container that accepts the copied video and the new audio, then save a new file. Check the track list and play the copy on the receiving device.

HandBrake's Audio tab uses soundtracks already in the source file. To replace the original soundtrack with a separately recorded track that already lines up with the picture, open the video and audio as two inputs in FFmpeg.

ffmpeg -n -i "input.mkv" -i "narration.wav" -map 0:V:0 -map 1:a:0 -c:v copy -c:a aac -b:a 192k -ac 2 "output-narrated.mkv"

The two maps select the first video stream from input.mkv and the first audio stream from narration.wav. Uppercase V excludes attached cover art and thumbnails. The saved copy keeps the video stream and uses the new recording as stereo AAC. Check sync and duration in the copy. If the recording needs to be aligned or mixed with the original, do that in a timeline editor.

For an audio-only file, this second example copies the first audio stream into M4A when that stream is AAC:

ffmpeg -n -i "input.mp4" -map 0:a:0 -vn -c:a copy "soundtrack.m4a"

This is extraction, not MP3 conversion. For a standalone MP3, use an FFmpeg build containing the libmp3lame encoder:

ffmpeg -n -i "input.mp4" -map 0:a:0 -vn -c:a libmp3lame -q:a 2 -ac 2 "soundtrack.mp3"

This encodes the first audio stream as stereo MP3. Quality 2 selects a VBR quality target, not a fixed bitrate; the result's size varies with the audio. The stereo downmix also discards a discrete surround layout. Keep the original when those channels matter.

Check the saved copy before repeating the conversion

Published troubleshooting shows why the stream distinctions matter. In a HandBrake 1.1.2 report about scratchy re-encoded audio, the answer recommends passthru, but the follow-up reports unavailable options: copying still depends on the source codec and output. In a Hi8 capture discussion, the author resolved a one-sided soundtrack with an FFmpeg-based audio conversion while copying the video. Neither report establishes a universal quality score or bitrate.

My first check is the selected soundtrack and saved channel layout, because repeating the encode can't fix choosing commentary or retaining an incompatible track. Play the beginning, middle and end on the actual destination, select every retained soundtrack and listen for dialogue, both stereo sides, distortion and sync. Compare the saved codec and channels with the job's requirements. Keep the source until the new copy passes those checks.

Filed under Audio and subtitles