[Libav-user] Reasons for "moov atom not found"

wm4 nfxjfg at googlemail.com
Sat Apr 19 13:24:40 CEST 2014


On Sat, 19 Apr 2014 11:42:26 +0200
Harald Schlangmann <harry at gps-laptimer.de> wrote:

> HI,
> 
> I’m referring to my functions reading in a video, decoding it, applying some manipulations to the frames, encoding it and writing it to a changed video. Depending on the video length or size or other factors I’m not yet clear on, the result written is sometimes reported as corrupted. Applying ffprobe, the message is
> 
> 	[mov,mp4,m4a,3gp,3g2,mj2 @ 0x10280a200] moov atom not found
> 	<some video path>.mp4: Invalid data found when processing input
> 
> My observation is the risk this corruption occurs increases with video size (FullHD at 1080 in particular) and video length. 

Maybe something stupid, like libavformat not being compiled with large
file awareness? Some libcs require you to do this to be able to seek
past 2 GB.

> From reading various threads I understand the “moov atom not found" is an indication the video’s trailer is not written completely. The sequence I use to close the finished result is:
> 
>         int     ret = av_write_trailer (assetWriter->oc);
>         
>         if (assetWriter->video_st)
>             close_video (assetWriter);
> 
>         if (assetWriter->audio_st)
>             close_audio (assetWriter);
>         
>         if (!(assetWriter->fmt->flags&AVFMT_NOFILE))
>             ret = avio_close (assetWriter->oc->pb);
> 
> Not shown in the code fragment, I have verified all calls to the av* functions in this sequence are executed and return zero = Success.
> 
> Any idea what the reason for the corruption might be and how to work around? Thanks for your ideas.
> 
> Greetings Harald
> 
> -
> Harald Schlangmann
> Antwerpener Str. 52, 50672 Köln, Germany
> +49 151 2265 4439
> Harry at gps-laptimer.de
> www.gps-laptimer.de
> 



More information about the Libav-user mailing list