How can I debug what happened? I've tried this with variations to generate a short video from a single image:
ffmpeg -loop 1 -i black.png -vcodec libx264 -b 1500k -s 640x360 -t 1 out.mp4
tried:
- Changing aspect ration (or omitting it).
- using
-image2instead of-loop. - omitting bitrate.
- creating longer videos.
- also tried different syntax for specifying video codec:
-v:c libx264. - tried mpeg instead of libx264.
In every case the effect is the same. The video plays in VLC, but not in the browser.
-pix_fmt yuv420pas an output option. See FFmpeg x264 MP4 Encoding all grey, flvEncoder .flv output won't convert to .mp4 with ffmpeg, Convert EXR file sequence with FFmpeg and x264, and How can I convert a series of PNG images to a video for YouTube?.libx264). However, "dumb" players can not handle this so you have to be explicit in telling ffmpeg what you want since it can not guess. Unfortunately this can confuse users and some developers thinkyuv420pshould be the default.