[FFmpeg-devel] Append to fmp4
Daniel Oberhoff
danieloberhoff at googlemail.com
Sat Dec 21 23:50:13 EET 2019
> Am 19.12.2019 um 22:46 schrieb Jun Li <junli1026 at gmail.com>:
>
> On Thu, Dec 19, 2019 at 4:00 AM Daniel Oberhoff <
> danieloberhoff at googlemail.com> wrote:
>
>> Hello.
>>
>> I have been diving deep into the mp4 spec to understand fragmented mp4.
>> From what I understand using moof atoms it is possible, given stream
>> compatibility, to straight append to an mp4 file by appending moof+mdat
>> pairs. Can ffmpeg or libavformat be somehow used to achieve that?
>
>
> I use the command line like " ffmpeg -i test.mp4 -codec copy -f mp4
> -movflags empty_moov+frag_keyframe+skip_trailer out.mp4".
> It generates fmp4 with atiom : ftyp+moov+[moof+mdata]*
Ok, yeah, and to really spend that to an existing file I’d have to filter out the ftyp/moov via a custom output callback. That was my idea too. Just hoped I could avoid the complex stream filtering , but I guess it’s the only way short of hacking libavformat.
Best
Daniel
More information about the ffmpeg-devel
mailing list