Kagami / ffmpeg.js

Port of FFmpeg with Emscripten
Other
3.24k stars 329 forks source link

Generated mp4 files getting failed on Vimeo #173

Open kashifsulaiman opened 2 years ago

kashifsulaiman commented 2 years ago

I'm trying to merge Audio + Image, resulting Video. I've been successful doing that. That video is successfully Uploading on Firebase Storage, but not on Vimeo. Upon directly uploading on Vimeo, it stops at Optimizing with the error. image

What I've tried so far:

    1. arguments: ['-i', imageName, '-i', audioName, 'output.mp4'],
    2. arguments: ['-i', imageName, '-i', audioName, '-vcodec', 'libx264', '-acodec', 'aac', '-strict', 'experimental', '-preset', 'slow', '-s', 'hd720', '-b', '5000k', '-ab', '320k', '-threads', '0', '-r', '25', '-g', '25', 'output.mp4'],
    3. arguments: ['-i', imageName, '-i', audioName, '-c:v', 'libx264', '-preset', 'slow', '-crf', '20', '-vf', 'format=yuv420p', '-c:a', 'aac', '-ac', '2', '-movflags', '+faststart', 'output.mp4'],
    4. arguments: ['-i', imageName, '-i', audioName, '-vcodec', 'libx264', '-acodec', 'aac', '-strict', 'experimental', '-s', '1280:720', '-b', '4500k', '-ab', '320k', '-r', '25', '-g', '25', '-pix_fmt', 'yuv420p', 'output.mp4'],
    5. arguments: ['-i', imageName, '-i', audioName, '-vcodec', 'libx264', '-acodec', 'aac', '-strict', 'experimental', '-s', '640:480', '-b:v', '2000k', '-ab', '320k', '-r', '25', '-g', '25', '-pix_fmt', 'yuv420p', 'output.mp4'],
    6. arguments: ['-i', imageName, '-i', audioName, '-vcodec', 'libx264', '-b:v', '10000k', '-r', '25', '-flags', 'cgop', '-coder', 'ac', '-g', '25', '-strict', 'experimental', '-acodec', 'aac', '-s', 'hd720', '-b:a', '320k', 'output.mp4']

Second one from the above is from johnjohndoe/vimeo.com.ffpreset What could be the issue?

martin16877 commented 11 months ago

@ kashifsulaiman did you find out the correct settings? I have the same use case (converting mp3 audio file to video with still image) and the same issue ("can't optimize video") and I can't figure out the correct ffmpeg settings.