



I recently switched from 4.1 from 4.4 version. Notice that you should copy codecs in the final step instead of re-encoding.In ffmpeg 4.4, A green horizontal bar appears at the bottom of the output when scaling the video using scale_qsv. Or you could re-encode them into separate video and audio, then combineįfmpeg -i M.h264 -i M.aac -map 0:v -map 1:a -c copy M.mp4 If the formats in the avi container are supported by mp4, you could just pull the video and audio into an mp4 without re-encoding (this would avoid losing quality) To find out what format the avi is using, just run ffmpeg without any flags or outputĪnd it will show you the details of all of the channels in the avi container. To convert in multiple steps, you will need to create separate video and audio files, then combine them into a container. You should still add in your additional flags for quality, etc.) (The commands I'm giving are in their most basic form. To convert to h264+aac all in one step, do something like this:įfmpeg -i M.avi -c:v h264_qsv -c:a aac out.mp4

You should also note that you are performing full re-encoding of the video on your second step, which is a waste of time and is a lossy operation (you will lose video quality). But at least it would give you a starting point :)Īs others have stated, there is no reason to do this in multiple steps, and h264 format cannot hold audio, so that extra step is where you are losing the audio. This is not an ideal solution, as it creates an additional step (as noted in the comments). Ffmpeg ffmpeg version 3.1.1 Copyright (c) 2000-2016 the FFmpeg developersīuilt with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-4)Ĭonfiguration: -enable-libmfx -enable-nonfree
