Skip to content

Instantly share code, notes, and snippets.

@Thomashighbaugh
Created November 22, 2023 04:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Thomashighbaugh/112c27de98dbde9529f7a2d44e15facb to your computer and use it in GitHub Desktop.
Save Thomashighbaugh/112c27de98dbde9529f7a2d44e15facb to your computer and use it in GitHub Desktop.
#! /usr/bin/env python
import sys, os
inputOne = sys.argv[1]
inputTwo = sys.argv[2]
for i in sys.argv[1:]:
if ".mp3" in i:
output = i.replace("mp3", "mp4")
cmd = (
'ffmpeg -loop_input -i "'
+ inputOne
+ '" -i "'
+ inputTwo
+ '" -shortest -acodec copy "'
+ output
+ '"'
)
os.system(cmd)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment