NapoleonWils0n / ffmpeg-scripts

ffmpeg shell scripts
BSD 3-Clause "New" or "Revised" License
195 stars 44 forks source link

Missing argument for option 'f'. #2

Closed alikaraali closed 1 year ago

alikaraali commented 1 year ago

Hello,

I am literally running the code you are talking in video here (https://www.youtube.com/watch?v=nOeaFEHuFyM&ab_channel=NapoleonWils0n), however getting this error:

Missing argument for option 'f'. Error splitting the argument list: Invalid argument scene-detect.sh: line 135: null: command not found

Any idea!?

Thanks

NapoleonWils0n commented 1 year ago

HI Ali, sorry your having a bit of bother getting the script to work

I think the issue you are having is that you have specified the -f option without providing an argument the -f option takes sec as an argument to change the time output to seconds

the command should look likes this

scene-detect -i infile.mkv -f sec

you can just omit the -f option and run this command

scene-detect -i infile.mkv

I have a much easier way to perform scene detection using a Makefile, so instead of running the scene-detect, scene-time and scene-cut one by one manually, you can put the Makefile in the same directory as the video and then run one command like this

make input=video.mp4

that will run scene-detect, scene-time and scene-cut and automatically cut the video into clips

heres a video showing how it works

Makefiles and ffmpeg scene detection made easy

heres the Makefile

Makefile

Have a look at using the Makefile to automate scene detection i think youll find it much easier to use

Let me know if that helps or if you have any questions