[FFmpeg-user] create video from image
Lou Logan
lou at lrcd.com
Thu Feb 14 00:18:42 EET 2019
On Wed, Feb 13, 2019, at 12:23 PM, juan carlos wrote:
> I already indicated in another email that since the release of ffmpeg
> 4.0 the project does not take seriously the work of updating the
> documentation
I disagree with that statement. We are only volunteers and use our spare time to try to keep the large set of documentation accurate for a project with high development activity on an often complex subject matter. Nobody gets paid to do this and anyone is welcome and encouraged to send patches to help.
> no command posted in the different pages referring to the
> project works correctly,
Which commands, exactly? Where in the documentation? It would be much easier to fix if you tell us exactly what doesn't work and where you found it.
> in the previous one I tried to use a format
> that according to you It was not supported anymore, but it is not
> mentioned anywhere so I can not know if that is true
The removal of ffserver stuff was incomplete. I will work on that.
> this time I have errors trying to create a video from an image
>
> ffmpeg -f image2 -i image.jpg -vcodec libx264 -b:v 200k -t 30 out.mp4
> Error initializing output stream 0:0 -- Error while opening encoder for
> output stream #0:0 - maybe incorrect parameters such as bit_rate, rate,
> width or heigh
I don't see your command, or a similar one, in the documentation. Where did you find it? Since you're commenting on the state of the documentation I assume you are indicating that your broken command is from the documentation.
As for your command, I'll assume the main problem is that you are not telling ffmpeg to loop the image. Also, your player may not like the resulting pixel format, so make it yuv420p. If you are presenting the output via progressive download add "-movflags +faststart" so your viewers don't have to wait as long for it to begin playback.
ffmpeg -loop 1 -i image.jpg -c:v libx264 -vf format=yuv420p -movflags +faststart -t 30 out.mp4
This is my attempt for an all-inclusive command for you since you did not provide any details or requirements. You may experience other errors or issues (such as "width/height not divisible by 2"), but since you did not include the complete console output I can't give you a turnkey, personally customized, cut-and-paste command for rote usage.
More information about the ffmpeg-user
mailing list