1
votes

We allow users to upload their videos on the website in flv, mp4 and mov formats and use jwplayer to show these videos.

The problem is how do we make cover images for these videos?

I know it's straight-forward to show a particular jpg as a cover image on jwplayer. My question is how do we generate the jpg file from an uploaded video file.

  • Is there an option on jwplayer that will show a cover image from a file that is given to it.
  • Is this something we need to manage from the server side by running some command-line utility to grab an image and then use that?
1

1 Answers

2
votes

"Is there an option on jwplayer that will show a cover image from a file that is given to it."

No, but you can set a variable called "image" in your player setup, which is will point to an image file on your server.

image: "something.jpg",

For example.

You can also use our JavaScript API to fake this, like so - http://support.jwplayer.com/customer/portal/articles/1439795-example-a-poster-less-preview

<div id="myElement"></div>

<script>
  jwplayer("myElement").setup({
    file: "/uploads/myVideo.mp4",
    autostart: true,
    mute: true,
    controls: false
  });
</script>

<script>
  setTimeout(function() { 
    jwplayer().pause();
    jwplayer().setMute(false);
    jwplayer().setControls(true);
  },3000);
</script>