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!
The problem was solved by changing
'-o '+song2file(song)+'.%(ext)s'
to'-o'+song2file(song)+'.%(ext)s'
. The space was the problem.