twelvelabs-io / tl-jockey

Jockey is a conversational video agent.
51 stars 13 forks source link

Add re-encode option for video in combine_clips() #30

Closed TravisCouture closed 2 months ago

TravisCouture commented 5 months ago

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:

  1. Always re-encode the video as well
  2. 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.