

output-video.webmĪs mentioned, this option will work only if the video that you are processing doesn't have any audio track, if it does, you will need to replace the audio stream with some extra options that you'll find in the next section. In our case, with a video in WebM format, we'll add an opus audio file like this: ffmpeg -i.



If the video doesn't have any audio track In this article, I will explain to you how to join a video track and shorter audio. In this case, as you can see our video of 3 minutes doesn't have an audio track attached, but the one we are trying to add of 2 minutes and 54 seconds, so the audio is way shorter than the video! When joining these 2 with some formats like OPUS for audio and WebM for video, you won't be able to join them if they have different lengths. The problem with this situation is that the first video contains the stream of a student, whose video and audio tracks have different lengths (basically because when the stream was recorded in the server, the audio track, and video are separate files, and when the student hangs up, the audio transmission stops, however, there are some frames of the video that are recorded): But there's a problem you may encounter but that probably you won't find an immediate solution, consider the following example of mixing 2 videos in a single one. Mixing videos and audio files with FFMPEG is kind of easy as long as you have the instruction to do it (or you are patient enough to read the official documentation of FFMPEG).
