Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

animated gif to webp, ffmpeg audio/video (webm) support #22

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
267e8a9
Doubled minimum compression threshold
changhaitravis Feb 3, 2019
802ff12
implemented 'adaptive' compression to be higher based on resolution a…
changhaitravis Feb 15, 2019
6b21719
implemented apng passthrough with threshold and animated gif2webp han…
changhaitravis Mar 5, 2019
e99d069
define URL for compatibility with node.js 8 and earlier
changhaitravis Mar 5, 2019
e8c4a05
Added Content-Disposition filename
changhaitravis Mar 26, 2019
0a1f699
rebased to exclude gcf-specific changes
changhaitravis Sep 23, 2019
5dd8d4e
add URL module to bypass.js
changhaitravis Mar 27, 2019
09aa93c
round up compression quality after applying compression scaling. Fixe…
changhaitravis Apr 11, 2019
6f433ea
updated sharp library
changhaitravis Sep 21, 2019
f5eccc0
implemented webm vp9+opus re-encode
changhaitravis Sep 22, 2019
a61928d
updated lodash, added some more tweaks to reEncode
changhaitravis Sep 23, 2019
769d3ee
reduce video resolution 480p => 360p
changhaitravis Sep 23, 2019
d6807b4
set -cpu-used flag to 8 and set the duration cap to 90
changhaitravis Sep 23, 2019
74bc1c7
only handle videos 30s or less
changhaitravis Sep 23, 2019
2e0b014
add stderr log to audio-only
changhaitravis Sep 23, 2019
a39e4dc
set the video duration cap to 10 mins
changhaitravis Sep 24, 2019
f4e1caf
moved reEncode functionality into Request's Response emitter to allow…
changhaitravis Oct 1, 2019
5ee8725
exposed some of the new functionality variables as environment variables
changhaitravis Oct 5, 2019
9b69834
Update README.md
changhaitravis Oct 5, 2019
bb06efa
Update README.md
changhaitravis Oct 5, 2019
ff084c9
Update README.md
changhaitravis Oct 5, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ and user's IP address through to the origin host.

## Deployment

#### ENVIRONMENT_VARIABLES
`MIN_COMPRESS_LENGTH=2048` Default=2048 (minimum byte length for an image to be compressible; default 2048 ~2kB)<br/>
`DISABLE_ANIMATED=1` (Disable small apng passthrough and animated GIF to animated webp conversion (uses temp dir; Can also be "true")<br/>
`VIDEO_QUALITY_MULTIPLIER` Default=10 (The Integer to multiply the 20-80 Quality value (l param) by to get the target video bitrate in kbps. For example, if multiplier is set to 10. Low(20) sets a target bitrate of 200kbps)<br/>
`AUDIO_QUALITY_MULTIPLIER` Default=2 (The Integer to multiply the 20-80 Quality value (l param) by to get the target video bitrate in kbps. For example, if multiplier is set to 2. Low(20) sets a target bitrate of 40kbps)<br/>
`MEDIA_TIMEOUT` Default=7200 (Set the timeout in seconds for outputted Audio and Video streams)<br/>
`VIDEO_HEIGHT_THRES` Default=360 (Set the maximum video height threshold in Pixels. 480 becomes 480p, etc)<br/>
`VIDEO_WEBM_CPU_USED` Default=7 (sets -cpu-used flag in the libvpx-vp9 video encoder. Current valid values at time of writing are (-8 thru 8) Read more about this [here](https://trac.ffmpeg.org/wiki/Encode/VP9#CPUUtilizationSpeed))

### Heroku

You can deploy this service to Heroku:
Expand Down
Loading