Hi Grzegorz<br>Thanks for introducing the useful links, it takes a little time to see weather it useful for my purpose (extracting frames) or not.<br>regarding using sws_scale, i just wanted to know does it convert the MPEG-4 format to raw formats: YUV or RGB? it seems this tools work for converting YUV to RGB<br>
Regards<br>Amir<br><br><div class="gmail_quote">On Thu, Apr 7, 2011 at 11:00 AM, Grzegorz Szpetkowski <span dir="ltr"><<a href="mailto:gszpetkowski@gmail.com">gszpetkowski@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I am not FFmpeg API expert, but you can find working example<br>
(avcodec_sample.0.5.0.c) at<br>
<a href="http://web.me.com/dhoerl/Home/Tech_Blog/Entries/2009/1/22_Revised_avcodec_sample.c.html" target="_blank">http://web.me.com/dhoerl/Home/Tech_Blog/Entries/2009/1/22_Revised_avcodec_sample.c.html</a><br>
<br>
There are also two guides that I know:<br>
<a href="http://www.inb.uni-luebeck.de/%7Eboehme/using_libavcodec.html" target="_blank">http://www.inb.uni-luebeck.de/~boehme/using_libavcodec.html</a> (very outdated)<br>
<a href="http://dranger.com/ffmpeg/tutorial01.html" target="_blank">http://dranger.com/ffmpeg/tutorial01.html</a> (little outdated)<br>
<br>
To convert AVFrame from YUV to RGB you need to use sws_scale.<br>
<br>
Regards<br>
Grzegorz Sz.<br>
<br>
2011/4/7 Amir Rouhi-Rmit <<a href="mailto:amir.rouhi@rmit.edu.au">amir.rouhi@rmit.edu.au</a>>:<br>
<div><div></div><div class="h5">> Hi<br>
><br>
> I would be pleased if somebody guide me how can I extract frames in I-Frame<br>
> format from a MPEG-4 AVC (H.264) video stream. The I-Frame can be:<br>
><br>
> A- Any selected frame which can be extracted in form of a 1 frame video<br>
> file. In this case the only frame of video should be in I-Frame.<br>
><br>
> B- Extracting real I-Frames that exist in a video stream in form of  1 frame<br>
> video files.<br>
><br>
><br>
><br>
> I found a method myself for type A, which is based on converting video to<br>
> RAW format by YUVTOOLS software(If somebody help me that how can I convert<br>
> the video to YUV or RGB by ffmpeg or any free software I would be pleased) ,<br>
> and then I select any frame by its number and extract it as a 1 frame video<br>
> which is in I-Frame format by JM software. As you have noticed , this method<br>
> is very costy and take a long time. I hope by help of you I find a method in<br>
> ffmpeg filters to do that.<br>
><br>
> Regards<br>
><br>
> Amir<br>
><br>
</div></div>> _______________________________________________<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>
><br>
><br>
_______________________________________________<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>
</blockquote></div><br>