Filmstrips' default width/height/frame count

Hi all,

I am writing a custom filmstrip viewer and am wondering what the default parameters are (we are not using any custom filmstrip uplaods)?
The height seems to always be 135px but what is the default number of frames saved in the filmstrip (so I can figure out the width for the correct clipping rectangle)?

Cheers,
frank

I seem to remember 25 is the default.
This is from my memory of reading this somewhere.

If you want to create your own Filmstrip Thumbnails using FFmpeg, here is the code we use to generate the image from a set of individual thumbnail images:

ffmpeg -threads #{self.threads_to_use} -i #{src_file} -vf select=\"not(mod((n-#{offset})\\,#{frame_increment}))\",setpts=\"N/(#{fps_f}*TB)\",scale=#{frame_width}:-1 -sws_flags lanczos -qscale:v 2 -pix_fmt yuvj420p -f image2 #{thumb_files}-%02d.jpeg"

After some more digging it seems to use every single frame. Now I wonder if the height is constant as well. Will experiment some more…

1 Like

Turns out the height is not consistent so I guess it’s relative to the uploaded clip size.
Is this documented anywhere?

I only ever found it documented within the code itself:

maxThumbs = 50  # maximum number of thumbnails to put in the filmstrip
count = min(len(frames), maxThumbs)

The code then calculates how much frames to skip if you have more than 50 frames and chooses it’s thumbnails accordingly.

The width for each thumbnail is 240px. The height is calculated by the images’ aspect ratio, ignoring the pixel aspect ratio. And then you have the full width of the image, which is the number of thumbnails multiplied by 240px.

Hope this helps.

1 Like

Great, thanks, that should definitely help.