Extracting a JPEG snapshot from an FLV file

Posted on Thursday 15 December 2005

For video sharing applications, it’s good to be able to take a snapshot of the first frame to use as a thumbnail for previewing video. Now I was using FlashCom to record some video to be shared and needed to have a preview thumbnail. So I emailed “master of the FLV format” Burak and he pointed me towards FFMPEG. As it turns out, FFMPEG reads .flv and can extract any frame from a stream.

I dug up this article which shows the command line to use (props to the author Dennis Baldwin, put yourself on MXNA). The command line he uses can extract a PNG file, and he asks the question how one could use this to create a jpg. Simple: run the command from a PHP file, and then run ImageMagick or GD to convert to JPG. Tried it, works like a charm.

Now, the only trouble is that it’s a pain to install on shared hosts. FFMPEG has to be compiled and if you don’t know what you’re doing and/or you don’t have root access, it could be a major problem. What would be cool is have a subscription service which would offer remote video conversions/manipulations. Pay ten/twenty/fifty bucks a month and get access to a certain number of conversions through a REST interface. That would be sweet and probably highly profitable. By now people should know that one of every three of my blog posts contains a get-rich-quick idea. What are you waiting for? I want to start collecting royalties, dammit!


WordPress database error: [Can't open file: 'wp_comments.MYD'. (errno: 145)]
SELECT * FROM wp_comments WHERE comment_post_ID = '167' AND comment_approved = '1' ORDER BY comment_date

No comments have been added to this post yet.

Leave a comment




Your e-mail address is never displayed. If you run into issues with SpamKarma blocking you, email me at $patrick->5etdemi(com)


RSS feed for comments on this post | TrackBack URI