Generating thumbnails

Thumbnails allow your end users to see a small screen capture that represents the content that is available to view.

You can generate thumbnails to display in the IPTV channels of the TV guide, and in the channel previews.

The following examples show what your end user sees without thumbnails and with thumbnails:

Without thumbnails

With thumbnails

Information

Currently, MinistraPRO only supports Flussonic to generate thumbnails for video streams.

For more information, refer to following Flussonic documentation at https://flussonic.com/doc/thumbnails/.

MinistraPRO uses an Nginx-based cache server as a proxy to manage the load on the streaming server because generating images from frames is a resource-heavy process.

To generate thumbnails, make sure the following is true:

  • Thumbnail generation is enabled, as described in the Flussonic documentation at https://flussonic.com/doc/thumbnails/.

  • The cache server has the Nginx software installed and configured. For more information, refer to https://www.nginx.com.

  • In the stream settings, the JPEG protocol is enabled as an output of the stream.

Tip

To generate thumbnail previews in the TV guide, instead of configuring the cache server, in the XML element for a thumbnail, include the URL to the thumbnail.

To generate thumbnails

  1. Open the configuration file for your cache server.

    • To set the name of the cache server, modify the following line:

      server_name screenshots.example.com;

      • screenshots.example.com is the cache server domain.

      Information

      server_name is not a mandatory setting. If you do not have access to an Nginx-configured domain, use wildcards or leave the line empty.

    • To set the authorization token, modify the following line:

      proxy_pass http://$1/$2/preview.jpg?token=static_token;

      • http://$1/$2/preview.jpg is the URL of the thumbnail file.

      • static_token is the authorization token whitelisted in the Flussonic backend.

      Information

      A whitelisted token allows Flussonic to automatically accept requests from the cache server. If the token is not whitelisted, the streaming server checks the authorization and may reject the request. However, if the IP of the cache server is whitelisted, Flussonic ignores the token.

      The following is a sample configuration of the Nginx cache server:

      server {
       
      	listen 80;
      	server_name screenshots.example.com;
       
      	resolver 8.8.8.8;
       
      	location ~* ^/live/(.*)/(.*)/preview.jpg(.*)? {
      		proxy_cache thumbnails;
      		proxy_cache_key $2;
      		proxy_cache_valid 2m;
      		proxy_pass http://$1/$2/preview.jpg?token=static_token;
      		add_header Cache-Control s-maxage=300;      
      	}
          
      	location ~* ^/tv-archive/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/(.*)/preview.jpg(.*)? {
      		proxy_cache thumbnails;
      		proxy_cache_key $2$3$4$5$6$7;
      		proxy_cache_valid 2m;
      		proxy_pass http://$1/$2/$3/$4/$5/$6/$7/$8-preview.jpg?token=static_token;
      		add_header Cache-Control s-maxage=300;
      		proxy_intercept_errors on;
      		error_page 301 302 307 = @handle_redirects;
      	}
          
      	location @handle_redirects {
      		set $orig_loc $upstream_http_location;
      			if ($orig_loc !~* ".admin." ) {
      				proxy_pass http://$1/$orig_loc;
      			}
      		add_header X-uri "$orig_loc";
      	} 
      }												

  2. Open the tv.ini file

    • Enter the URL of the cache server in the following attribute:

      tv_preview_cache_server

      Learn more: tv.ini

  3. Save and close the files.

  4. To check thumbnails are generating correctly, you can use the following URL:

    • http://FLUSSONIC-IP:80/STREAM_NAME/preview.jpg

Learn more: IPTV channels