[Libav-user] extract the offset between the start of audio and first frame of video

Arshdeep Kaur arshdeep.kaur at drishinfo.com
Wed Dec 4 11:30:15 CET 2013


I am using ffmpeg library in vs 2010, I need to extract the offset 
between the start of audio and first frame of video. I am trying using:-

|     avcodec_decode_video2(pCodecCtx,pFrame,&got_picture,&pkt);
av_read_frame(pFormatCtx,&pkt);  
av_free_packet(&pkt);
int  frrr=pkt.dts*timebase;

//int *gptr=NULL;
avcodec_decode_audio4(pCodecCtx,pFrame,&got_frame,&pkt);
//avcodec_decode_video2(pCodecCtx,pFrame,&got_picture,&pkt);
av_read_frame(pFormatCtx,&pkt);|

AND then finding the difference between video and audio pts. But i am 
not getting correct value.

Can anybody tell the correct way.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20131204/c8621880/attachment.html>


More information about the Libav-user mailing list