Stas Oskin wrote:
> Hi.
> 
> I'm trying to reopen existing video files, which were interrupted
> during writing (and the trailer was not written yet), in order to
> salvage as many frames as possible.

I suspect this mp4 file is broken: AFAIK, av_write_trailer() is
needed to write some atoms that make the file readable. If you do
not write them, opening the file will always fail.


> It works with MPEG2 and WMV for example, but MPEG4 files can't be even
> opened - url_open returns an error.

mpg and wmv files do not probably need headers that are written at
av_write_trailer() time. If I understand well, this is due to how the
file format is structured.


> Does anyone know how it can be solved, or can advice an alternative way?

I believe the simplest solution is calling av_write_trailer() when
closing the file... Or using a different file format.
But maybe there are some utilities around that can repair these broken
mp4 files, I do not know.



                                Luca
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to