Obviously, don't do this unless you have a pressing reason. Matroska (.mkv
) is
the better and free-er format and this only works if the video was in an .mp4
supporting format from the start (i.e. H.264 / H.265 with AC3 / AAC).
Requires mkvtoolnix (for mkvextract
) and gpac (for MP4Box
)
mkvextract tracks MyH264Video.mkv 0:video.h264 1:audio.ac3
MP4Box -add video.h264#video -add audio.ac3 -new MyMP4Video.mp4