Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Video thumbnail plugin  (Read 1032 times)

0 Members and 1 Guest are viewing this topic.

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Video thumbnail plugin
« on: April 03, 2020, 08:15:25 pm »

Hi,

After uploading mp4 video to the gallery, the thumbnail shown is just a generic video thumbnail. Is there a plugin or a way to get Coppermine to display a thumbnail from the actual video?
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #1 on: April 04, 2020, 05:39:10 pm »

I am aware you can make a sreenshot image of every video and upload it as thumb_filrname.jpg/png.

I was interested to know if there was an outomated option the same as you have for images?
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1550
Re: Video thumbnail plugin
« Reply #2 on: April 05, 2020, 12:03:36 am »

There is this: https://forum.coppermine-gallery.net/index.php/topic,79519.0.html
But it is some work to make the image first.

Because I've had COVID-19 time on my hands, I thought I would try to put something together. There are too many issues trying to do something on the server when the video is uploaded ... so I've approached it from the client side. I'm almost done with it (another day or two). The way it will work is that, when on the intermediate page for the video, there will be a button to create a thumbnail from the video's current frame. So you can position the video where you want, hit the button and the thumbnail will be set. It will require a modern web browser and will (currently) only work with videos handled by the CPG HTMLV player.
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #3 on: April 05, 2020, 12:24:56 am »

Cool,  This gets me a good way there, saves a lot of the work required to create a video thumbnail.

Many thanks  :)
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1550
Re: Video thumbnail plugin
« Reply #4 on: April 05, 2020, 05:05:36 am »

You can try out this initial version of the plugin. Let me know what issues you might have.

See the contributed version here.
« Last Edit: April 06, 2020, 08:26:50 pm by ron4mac »
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #5 on: April 05, 2020, 01:39:01 pm »

There doesn't seem to be any issues so far. The only thing to watch is if you already have a thumb that you created manually and it is a .png file, the new thumbnail is created as a .jpg, and for some reason .png files take presidence over .jpg, so you have to delete your original thumb .png image before the .jpg thumb will show.

Not really an issue for the first itme use or subsequent use as the .jpg will just get overwritten.  It will just need a mention in the instructions that if you have a .png thumb already it will need to be deleted first.

This plugin seems to work perfectly, and saves a huge amount of work.

Many thanks for your efforts and providing the solution to my problem  :)
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1550
Re: Video thumbnail plugin
« Reply #6 on: April 05, 2020, 02:07:25 pm »

The only thing to watch is if you already have a thumb that you created manually and it is a .png file, the new thumbnail is created as a .jpg, and for some reason .png files take presidence over .jpg, so you have to delete your original thumb .png image before the .jpg thumb will show.

Not really an issue for the first itme use or subsequent use as the .jpg will just get overwritten.  It will just need a mention in the instructions that if you have a .png thumb already it will need to be deleted first.

It is slightly dependent on the browser, but I could add an option whether .jpg or .png thumbs are created. Went with jpegs as the size would be smaller.

See above for an updated version that adds a small overlay as indication that it is a video.
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #7 on: April 05, 2020, 02:41:54 pm »


See above for an updated version that adds a small overlay as indication that it is a video.

I'm not sure I follow you regarding the 'overlay', is this an overlay on the thumbnail indicating it is a video?  I have created thumbnails in Chrome & Firefox running on Linux Mint and the thumbnails look the same.

I think you were right to choose .jpg. I just had .png thumbnail images as it was the omly option in the program I use to take screenshots of the videos.
Logged

ron4mac

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Posts: 1550
Re: Video thumbnail plugin
« Reply #8 on: April 05, 2020, 03:08:33 pm »

I'm not sure I follow you regarding the 'overlay', is this an overlay on the thumbnail indicating it is a video?  I have created thumbnails in Chrome & Firefox running on Linux Mint and the thumbnails look the same.

You may have to clear your browser cache to get the effect ...
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #9 on: April 05, 2020, 03:24:57 pm »

You may have to clear your browser cache to get the effect ...

Cleared the cache in both Chrome and Firefox, no change.  I use the Cloudflare open DNS servers, so maybe they or my ISP have some kind of caching going on?
Logged

Irondutchess

  • Coppermine newbie
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 10
    • Joshua Cassim's Website & Gallery
Re: Video thumbnail plugin
« Reply #10 on: April 05, 2020, 05:19:35 pm »

Well that's strange, I went off to do a couple of jobs and grab a coffe, and when I came back and refreshed the page it had started working  :D must have been a cache problem of some sort.

That feature is really useful, especially on the home page when random files are displayed.

Im expecting this to be a popular plugin, as not only does it make creating video thumbnails easy, you have an infinite choice of which video frame to choose.

Logged

Phill Luckhurst

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4710
    • Windsurf.me
Re: Video thumbnail plugin
« Reply #11 on: April 05, 2020, 11:32:28 pm »

Iíve seen Linux Mint do caching of served webpages in the past but cannot remember what the module was called. Last time I used it was in 2015 on version 17 cinnamon so a lot has changed. You may want to start there, but IIRC the time was set quite low So it is probably not worth the effort,
Logged
It is a mistake to think you can solve any major problems just with potatoes.
Pages: [1]   Go Up
 

Page created in 0.028 seconds with 20 queries.