Skip to content


Video is a stream of pictures. Sometimes you need to extract these pictures and handle them separately from each other. Such separate pictures are called thumbnails or screenshots.

Flussonic Media Server can create thumbnails of a video stream. They allow you to:

  • show an instant preview of a live stream on a web page to know what is happening there right now,
  • take a look at the quality of a stream,
  • freeze a point in time to use the screenshot somewhere else,
  • make a fast search in the DVR archive for some fragment of video identifiable by the screenshot,
  • create a wall of screenshots to quickly look at a whole day of recording,
  • do whatever else with small static images extracted from a large video stream.

Flussonic Media Server can create thumbnails in two different ways:

  • Extracting video frames as JPEG images. This is a resource-intensive operation. Flussonic can save JPEG thumbnails in the DVR archive. Learn more on this page.

  • Creating resource-saving MP4 video thumbnails. In H.264 streams with keyframes, all compressed images are available without resource-intensive processing. Flussonic Media Server takes the first keyframe from each segment and displays it as an MP4 video consisting of one frame. Learn more in Video thumbnails section.

About JPEG thumbnails

Flussonic Media Server does a rather CPU-intensive job: it takes the first keyframe of each segment, decodes it to raw video, and encodes back to a JPEG image. This seems rather simple, but when you have, say, 300 streams, this process can take a lot of CPU time.

Flussonic allows some optimization here – by changing a segment's duration you can change the total number of JPEG thumbnails. The fact that Flussonic Media Server takes only the first keyframe of a segment means that if you configure the segment duration of 3 seconds, you'll have 20 JPEGs per minute. If you configure the segment duration to be 6 seconds, you'll have 10 JPEGs per minute. If you take a stream from an IP camera, you may have 60 keyframes per minute, but Flussonic Media Server will create a smaller number of JPEGs.


If you enable DVR on a stream, all of the generated JPEGs will be written to the disk.

It is possible to optimize the CPU usage by accessing thumbnails by their URL. Usually it is suitable for IP cameras because IP camera maintain fresh JPEG screenshot for the currently shown video. In this case Flussonic Media Server will download a JPEG image each time video segment starts.

Configuring JPEG thumbnail generation

To create JPEG thumbnails, Flussonic Media Server uses a built-in package.

Add the thumbnails option to the stream settings:

stream example {
  url fake://fake;

This will start the flussonic-thumbnailer process. It may be rather resource-hungry — this is the nature of video and image compression.

All the settings for JPEG thumbnails can be specified through the administrator's panel in a stream's settings on the Output tab (Media > select a stream > Output).

Flussonic JPEG thumbnails

Configuring JPEG thumbnails generation from URLs

To reduce CPU usage on thumbnail generation, you can specify the URL where Flussonic Media Server can get thumbnails. Many cameras have a special URL for screenshots:

stream example {
  url rtsp://localhost:554/source;
  thumbnails url=http://examplehost:5000/snapshot;

You can try to find the screenshot URL in your camera's documentation, or look for that information on the web.

All the settings for JPEG thumbnails can be specified through the administrator's panel in a stream's settings on the Output tab (Media > select a stream > Output).

Flussonic JPEG thumbnails

Getting JPEGs from live streams

After you have enabled thumbnails in Flussonic Media Server, you need to access them.

The URL for getting thumbnails is as follows:

http://flussonic:80/ort/preview.jpg — a stream's last screenshot.

http://flussonic:80/ort/preview.mjpeg — an MJPEG screenshot stream.

We strongly recommend that you never use the MJPEG stream because it is an uncontrollable way of streaming video with a very high bitrate. You can end up with an MJPEG stream with 50% of the original bitrate, streaming at 0.1fps. But if you still need it, you can use it.

Getting JPEGs from DVR by GMT time

Screenshots are automatically saved to the archive if DVR is turned on for the stream. They can be obtained using the HTTP API.

The best way (in terms of resources) of getting JPEG screenshots is to specify an approximate GMT time as part of the URL. Flussonic will return the URL corresponding to the nearest keyframe (an actual screenshot).

curl -v ''
< HTTP/1.1 302 Found
< Location: /ort/2018/05/02/07/00/40.jpg

You then use this URL to access the screenshot.

Learn more in the article about the DVR API, in the section Requesting JPEG screenshots.

Getting JPEGs from DVR by UTC time


This method is resource-intensive, we don't recommend using it. A better way is to use an approximate GMT time. Learn more in DVR API, section Requesting JPEG screenshots.

First, you need to identify a time range for which you want to get DVR. For example, right now it is 2017 April 21, 13:10 GMT, so it is 1492780200 UTC. If you want to get thumbnails for the last hour, you need to request the following URL:

curl 'http://flussonic:80/clock/recording_status.json?from=1492776600&to=1492780200&request=brief_thumbnails'

By default, Flussonic does not include the list of timestamps in the response. To get them, we need to add request=brief_thumbnails to the query string.

The response will look like this:


Here you get a very long list of timestamps that you need to convert to paths to screenshots. For example, the timestamp 1492776605 will be converted to http://flussonic:80/clock/2017/04/21/12/10/05.jpg.

You will only get a list of timestamps, you will need to get the thumbnails themselves by requesting them individually.

On-demand JPEG generation

Sometimes it is very expensive to store all JPEG images on the disk, so you can ask Flussonic Media Server to generate JPEGs on demand. In this case, you don't need to enable thumbnail generation in the stream settings.

Request a URL with a certain time:


and Flussonic Media Server will take a segment, take the first keyframe and generate a JPEG image from it.

This method might lead to unpredictable CPU usage, so it is not recommended.

With the JPEG thumbnailer enabled, you will have smooth and moderate CPU usage, without spikes in load. With on-demand JPEG generation, you may have low CPU usage overall, but during prime time you may get spikes, and your server may become unstable.