mirror of
https://github.com/flyimg/flyimg.git
synced 2026-04-25 09:45:50 +03:00
[PR #243] [CLOSED] Feature/movie and pdf support #958
Labels
No labels
Docs
Docs
Docs
Security
UnitTest
bug
dependencies
duplicate
enhancement
enhancement
enhancement
hacktoberfest
help wanted
invalid
pull-request
question
stale
version 1
version 2
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/flyimg#958
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/flyimg/flyimg/pull/243
Author: @louisl
Created: 1/31/2020
Status: ❌ Closed
Base:
master← Head:feature/movie-support📝 Commits (10+)
64e528dAdded ghostscript63e02e7Added PDF mimetype and isInputPdf function488ee6aIf it's a pdf use pgae no parama640a69Added pg param for PDF5ac06b3Changed parameter name to be more generic, appends page number to cached image621580eAdded movie support1a6c2bdFixed current unit testsf57ea1bcode stylee86fb59Cleaned up and added and exception if the time is out of rangecbe1b0eCommenting and a little refactor📊 Changes
13 files changed (+247 additions, -4 deletions)
View changed files
📝
Dockerfile(+4 -1)📝
config/parameters.yml(+4 -0)📝
src/Core/Entity/Image/InputImage.php(+41 -1)📝
src/Core/Entity/Image/OutputImage.php(+46 -0)📝
src/Core/Entity/ImageMetaInfo.php(+1 -1)📝
src/Core/Processor/ImageProcessor.php(+4 -1)📝
src/Core/Processor/Processor.php(+3 -0)➕
src/Core/Processor/VideoProcessor.php(+61 -0)📝
tests/Core/BaseTest.php(+4 -0)📝
tests/Core/Controller/DefaultControllerTest.php(+77 -0)📝
tests/Core/Entity/Image/OutputImageTest.php(+2 -0)➕
tests/testImages/SampleVideo_1280x720_2mb.mp4(+0 -0)➕
tests/testImages/lighthouses.pdf(+0 -0)📄 Description
RE issue #241
PDF's.
Requires
ghostscriptThis generates an image for page 1. (no page specified).
http://127.0.0.1:8080/upload/w_1024,h_1024,q_75/https://example.com/seasons.pdfAdding
pg_[n]generates a specific page. E.g. this would generate page 3.http://127.0.0.1:8080/upload/w_1024,h_1024,q_75,pg_3/https://example.com/seasons.pdfWhen the cached image is generated I'm appending '-1', '-2', '-3' etc to it depending on the page requested. No page specified defaults to appending '-1'.
MOVIES
Requires
ffmpegThis generates an image from 1 second duration. (no time specified).
http://127.0.0.1:8080/upload/w_1024,h_1024,q_75/https://example.com/my-movie.mp4Adding
tm_[n]generates a specific seconds. E.g. this would generate an image from 5 seconds duration.http://127.0.0.1:8080/upload/w_1024,h_1024,q_75,tm_5/https://example.com/my-movie.mp4The above could also be written as below which is how you would do minutes and hours:
http://127.0.0.1:8080/upload/w_1024,h_1024,q_75,tm_00:00:05/https://example.com/my-movie.mp4See http://ffmpeg.org/ffmpeg-utils.html#time-duration-syntax
I'm generating a full size image with ffmpeg to work from in the tmp directory, before generating the resized image.
When the cached image is generated I'm appending '-1' or '-000005' etc to it depending on the time requested. No time specified defaults to appending '-000001' ie first second of the movie.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.