I made a script for compressing videos
import ffmpeg
import subprocess
result = subprocess.run("C:\\ffmpeg\\bin\\ffmpeg.exe"['ffmpeg -i output.mp4 -b 800k output.mp4'])
print(result)
When I run this an error will come like this-
result = subprocess.run("C:\\ffmpeg\\bin\\ffmpeg.exe"['ffmpeg -i output.mp4 -b 800k output.mp4'])
TypeError: string indices must be integers
What is the solution?
This appears to be malformed:
I'm pretty sure you just want this:
Or perhaps just this:
Also, not sure if it's a good idea to have your input file and output file,
output.mp4
be the same.