<div dir="ltr"><div>        Hi,<br><br>Is it possible to add some custom atom in the header of a video file?<br><br>I need to add the term "loop" in the header of MP4 files before the "moov" atom.<br><br>More information can be found here :<br><br><a href="https://stackoverflow.com/questions/44893316/whatsapp-video-as-gif-sharing-on-android-programatically" target="_blank">https://stackoverflow.com/<wbr>questions/44893316/whatsapp-<wbr>video-as-gif-sharing-on-<wbr>android-programatically</a><br><br>Note: Just opening the video file using any text editor shows the file header and atoms.<br><br>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?<br><br>Use Case :-<br><br>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<br><br>I tried loads of -loop and stream loop commands.. Nothing is adding the atom "loop" to my mp4 files<br><br>My current command for converting a GIF to MP4 is as follows :<br><br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">ffmpeg -i giphy9.gif -c:v libx264 -c:a aac -pix_fmt yuv420p -movflags +faststart  giphy9_loop.mp4<br></blockquote><br>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. <br><br></div>Please help!<div class="gmail-adL"><br></div></div>