Donate. I desperately need donations to survive due to my health

Get paid by answering surveys Click here

Click here to donate

Remote/Work from Home jobs

Using ffmpeg to split videos into frames doesn't work

In my code i'm trying to split video to frames using ffmpeg.

for this I'm using this code

experiments = ['iguazu.mp4', 'boat.mp4']

for experiment in experiments:
    exp_no_ext = experiment.split('.')[0]
    os.system('mkdir dump')
    os.system('mkdir dump\%s' % exp_no_ext)
    os.system("ffmpeg -i videos\%s dump\%s\%s%%03d.jpg" % (experiment, 
exp_no_ext, exp_no_ext))

So in visual studio code it's working perfect but in visual studio community the line "os.system("ffmpeg -i videos\%s dump\%s\%s%%03d.jpg" % (experiment, exp_no_ext, exp_no_ext))" showing error "ffmpeg is not recognized as an internal or external command".

Comments