How to render without re encoding

I have a video, I just want to change the soundtrack, and render a new video file. Thing is I don't want to lose any quality, I'd like to only render the video "as is" and only re encode the sound.

Is there a way to do that and if so, what settings should I use?

 

Comments

  • Triem23Triem23 Moderator Moderator, Website User, Ambassador, Imerge Beta Tester, HitFilm Beta Tester Posts: 18,303 Ambassador

    To my knowledge Hitfilm doesn't have a "Smart Encode" feature where it writes the original video to disk with a new audio track (Vegas Pro does, if you happen to have it). 

     

  • NormanPCNNormanPCN Website User Posts: 3,950 Enthusiast

    Also, even in apps that do support smart encoding of unaltered video, only a select few input codecs actually support that feature.

    You are better off remuxing the video with your new audio track using a tool like ffmpeg. I've never done such a thing with ffmpeg. Maybe @Aladdin4d has. I could figure out the command and will do so if somebody does not beat me to it.

  • Aladdin4dAladdin4d Moderator Website User, Imerge Beta Tester, HitFilm Beta Tester Posts: 2,509 Enthusiast
    edited February 2017

    If your current render is an MP4 and the new audio is the exact same length as the original then Avidemux is probably the easiest way to go. Import your clip, go to the Audio menu and Select Track to import the new soundtrack and assign it as the audio track to render, make sure Video output is set to copy and Audio output is set to the type and quality of audio you want. Lastly set the output format to MP4v2 and save your new file.

    @NormanPCN With FFMpeg you just specify the new audio as a second input file and manually map the streams before muxing the new output. The first assumes the new audio is already AAC encoded. The second assumes the new audio is a WAV and you want to encode it to AAC 

    ffmpeg -i input.mp4 -i input.aac -map 0:0 -map 1:0 -c:v copy -c:a copy output.mp4

    ffmpeg -i input.mp4 -i input.wav -map 0:0 -map 1:0 -c:v copy -c:a aac -b:a 128k output.mp4
Sign In or Register to comment.