Add an ffmpeg-python example
This commit is contained in:
parent
522751e9f8
commit
b682eb0f9c
|
@ -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)
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/bash
|
||||
|
||||
python3 -m pip install ffmpeg-python
|
Loading…
Reference in New Issue