# Script to regenerate video previews multi threaded?

**URL:** <https://forums.plex.tv/t/script-to-regenerate-video-previews-multi-threaded/788360>\
**Category:** Plex Media Server\
**Tags:** server-linux\
**Created:** [April 15, 2022, 5:40am UTC](https://forums.plex.tv/t/script-to-regenerate-video-previews-multi-threaded/788360 "2022-04-15T05:40:26Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Volts](https://avatars.discourse-cdn.com/v4/letter/v/a5b964/32.png) [@Volts](https://forums.plex.tv/u/Volts)\
**Post date:** [April 15, 2022, 6:12am UTC](https://forums.plex.tv/t/script-to-regenerate-video-previews-multi-threaded/788360/2 "2022-04-15T06:12:58Z")

</div>

Just to check, how long does it take to create thumbnails for a movie? There are a few reasons this can become very slow even on fast systems. If it’s more than a few minutes per movie, something might be wrong.

This is doable but I’m not aware of anything already assembled. Using the GPU wouldn’t dramatically accelerate the process.

When Plex is extracting thumbnails you can see the command that it’s executing in the process table and in the logs. An `ffmpeg` equivalent is something like this:

```auto
ffmpeg -skip_frame:v nokey -i input.mkv -q 3 -filter_complex "[0:V:0] fps=fps=0.500000:round=up,scale=w=320:h=240:force_original_aspect_ratio=decrease [out]" -map "[out]" img-%06d.jpg

```

Then they’re assembled together into `index-sd.bif` files. There are a few ways to do this. Relevant search keywords that may help are `index-sd.bif`, `Roku` and `BIF`.

Then you’d need to put the created `index-sd.bif` file in the correct location for Plex. Here’s a recent discussion about that.

> [How plex calculates this strange \*.bundle folder names](https://forums.plex.tv/t/how-plex-calculates-this-strange-bundle-folder-names/786851)

---

_[View the full topic](https://forums.plex.tv/t/script-to-regenerate-video-previews-multi-threaded/788360)._
