You should look asfdec.c to understand when and how header is written.
You can solve your problem in such way: change asfdec.c code to write header
info before trailer(and also you will understand why write_trailer is need in
asf and what is going wrong when you do it manually with
av_write_trailer(oc[iFileIdx]);) and re-build ffmpeg.
I had this problem too. I was need to fill full header before
write_trailer. But i've solved it by writing own video-container, which
supports live-streaming. But i haven't realized 'seek' function. I know how to
do it, but have no time to implement it. If you're interested in it, feel free
to contact me, i can provide source of my video-container.
16 лист. 2010, в 19:36, Marko Shink написал(а):
> Hi,
>
> I am developing a PC video recorder appplication for recording live video
> from IP cameras,
>
> using live555 for RTSP and libavformat for recording received h264 frames
> to asf container.
>
> All files are 5 minutes long, so every 5 minutes new file is created and
> previous one is finished.
>
>
>
> User can preview all files imediatelly.
>
> All works file, except the last file that is currently still being recorded
> doesn't have header information updated yet,
>
> so user can not jump forward/backward in that last file.
>
>
>
> Is there any function in libavformat to update that file header information
> without closing the file,
>
> so jumping in that file would be possible, while the same file is still
> being recorded.
>
>
>
> I had tried :
>
> av_write_trailer(oc[iFileIdx]);
>
> and
>
> url_fclose(oc[iFileIdx]->pb);
>
>
>
> but file has been closed after those function calls, so i can use them only
> at the and of file.
>
> I would like to update header information every 15 seconds, and file is 5
> minutes long.
>
>
>
>
>
> Marko.
>
> _______________________________________________
> libav-user mailing list
> [email protected]
> https://lists.mplayerhq.hu/mailman/listinfo/libav-user
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user