Right now in combine_clips() we only re-encode the audio when rendering the final output video. This was originally done to save time however, there are some edge cases where video codecs are incompatible and it is safer to re-encode the video as well.
There are two options:
Always re-encode the video as well
Use ffprobe to validate the original video codecs of all the input streams and then dynamically decide wether to re-encode or not.
Option 1 is more naive but should always produce a valid output. Option 2 is harder to implement but overall more efficient.
Right now in combine_clips() we only re-encode the audio when rendering the final output video. This was originally done to save time however, there are some edge cases where video codecs are incompatible and it is safer to re-encode the video as well.
There are two options:
Option 1 is more naive but should always produce a valid output. Option 2 is harder to implement but overall more efficient.