Unfortunately -debug does not serve my purpose . i need intra-predictions and i should add some lins in ffmpeg coding like fprint () function to save them in a text file.<br><br><div class="gmail_quote">On 26 June 2012 20:51, Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il" target="_blank">alexcohn@netvision.net.il</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Jun 26, 2012 at 12:21 PM, Rouhi Amirhossein2<br>
<div><div class="h5"><<a href="mailto:amir.rouhi@rmit.edu.au">amir.rouhi@rmit.edu.au</a>> wrote:<br>
> Hi Misha<br>
> Thanks for prompt reply. That would be a very useful code for extracting key<br>
> frame images. but actually need to extract the intra-prediction modes in<br>
> each key frame of an input video stream. Can you help me to achieve this?<br>
> the input of the program would be an h264 raw video file and the output<br>
> would be a text file that stores intra-prediction modes with related MB<br>
> address and i-frame id.<br>
><br>
><br>
> On 26 June 2012 19:12, Misha Penkov <<a href="mailto:misha.penkov@gmail.com">misha.penkov@gmail.com</a>> wrote:<br>
>><br>
>> On 26 June 2012 18:05, Rouhi Amirhossein2 <<a href="mailto:amir.rouhi@rmit.edu.au">amir.rouhi@rmit.edu.au</a>> wrote:<br>
>> ><br>
>> > Hi<br>
>> > You know that in h264, a methos is used for compression which is called<br>
>> > intra prediction method. totally we have 9 intra prediction modes which<br>
>> > showing different direction of top and left side pixels of 4x4 blocks. I<br>
>> > want to extract such modes in any frame that uses intra prediction such<br>
>> > as<br>
>> > I-Frames and IDR,s. Do you know how can i achive this purpose?<br>
>> > In JM software i did the same in decoder, do you think it should be done<br>
>> > in<br>
>> > FFplay as a decoder or it can be done by FFmpeg?<br>
>><br>
>> AFAIK, H.264 I-frames and keyframes are the same thing.  Once you have<br>
>> an AVFrame, you can check its key_frame member.  It will be non-zero<br>
>> if it's a keyframe (I-frame).<br>
>><br>
>> For full code, have a look here:<br>
>><br>
>> <a href="https://github.com/mpenkov/sandpit/blob/master/ffmpeg/keyframes.c" target="_blank">https://github.com/mpenkov/sandpit/blob/master/ffmpeg/keyframes.c</a><br>
>><br>
>> Provided that you're using MP4 as the container, you can confirm that<br>
>> the keyframes extracted are indeed I-frames by using the mp4videoinfo<br>
>> utility (<a href="http://mpeg4ip.sourceforge.net/documentation/index.php" target="_blank">http://mpeg4ip.sourceforge.net/documentation/index.php</a>).<br>
>><br>
>> > Thanks for your expert advice.<br>
>> > Amir<br>
>> ><br>
</div></div><div class="im">> --<br>
> Amir H. Rouhi<br>
> PhD Student/ CSIT RMIT University<br>
> Room: 14-09-04<br>
> <a href="http://raws.adc.rmit.edu.au/~s3288736/blog2/" target="_blank">http://raws.adc.rmit.edu.au/~s3288736/blog2/</a><br>
<br>
</div>Check ffmpeg -debug options, especially pict and mv:<br>
<br>
-debug             <flags> EDVAS print specific debug info<br>
   pict                    .DV.. picture info<br>
   mb_type                 .DV.. macroblock (MB) type<br>
   mv                      .DV.. motion vector<br>
<br>
Regards,<br>
Alex Cohn<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Amir H. Rouhi</div>
<div>PhD Student/ CSIT RMIT University</div>
Room: 14-09-04<br><a href="http://raws.adc.rmit.edu.au/%7Es3288736/blog2/" target="_blank">http://raws.adc.rmit.edu.au/~s3288736/blog2/</a><br>