PeerTube icon indicating copy to clipboard operation
PeerTube copied to clipboard

Choose thumbnail/preview from a video frame

Open ghost opened this issue 7 years ago • 9 comments

This is a feature request for an alternative way of setting the preview/thumbnail image from the video itself, by choosing a particular frame. For many videos a manually chosen frame provides a great compromise between effort and legibility, when you don't want to make something completely custom but want a more interesting frame than something arbitrarily chosen.

A simple implementation might choose several frames automatically, then allow creators to select one. A better implementation would allow scrubbing through the video on an embedded player, capturing whatever frame you hilight. An even better implementation might use some basic computer vision to find interesting candidate frames first.

ghost avatar Oct 20 '18 21:10 ghost

And then, an API call to build a thumbnail based on a timecode would be great ! Like put /videos/{id}/thumbnail "timecode": "string"

Sabilon avatar Nov 22 '18 15:11 Sabilon

Absolutely would love to see this feature. If the mechanism to select a thumbnail through the player is too complex , letting ffmpeg sample several frames, distributed over the videos length on initial thumbnail selection would probably be a great intermediate solution. (http://debuggable.com/posts/FFMPEG_multiple_thumbnails:4aded79c-6744-4bc1-b30e-59bccbdd56cb)

tilllt avatar Dec 16 '19 09:12 tilllt

This request has been open for four years. A very important feature for people who share video content. Does anyone know a little JavaScript way of doing this in the meantime?

mroswell avatar Dec 26 '22 04:12 mroswell

Jumping in on this one. @Chocobozzz Per your note on #6185 I'm listing my understanding of what is needed. I'm happy to help on this one as it should solve my problem as well.

  1. As a User, I can customize the thumbnail of my video by selecting a timecode from the video.
  2. As a User, I can customize the thumbnail of my video by selecting from suggested thumbnails generated by the app.
  3. As an Administrator, I can configure the number and the default timecode positions of suggested thumbnails.

Assumptions

  1. Thumbnail refers to both the thumbnail and the preview image. If these should be treated separately, let me know.

I have some studying to do and will likely have follow up questions. If I've misunderstood anything, please point me in the right direction.

kntndrsn avatar Feb 23 '24 17:02 kntndrsn

I'd also love to see this feature!

SimplyCorbett avatar Feb 24 '24 05:02 SimplyCorbett

Hello all, I have a rough draft of the frame selection user interface. Any initial feedback would be appreciated.

My PeerTube fork

I've updated the Edit button and labeled it Upload. The "Select from video" button will cause a video-js player to be loaded with the video.

Screenshot from 2024-02-27 18-53-31

The user will play the video, finding the frame they want. From there, they can select "Use frame" to pass the timestamp.

image

kntndrsn avatar Feb 28 '24 01:02 kntndrsn

This is an interesting solution but unfortunately it won't work with videos that are not compatible with the web browser (and they are many!).

I don't think we can do such feature without using the server, and so waiting for the video to be uploaded.

Chocobozzz avatar Feb 28 '24 07:02 Chocobozzz

@Chocobozzz Thanks for the feedback. The prototype in this case is pulling the video file link from the server via the video service. This is similar to the mechanism used by the video-watch component. Is that what you mean or am I missing something?

If I'm missing a scenario, anything you can suggest pointing me in the right direction would be appreciated.

kntndrsn avatar Feb 28 '24 14:02 kntndrsn

Thanks for the feedback. The prototype in this case is pulling the video file link from the server via the video service. This is similar to the mechanism used by the video-watch component. Is that what you mean or am I missing something?

Oh sorry, I thought you were injecting the video to be uploaded into the DOM while it was still being uploaded :)

Chocobozzz avatar Feb 28 '24 14:02 Chocobozzz

Thanks to @kntndrsn that implemented this feature. An embed player can be displayed to choose set a thumbnail from a specific frame.

screen_2024-05-30-16_36_21

(the feature is only available when you Update the video)

Chocobozzz avatar May 30 '24 14:05 Chocobozzz