Python ~ffmpeg 5_second_video.mp3: No such file or directory Conversion failed

458 Views Asked by At

Here is my python code :

    call(['ffmpeg', '-loop', '1',  '-y', '-i', '5_second_video.jpg', '-i','5_second_video.mp3' , '-acodec', 'copy', '-vcodec', 'libx264', '-shortest', song +'.mp4'], shell=False)

There is a file called 5_second_video.mp3 in my desktop but it is returning me this error

5_second_video.mp3: No such file or directory Conversion failed!

1

There are 1 best solutions below

0
On

The problem was solved by changing '-o '+song2file(song)+'.%(ext)s' to '-o'+song2file(song)+'.%(ext)s'. The space was the problem.