[Libav-user] libavfilter help - for filtering I frames from Transport stream

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Libav-user] libavfilter help - for filtering I frames from Transport stream

Dhanish Vijayan
Hi All,

I have successfully used ffmpeg command line tool to extract all Iframes(Key frames) from a transport stream and saved to file using the following command

ffmpeg -i ESPN-DISH.ts -f image2 -vf "select=eq(pict_type\,PICT_TYPE_I)"  -vsync vfr yi%03d.png

For my particular use case, I have to read the frames programatically to extract the I frames and stream the I frames in a UI container. So far I can compile and the following program from this link to extract the YUV filtered images. 

I found this example easy to modify for my use case. 

But I am having confusion on how to use the select=eq(pict_type\,PICT_TYPE_I) filter in the code. Particularly I can see the following functions to define the filter. 

AVFilter *buffersrc  = avfilter_get_by_name("buffer");
AVFilter *buffersink = avfilter_get_by_name("ffbuffersink");

But couldnt figure out how to tweak the code for extraction of I frames.

Please anyone help me to use the functions suitably for filtering the I frames from the video input. 

Thanks in advance.

--

Thank you,
warm regards,

Logo

Dhanish Vijayan

Chief Technical Officer

Elementz Engineers Guild Pvt Ltd

Email: [hidden email]

Website: www.elementzonline.in, www.elementzonline.com

Mob: +91-8129025513

Off: +91-471-2300804


Elementz Engineers Guild Pvt Ltd
TC 25/1655/5, Rema Plaza,
SS Kovil Road, Thampanoor,
Thiruvananthapuram
Kerala - 695001

Phone: 0471-6006699, 3106699, 2329699

Elementz Engineers Guild Pvt Ltd
TC 12/78(11), Capital Heights,
PMG Plamoodu road,
Pattom P. O.,Thiruvananthapuram,
Kerala - 695004

Phone: 0471-2300804

Elementz Engineers Guild Pvt Ltd
SBC 3, Thejaswini,
Technopark Campus,
Thiruvananthapuram - 695581
Kerala

Phone: 0471-3106622

Elementz Engineers Guild Pvt Ltd
No.131, 4th Cross,
2nd main, RHB Colony,
Opposite Phoenix Marketcity,
Mahadevapura,
Bangalore - 560048

Phone: +91-9020616699


Connect with us :

  FB   Twitter   Twitter
 

Disclaimer: : This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. No Liability is attached to the originator or Elementz Engineers Guild Pvt. Ltd. Views or opinions presented in this email is of the author and may not necessarily reflect the opinions of Elementz Engineers Guild Pvt. Ltd.

This message contains confidential information. If you have received this e-mail by mistake, please notify the sender immediately by e-mail and delete this e-mail and its contents from your system.


_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Loading...