Created
January 22, 2020 06:31
-
-
Save nyanpasu64/da9625ba34f0aa934553930178528ae6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ffmpeg | |
input = ffmpeg.input('fm spectrum.mp4') | |
def f(): | |
a = input.audio | |
v = input.video | |
height = 250 | |
v = v.crop(x=0, width="in_w", height=height, y=f"in_h-{height}") | |
vs = v.split() | |
v = vs.stream(0) | |
v1 = vs.stream(1) | |
v = v.filter("pad", h="2*in_h").overlay(v1.vflip(), y="overlay_h") | |
return (a, v) | |
out = ffmpeg.output(*f(), 'fm spectrum out.mp4', acodec="copy") | |
print(out.get_args()) | |
out.run(overwrite_output=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment