API to replace audio track of video

  • Feature Description:
    It would be nice to have an API to tinker with the audio tracks

  • impact for my app: [low, mid, high, show-stopper].
    mid - would be nice to have instead of using additional ffmpeg code through a plugin :slight_smile:

  • What is your current pain point?
    Initial use case is to remove unwanted recorded audio-track after the fact (most commonly the mic track) from a video before uploading it or sharing it

  • What do you have in mind to solve it?
    Following APIs might make sense from the top of my head:

  • replaceAudioTrack(videoFile, audioFile, numOfTrack)
    => removing the audioTrack with the respective number (so that no weird audio is left) and then adding the audio file as replacement. If the file is longer than the video, audio will be shortened.
    => if audio is shorter, video stays silent after it (on that particular track)
  • removeAudioTrack(videoFile, numOfTrack) // removing the audiotrack with the respective number
  • removeAudioTracks(videoFile) // muting the video file basically
  • addToAudioTrack(videoFile, audioFile, numOfTrack, startTime, endTime)
    => adding the file into the audio track for the video at the specified time.
    => Within the specified time it would be the only sound remaining on the audio track specified, so that you could add multiple short audio-files into the video at different times.

How to remove audio tracks with ffmpeg

How to handle audio with ffmpeg

you can launch ffmpeg command with 3party plugin.
if you want we can create a sample how to use our obs FFMPEG exe to run custom commands…

1 Like

That Tutorial would be veryappreciated :slight_smile:

If we get some demand for the described APIS those would be awesome to have but not an issue to do it ourselves.
If anyone reading this is interested to collab on a library for that (or has one tp reference) please let me know.

we will create a public git project for that

1 Like