Search code examples
ffmpegrtmpflash-media-server

Generate video thumbnail using ffmpeg; Grab from RTMP server


I have research how to generate a video thumbnail user FFMPEG like so:

ffmpeg -i myfile.flv -vcodec mjpeg -vframes 1 -an -f rawvideo -s 640x480 foo.jpg

But how can I generate a thumbnail when the file is on another server? Specifically a RTMP server? for example: rtmp://foo.rtmphost.com/videos


Solution

  • you can use rtmpdump to save stream to flv file and then to use FFMPEG to extract thumbnail from it.

    something like:

    rtmpdump -v -r rtmp://[stream_address] -o 1.flv