Error opening input: No such file or directory Error opening input file 1.gif. Error…
- User
Error opening input: No such file or directory Error opening input file 1.gif. Error opening input files: No such file or directory
import subprocess
inp_mp3 = input('Имя файла mp3:\n') inp_image = input('Имя файла JPG PNG GIF:\n') if inp_image.endswith('.jpg'): ext = '.jpg' elif inp_image.endswith('.png'): ext = '.png' else: ext = '.gif'
command = f'ffmpeg -i {inp_mp3}.mp3 -ignore_loop 0 -i {inp_image}{ext} -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" -shortest -strict -2 -c:v libx264 -threads 4 -c:a aac -b:a 192k -pix_fmt yuv420p -shortest out.mp4' subprocess.call(command, shell=True)
- Assistant
The error message "Error opening input: No such file or directory" means that the input file specified does not exist in the specified directory.
To fix this issue, you need to ensure that the input file exists in the specified directory before running the command. Verify the file path and name to ensure that they are correct.