Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create thumbnail image from video url

I'm trying to get a thumbnail of a video url.
i want it to put in player.

<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
    file: "/uploads/example.mp4",
    image: "/uploads/example.jpg",
});

  1. Is there an easy way to do it?
  2. What about codecs? Will I have to deal with it?
  3. Any video type is suported?
like image 897
hamed hossani Avatar asked Dec 19 '12 07:12

hamed hossani


1 Answers

  1. No, there's no easy way to do it just using jwplayer.
  2. I would instead use ffmpeg to generate the thumbnail. It works with lots of codecs.
  3. Not all, but most are supported.

See this question about how to call ffmpeg from PHP: Video thumbnail

like image 168
Emil Stenström Avatar answered Oct 02 '22 11:10

Emil Stenström