Loop MP4 From Converted Animated Gif

conversiongifvideo

How do I convert animated gifs to mp4s that loop?

This command successfully converts the gifs to mp4s, but the loop doesn't appear to work:

for i in *.gif; do ffmpeg -f gif -i "$i" -loop 0 "0output$i.mp4"; done

When I play the resulting mp4s in SMPlayer it will only loop if I set SMPlayer to repeat, but then SMplayer has a jitter between repeats so it doesn't repeat smoothly.

Best Answer

You can make a looping GIF by setting a bit in the header of the file (been doing that since 1989), but there is no such facility that I know of in the .mp4 files. For them looping is controlled via an additional, player dependent, file.

The absence of that also is the reason why you don't have any looping .mp4 on YouTube.

Related Question