Open RagingRift opened 4 months ago
Try ffmpeg.input(source).output(output)
. The stream
argument is self
on the second config line.
If I try this:
source = r'C:\Users\Freelancer-xxx-05\Desktop\HRO_FD_reducedv004[00000-03999]_Difference_4.mp4' output = r'C:\Users\Freelancer-xxx-05\Desktop\mpegger_test\mac.mp4' ffmpeg.input(source).output(output) ffmpeg.run()
I get:
Traceback (most recent call last): File "C:\Users\Freelancer-xxx-05\PycharmProjects\pythonProject.venv\ffmpegtest.py", line 6, in
ffmpeg.run() TypeError: run() missing 1 required positional argument: 'stream_spec' Process finished with exit code 1
I was running into the same thing as OP...really not sure what is going on as it all seems to be good until this point.
Ok, so I found the issue and it is user error. When setting the ENV variable it must be set in the "Path" variable select this, then click edit...it will open a new window. Click add, then add the path to the ffmpeg.exe (DO NOT include executable, only add the path) Once this has been done restart command line or powershell, and try again. This worked for me.
Take the ffmpeg.exe file and put it in the python environment which has python.exe it will work
I've imported ffmpeg-python and had the error but i tried installing ffmpeg as well but the issue still persists. I have the input file in the same directory as the python file so it should be able to find it? I even pasted in the whole directory but it still didn't work.
I've looked at posts on here with the same issue but the solutions they gave were either not descriptive enough, confusing, or didn't work. I am extremely new to python, programming and computers in general so maybe i don't understand things people say on here
Here is my code currently: