Friday, January 14, 2011

Extracting frames from a live stream

Many times, downloading and saving a stream locally is not an option. For example if the stream is a live stream. If you need to extract frames from a stream like this, you need to do it on-the-fly.

A good tool for dumping media content streamed over rtmp is rtmpdump and a good tool for extracting frames from a video is ffmpeg. Luckily for us those two can be piped together, since rtmpdump by default dumps the streamed media content to standard output and ffmpeg provides the option to read the input from a pipe.

To extract one frame per second from a stream try something like this:
rtmpdump -r <rtmp_video_url> | ffmpeg -i pipe:0 -r 1 frame%05d.jpg

3 comments:

Anonymous said...

is there a similar way to extract it from hls (m3u8) stream as well?

cepeth said...

official statement visit discover this Ysl replica handbags click to read more replica louis vuitton

Anonymous said...

off white shoes
off white clothing
alexander mcqueen shoes