Video Thumbnails

Video Thumbnails are generated by ffmpeg and are used to display a preview image of the video file. Thumbnails are generated on a scheduled interval, but you can also generate them manually.

Enabling

  1. Head to the Server Settings page
  2. Scroll down to Features
  3. Toggle the Enable Thumbnails switch
  4. Click Save
  5. Restart the server for the changes to take effect
Enable Thumbnails

Configuring Threads

By default the number of threads used to generate thumbnails is set to 4. If you have tons of videos being uploaded (and a powerful server...), you may want to increase the number of threads used to generate thumbnails.

The reason Zipline offloads thumbnail generation to a separate thread is to prevent the server from being bogged down by the process as it can be quite CPU intensive.

Behind the Scenes

The command used to generate thumbnails is:

ffmpeg -i /tmp/zipline/zthumbnail_id.tmp -y -vframes 1 -filter:v thumbnail -f mjpeg /tmp/zipline/zthumbnail_id.jpg
  • Files are copied to the temporary directory
    • If using s3 storage, the file is downloaded to the temporary directory, temporarily
  • Thumbnails are generated using the video-filter thumbnail and in the format mjpeg
  • The thumbnail is saved as a .jpg file
  • The temporary files are deleted & the thumbnail is saved to the uploads directory under .thumb-<ID>.jpg
    • If using s3 storage, the thumbnail is saved to the s3 bucket


Last updated: 2/2/2025
Edit this page on GitHub