Ok, i found solution for other users.

I'm using frame number based on av_read_frame and it's work.
FFmpeg can read a frame and not decode it.

Le 03/14/2009 10:25 AM, [email protected] a écrit :
Hello,
i'm using ffmpeg to decode a video frame and compute a digital signature
(1 frame ->  8 bytes)

When i compare video duration and number of signatures (i.e frames), i
miss some frames (100 frames for 24 hours) so i've a delay with my
results.

I think it's due to some errors in my stream :
[mpeg2video @ 0xb7d8f9d0]concealing 1530 DC, 1530 AC, 1530 MV errors
[mpeg2video @ 0xb7d8f9d0]ac-tex damaged at 37 26=256424.1 bitrate=


How can i detect these frames to keep the right number of frame ?

Thanks for any help.

Sebastien

PS : here is my code :

while (av_read_frame (pFormatCtx,&packet)>= 0) {
   if (packet.stream_index == videoStream) {

     avcodec_decode_video(pCodecCtx, pFrame,&frameFinished,packet.data,
packet.size);

      if (frameFinished) {
         sws_scale(img_convert_ctx, pFrame->data, pFrame->linesize, 0,
pCodecCtx->height, pFrameYUV->data, pFrameYUV->linesize);

         signature = sig->compute(pFrameYUV->data[0]);

         fseek (outputfile, (pCodecCtx->frame_number-1)*8 , SEEK_SET );

         fwrite(&signature,8,1,outputfile);
       }
     }
   }


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


--
Sébastien Campion
Research Engineer
SED    - Service of Experimental plateforms and Development
TEXMEX - Research Team

INRIA Rennes - Campus de Beaulieu
35042 Rennes Cedex - France
http://www.irisa.fr/
phone  : +33 2 99 84 75 53 - Fax. +33 2 99 84 71 71
mailto : [email protected]

begin:vcard
fn;quoted-printable:S=C3=A9bastien Campion
n;quoted-printable:Campion;S=C3=A9bastien
org:INRIA;SED - Service of Experimental plateforms and Development
adr:;;INRIA Rennes - Campus de Beaulieu;Rennes;;35042;France
email;internet:[email protected]
title:Research Engineer
tel;work:+33 2 99 84 75 53
tel;home:+33 2 99 84 71 71
url:http://www.irisa.fr/
version:2.1
end:vcard

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

Reply via email to