Compare commits

...

2 Commits

Author SHA1 Message Date
Matt McWilliams b682eb0f9c Add an ffmpeg-python example 2021-05-09 11:45:32 -04:00
Matt McWilliams 522751e9f8 Ignore pth files 2021-05-09 11:45:15 -04:00
3 changed files with 31 additions and 1 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
videos
output
node/node_modules
node/node_modules
*.pth

26
python/example.py Normal file
View File

@ -0,0 +1,26 @@
#!/bin/python3
import sys
import ffmpeg
if len(sys.argv) < 3 :
print("Please provide input and output arguments")
exit()
INPUT = sys.argv[1]
OUTPUT = sys.argv[2]
# API documentation
# https://kkroening.github.io/ffmpeg-python/
# create a stream from your input video
# equivalent of: ffmpeg -i "${INPUT}"
stream = ffmpeg.input(INPUT)
# shift all hue values by 180 degrees
# equivalent of: -vf "hue=h=180"
stream = ffmpeg.hue(stream, h=180)
stream = ffmpeg.output(stream, OUTPUT)
ffmpeg.run(stream)

View File

@ -0,0 +1,3 @@
#!/bin/bash
python3 -m pip install ffmpeg-python