2008/8/25, Nicolas Krieger <[EMAIL PROTECTED]>:
>
> Hi,
> My previous question was no clear at all.
> During a video capture, there is sometimes a crash and the file obtained is
> readable, but there is no informations about the length of the video. So, I
> want to "repair" the file. What I want to do is to calculate the number of
> frames (I manage to do this) and to put this value in the file. I must also
> keep the original file as it is.
> Once I have all the informations (AVFormatContext, AVCodecContext, ...), I
> read the original file :
>
> while(av_read_frame(pFormatContext, &packet) >= 0) {
>
> av_write_frame(pFormatContextCopie, &packet);
>
> }
>
> but it is not correct (as there is a segmentation fault : 0x0805090a in
> compute_pkt_fields2 ()).
>
> What I want to do is just to put the right value
> in pFormatContext->streams[videoStream]->duration
>
> Nicolas Krieger
>
>


Do you think the method I use is the good way to do what I want
(av_read_frame then av_write_frame) ? If yes, then, there is a bug in my
programm, but I will keep on this way. But this is maybe a wrong method.
I've tried using ffmpeg executable. It does what I want, but a video stream
is destroyed (there is two video streams and one audio stream in the
original file).
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to