Import external audio file

HandBrake for Mac support
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
Hervideo
Posts: 13
Joined: Wed Jun 27, 2007 4:59 pm

Import external audio file

Post by Hervideo »

Description of problem or question:

I would like to replace the audio track in a mp4 video (captured with a smartphone) with an external audio file (recording of my voice, m4a file).
Can this be done in HandBrake? My search in the forum and in the documentation remained unsuccessful.

HandBrake version (e.g., 1.0.0):

1.3.3

Operating system and version (e.g., Ubuntu 16.04 LTS, macOS 10.13 High Sierra, Windows 10 Creators Update):

MacOS 10.14 Mojave

Thanks in advance
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Import external audio file

Post by Woodstock »

No, handbrake cannot import any external file, other than certain types of subtitles.

While this would be relatively simple with a video editor, you can use tools like mkvmerge, ffmpeg, subler, etc., to mux the file into an MKV or MP4, and use that as the source for handbrake.
Hervideo
Posts: 13
Joined: Wed Jun 27, 2007 4:59 pm

Re: Import external audio file

Post by Hervideo »

Thanks Woodstock, but what do you mean by "to mux". English is not my mother tongue, and I don't find this word in my dictionary.
Do you mean I should convert the M4A into a MKV or MP4, but then how to import it into my existing MP4 video?
Woodstock
Veteran User
Posts: 4614
Joined: Tue Aug 27, 2013 6:39 am

Re: Import external audio file

Post by Woodstock »

Mux is a shortened term for multiplexing different files into a single container. MP4 and MKV are "containers" with multiple files (tracks) included, usually intertwined within the larger file so the various tracks are read at nearly the same time.

The programs I mentioned can add tracks into the container types they support. Subler, for example, outputs to MP4 containers, mkvmerge will write to MKV containers, and ffmpeg can write to a variety of them.
Post Reply