• Stars
    star
    307
  • Rank 136,109 (Top 3 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created about 9 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

📷 Generate thumbnail sprites from videos.

Video thumbnail generator

Generate thumbnail sprites from videos.

Why

image

Almost all video players enhances user's seekbar navigation by providing a thumbnail preview of the moments where the user want to seek, so generate this sprites shouldn't be hard. This is a python script that, given a video, generates a thumbnail sprite image from it.

Build

  1. Clone it:
$ git clone [email protected]:flavioribeiro/video-thumbnail-generator.git
  1. Then go to the project's folder:
$ cd video-thumbnail-generator
  1. And finally run:
$ chmod a+x build && ./build

Run

$ ./generator --help
Video Thumbnail Generator

Usage:
  ./generator <video> <interval> <width> <height> <columns> <output> [<parallelism>]
  ./generator (-h | --help)
  ./generator --version

Options:
  -h --help     Show this screen.
  --version     Show version.
  <video>         Video filepath.
  <interval>      Interval em seconds between frames.
  <width>         Width of each thumbnail.
  <height>        Height of each thumbnail.
  <columns>       Total number of thumbnails per line.
  <output>        Output.
  [<parallelism>]   Number of files to process in parallel

Example

Single file

$ ./generator samples/sample.mp4 60 300 200 2 output/sample.mp4.png
[sample.mp4] Extracting frame 1/3
[sample.mp4] Extracting frame 2/3
[sample.mp4] Extracting frame 3/3
[sample.mp4.png] Savedacted.
Saved!

Directory

$ ./generator samples/ 60 300 200 2 output/
[sample copy.mp4] Extracting frame 1/3
[sample.mp4] Extracting frame 1/3
[sample copy.mp4] Extracting frame 2/3
[sample.mp4] Extracting frame 2/3
[sample copy.mp4] Extracting frame 3/3
[sample.mp4] Extracting frame 3/3
[sample copy.mp4.png] Saved
[sample.mp4.png] Saved

image

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-awesome-new-feature
  3. Commit your changes: git commit -m 'Add some awesome feature'
  4. Push to the branch: git push origin my-awesome-new-feature
  5. Submit a pull request :]

License

This code is under Apache License.

More Repositories

1

donut

donut is a zero setup required SRT+MPEG-TS -> WebRTC Bridge powered by Pion.
Go
346
star
2

nginx-audio-track-for-hls-module

🔉 Nginx module that generates audio track for HTTP Live Streaming (HLS) streams on the fly.
C
136
star
3

nginx-vod-module-fmp4-hls

Play fragmented mp4's on HLS using nginx-vod-module
Nginx
43
star
4

update-my-mint

update some accounts that are not integrated with mint
Python
22
star
5

butterfly

transcode videos on the fly
15
star
6

clappr-hls-js-plugin

HLS support for Clappr using JavaScript
JavaScript
14
star
7

donut-video

A custom element (web component) for Donut (https://github.com/flavioribeiro/donut)
JavaScript
9
star
8

algorithms

Just some warm-up exercises I did for my masters
Python
5
star
9

clappr-p2phls-stats-plugin

BemTV Peer-to-Peer stats box plugin for clappr media player
JavaScript
5
star
10

yatta

live encoder poc using gstreamer
Rust
5
star
11

clappr-iframe

clappr-iframe
JavaScript
4
star
12

dojo

encoding and compression algorithms dojos @ globo.com
Ruby
4
star
13

clappr-streamroot-playback

Clappr Plugin for Streamroot.io
HTML
3
star
14

softwarefreedomdaycg

Presentation about games and cocos2d on Software Freedom Day Campina Grande
Python
3
star
15

clappr-meme-generator

Generate memes from on demand videos
2
star
16

cocoslides

A small and simple slides framework written in Cocos2d
Python
2
star
17

stream-transcoder

Transcode streams
Python
2
star
18

playmobil-client

Hipster alternative to Flash Media Live Encoder (FMLE)
CSS
2
star
19

ncl2html

Convert your NCL (Nested Context Language) documents to HTML
JavaScript
2
star
20

stewie-go

stewie is an unsupervised anomaly detector
Go
2
star
21

playmobil

An extensible transcoder for the web
Ruby
2
star
22

origin-traffic-router

Go
1
star
23

self

my dotfiles
Shell
1
star
24

video-tags-suggestion

Python
1
star
25

formsdetector

Undergraduate project which's an application that detect object forms
C
1
star
26

clappr-mosaic

Mosaic of Clappr instances to ensure all video types are being played in all browsers
1
star
27

docker-ffmpeg-node-beamcoder

Dockerfile for beamcoder
Dockerfile
1
star
28

tclsend

one of the first applications I wrote :) a way to upload TCL's to eggdrops via DCC Send on IRC!
Tcl
1
star