How can I add a new audio track to an x265 MP4 video without re-encoding it?

0

I would've tried MKVMerge or MakeMKV but they won't work on MP4 files. Does anyone have a way to just add the track? Cause adding it via Handbrake or something would take too much time.

Thanks.

user683334

Posted 2017-01-08T16:10:55.933

Reputation: 1

Question was closed 2017-01-10T01:33:29.610

Answers

2

You can use ffmpeg, a free command-line tool.

Syntax would be

ffmpeg -i video.mp4 -i audio.mp3 -c copy -map 0 -map -0:d -map 1 new.mp4

Gyan

Posted 2017-01-08T16:10:55.933

Reputation: 21 016

"[mp4 @ 00000000024c2040] Could not find tag for codec bin_data in stream #2, codec not currently supported in container Could not write header for output file #0 (incorrect codec parameters ?): Invalid argument"

Are you sure this works on x265 files? Or am I doing something wrong here? – user683334 – 2017-01-10T05:07:53.317

Share the full console output. – Gyan – 2017-01-10T06:03:06.457

http://pastebin.com/1Q4WG4YK – user683334 – 2017-01-10T06:20:32.200

Are there subtitles in the original file? – Gyan – 2017-01-10T06:22:39.707

Yes it's a useless subtitle file muxed in there. I don't need it – user683334 – 2017-01-10T06:24:03.770

See edited cmd. – Gyan – 2017-01-10T06:25:59.673

It worked, thank you. That didn't take any time and the new file works perfectly. – user683334 – 2017-01-10T06:29:51.450