Extracting image from flash video

Hi,

hope to get some ideas here among the scripters.

For some reason I need to access weather data from my cell phone. Most webites providing the data I need are designed for the big screen and include tons of advertising banners and the like. To solve this dilemma I have set up my own website providing what I want. Looking up a link on my site will start a cgi script (written in bash) which will collect the information, scale it to a reasonable size, eliminate junk and serve it with apache to my cell phone. This site is for my private use only and I’m not going to steal bandwidth from others to display it publicly.

So far so good. But now one of the sites I am accessing has stopped to provide webcam images as *.jpg but instead sends a flash video of considerable size (3 to 4 MB). This is a no-go to download with the cell phone.

The plan is to fetch the video (using wget) and then extract the last frame which is the current picture. The video appears to be in mp4 format and I can view it with mplayer. Any ideas how I can extract the last picture and save it in *.jpg format?

Btw: I am talking about the webcams here.

Hm, nice idea (and nice view of Bellinzona). I can not help you, but I think that people lurking at “Multi Media” subforum might know about CLI tools that can do it (you do not need more, when you have the CLI tool you can incorporate it in a sccript).

Now the problem for you is, how to ge those people to this thread without doing the feared “double posting”.

I might be missing something but you said you want the picture showing using some devel tools we can see the url it is a jpg…

So this is the frame being shown …
http://www.rsi.ch/docroot-dynamic/importmeteo/webcam/images/BE.jpg

But if you really wish to extract looks like one for imagemagick to me I stabbed at a couple of bits but

convert file.mp4 files.jpg

will extract them all as file-n.jpg(Gave me 478 I suspect there must be a way to tell it to get the last one). I suspect mencoder will be able to do this to.

Hi FeatherMonkey

You are NOT missing something. Confusion is totally on my side. I can use the splashImageFile which is already the latest picture in *.jpg format. So there is no need to download the animation and extract the most up-to-date picture. Thanks a lot for pointing this out. Big smiley for you :slight_smile: