Adding "loop" atom to the video header?

Vincent Pinon vpinon at kde.org
Fri Jan 12 20:54:43 UTC 2018


Hello,
This is Kdenlive list, not FFmpeg one :-\
A quick search on internet :
https://video.stackexchange.com/questions/12905/repeat-loop-input-video-with-ffmpeg
"The -loop option is specific to the image file demuxer and gif muxer"
stream_loop seems to be a read option, not an output flag...
So it doesn't seem to fit your need :(
Good luck, let us know if you find a solution...
Vincent

Le jeudi 11 janvier 2018, 17:19:38 CET Vikram Parmar a écrit :

Hi,

Is it possible to add some custom atom in the header of a video file?

I need to add the term "loop" in the header of MP4 files before the "moov" atom.

More information can be found here :

https://stackoverflow.com/questions/44893316/whatsapp-video-as-gif-sharing-on-android-programatically

Note: Just opening the video file using any text editor shows the file header and atoms.

I do not want to edit the headers via too much calculations, as the answer suggests. Is there a simple FFMPEG command to add the atom "loop" to any MP4 files?

Use Case :-

WhatsApp does a smart thing. Their animated GIFs are actually MP4 files (which contain this atom "loop"), and the MP4 files which it wants to treat as videos in their UI, they do not add that "loop" atom

I tried loads of -loop and stream loop commands.. Nothing is adding the atom "loop" to my mp4 files

My current command for converting a GIF to MP4 is as follows :


ffmpeg -i giphy9.gif -c:v libx264 -c:a aac -pix_fmt yuv420p -movflags +faststart  giphy9_loop.mp4


I wish to add some parameter to the above command (or maybe run a separate command) so that the output mp4 file has that "loop" atom in the header. 

Please help!




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdenlive/attachments/20180112/4b683298/attachment.html>


More information about the kdenlive mailing list