[FFmpeg-user] Adding "loop" atom to the video header via FFMPEG
Moritz Barsnick
barsnick at gmx.net
Thu Jan 11 22:30:32 EET 2018
On Thu, Jan 11, 2018 at 15:33:43 +0530, Vikram Parmar wrote:
> Is it possible to add some custom atom in the header of a video file?
No, ffmpeg can't add custom or arbitrary atoms.
> 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
That doesn't seem to be a standard atom. I do see mention of a "LOOP"
atom here though:
https://developer.apple.com/library/content/documentation/QuickTime/QTFF/QTFFChap2/qtff2.html
> Note: Just opening the video file using any text editor shows the file
> header and atoms.
AtomicParsley is a nice tool for showing atoms and their hierarchies.
> 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?
If those instructions work, they're probably scriptable, and you're
best off with that.
AtomicParsley, while being able to edit atoms, unfortunately doesn't
seem to be able to add arbitrary atoms.
If the atom was some kind of standard, you could modify ffmpeg to add
it (e.g. with an output option similar to the gif muxer's "-loop").
> 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.
Someone who knows their way around this fishy atom business ("fishy"
just because I'm too stupid to wrap my head around it) could probably
implement this in ffmpeg in a breeze. Since, from what I found, it's
not even "standard", I doubt it would be accepted for ffmpeg.
Moritz
More information about the ffmpeg-user
mailing list