chore: update description
This commit is contained in:
parent
9ccfbe5a08
commit
8b91e2b771
1 changed files with 8 additions and 8 deletions
16
README.md
16
README.md
|
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
imagorvideo is a new initiative that brings video thumbnail capability through ffmpeg, built on the foundations of [imagor](https://github.com/cshum/imagor) - a fast, Docker-ready image processing server written in Go with libvips.
|
imagorvideo is a new initiative that brings video thumbnail capability through ffmpeg, built on the foundations of [imagor](https://github.com/cshum/imagor) - a fast, Docker-ready image processing server written in Go with libvips.
|
||||||
|
|
||||||
imagorvideo uses ffmpeg C bindings that extracts image thumbnail from video, by attempting to select the best frame. It then forwards to libvips to perform all the image cropping, resizing and filters provided by imagor.
|
imagorvideo uses ffmpeg C bindings that extracts image thumbnail from video, by attempting to select the best frame from a RMSE histogram. It then forwards to libvips to perform image cropping, resizing and filters provided by imagor.
|
||||||
|
|
||||||
imagorvideo integrates ffmpeg AVIOContext read and seek callbacks with imagor [loader, storage and result storage](https://github.com/cshum/imagor#loader-storage-and-result-storage), which supports HTTP(s), File System, AWS S3 and Google Cloud Storage out of box. For non seek-able source such as HTTP and S3, imagor simulates seek using memory or temp file buffer.
|
imagorvideo integrates ffmpeg read and seek I/O callbacks with imagor [loader, storage and result storage](https://github.com/cshum/imagor#loader-storage-and-result-storage), which supports HTTP(s), File System, AWS S3 and Google Cloud Storage out of box. For non seek-able source such as HTTP and S3, imagor simulates seek using memory or temp file buffer.
|
||||||
|
|
||||||
This also aims to be a reference project demonstrating imagor extension.
|
This also aims to be a reference project demonstrating imagor extension.
|
||||||
|
|
||||||
|
|
@ -33,7 +33,7 @@ http://localhost:8000/unsafe/300x0/7x7/filters:frame(0.6):label(imagorvideo,10,-
|
||||||
|
|
||||||
<img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo.jpg" height="150" /> <img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo2.jpg" height="150" /> <img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo3.jpg" height="150" />
|
<img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo.jpg" height="150" /> <img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo2.jpg" height="150" /> <img src="https://raw.githubusercontent.com/cshum/imagorvideo/master/testdata/demo3.jpg" height="150" />
|
||||||
|
|
||||||
imagorvideo works by streaming out a limited number of frame data, looping through and calculating the histogram of each frame. It then choose the best frame for imaging, based on root-mean-square error (RMSE). This allow skipping the black frames that usually occur at the beginning of videos.
|
imagorvideo works by streaming out a limited number of frame data, looping through and calculating the histogram of each frame. It then choose the best frame based on Root Mean Square Error (RMSE). This allow skipping the black frames that usually occur at the beginning of videos.
|
||||||
|
|
||||||
imagorvideo then converts the selected frame to RGB image data, forwards to the imagor libvips processor, which has always been best at image processing with tons of features. Check out [imagor documentations](https://github.com/cshum/imagor#image-endpoint) for all the image options supported.
|
imagorvideo then converts the selected frame to RGB image data, forwards to the imagor libvips processor, which has always been best at image processing with tons of features. Check out [imagor documentations](https://github.com/cshum/imagor#image-endpoint) for all the image options supported.
|
||||||
|
|
||||||
|
|
@ -42,11 +42,11 @@ imagorvideo then converts the selected frame to RGB image data, forwards to the
|
||||||
imagorvideo supports the following filters, which can be used in conjunction with [imagor filters](https://github.com/cshum/imagor#filters):
|
imagorvideo supports the following filters, which can be used in conjunction with [imagor filters](https://github.com/cshum/imagor#filters):
|
||||||
|
|
||||||
- `frame(n)` specify the position or time duration for imaging, which skips the automatic best frame selection:
|
- `frame(n)` specify the position or time duration for imaging, which skips the automatic best frame selection:
|
||||||
- Float between `0.0` and `1.0` indices position of the video. Example `frame(0.5)`, `frame(1.0)`
|
- Float between `0.0` and `1.0` position index of the video. Example `frame(0.5)`, `frame(1.0)`
|
||||||
- Time duration indices the elasped time since the start of video. Example `frame(5m1s)`, `frame(200s)`
|
- Time duration of the elapsed time since the start of video. Example `frame(5m1s)`, `frame(200s)`
|
||||||
- `seek(n)` seeks to the approximate position or time duration, then perform automatic best frame selection around that point:
|
- `seek(n)` seeks to the approximate position or time duration, then perform automatic best frame selection around that point:
|
||||||
- Float between `0.0` and `1.0` indices position of the video. Example `seek(0.5)`
|
- Float between `0.0` and `1.0` position index of the video. Example `seek(0.5)`
|
||||||
- Time duration indices the elasped time since the start of video. Example `seek(5m1s)`, `seek(200s)`
|
- Time duration of the elapsed time since the start of video. Example `seek(5m1s)`, `seek(200s)`
|
||||||
- `max_frames(n)` restrict the maximum number of frames allocated for image selection. The smaller the number, the faster the processing time.
|
- `max_frames(n)` restrict the maximum number of frames allocated for image selection. The smaller the number, the faster the processing time.
|
||||||
|
|
||||||
#### `frame(n)` vs `seek(n)`
|
#### `frame(n)` vs `seek(n)`
|
||||||
|
|
@ -64,7 +64,7 @@ It results a complete black frame.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
This is where `seek(n)` comes handy. It seeks to the key frame before the 5 minutes elapsed time, then perform best frame selection starting from that point using root-mean-square error (RMSE).
|
This is where `seek(n)` comes handy. It seeks to the key frame before the 5 minutes elapsed time, then perform best frame selection starting from that point using Root Mean Square Error (RMSE) histogram.
|
||||||
The result is a reasonable image that sits close to the specified time:
|
The result is a reasonable image that sits close to the specified time:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue