All Projects → vas3k → pepic

vas3k / pepic

Licence: MIT license
Image and video proxy for my pet-projects

Programming Languages

go
31211 projects - #10 most used programming language
CSS
56736 projects
HTML
75241 projects
Dockerfile
14818 projects

Projects that are alternatives of or similar to pepic

httputils
Http工具包:OkHttp轻量封装 、功能全面、设计力求优雅与纯粹,Java领域前后端处Http问题的新选择。
Stars: ✭ 21 (-40%)
Mutual labels:  upload
Nager.VideoStream
Get images from a network camera stream or webcam
Stars: ✭ 27 (-22.86%)
Mutual labels:  video-processing
nucked-truth-of-files
HollyJS Moscow
Stars: ✭ 14 (-60%)
Mutual labels:  upload
ShotDetection
Open source software that detects shot boundaries in video.
Stars: ✭ 42 (+20%)
Mutual labels:  video-processing
RxUploader
Uploader for Android using RxJava
Stars: ✭ 72 (+105.71%)
Mutual labels:  upload
upload-plugin-sdk
Create plugins to transform files on https://upload.io/
Stars: ✭ 23 (-34.29%)
Mutual labels:  upload
aws-content-analysis
This project is a fully automated video search engine which uses AWS AI services for computer vision and speech recognition to catalog video archives.
Stars: ✭ 67 (+91.43%)
Mutual labels:  video-processing
angular-progress-http
[DEPRECATED] Use @angular/common/http instead
Stars: ✭ 43 (+22.86%)
Mutual labels:  upload
mat-file-upload
A simple & configurable Angular Material file upload component.
Stars: ✭ 14 (-60%)
Mutual labels:  upload
antz
ANTz immersive 3D data visualization engine
Stars: ✭ 25 (-28.57%)
Mutual labels:  video-processing
ffcvt
ffmpeg convert wrapper tool
Stars: ✭ 32 (-8.57%)
Mutual labels:  video-processing
fileupload
🆙 File uploads on steroids for Nette Framework (@nette). Implements blueimp/jquery-file-upload.
Stars: ✭ 28 (-20%)
Mutual labels:  upload
upload-compression-plugin
Compress and decompress files on https://upload.io/
Stars: ✭ 21 (-40%)
Mutual labels:  upload
youtube-video-maker
📹 A tool for automatic video creation and uploading on YouTube
Stars: ✭ 134 (+282.86%)
Mutual labels:  video-processing
react-file-input-previews-base64
This package provides an easy to use, ready to go and customizable wrapper around file input, with option for image previews and returning file as base64 string.
Stars: ✭ 15 (-57.14%)
Mutual labels:  upload
SSffmpegVideoOperation
This is a library of FFmpeg for android... 📸 🎞 🚑
Stars: ✭ 261 (+645.71%)
Mutual labels:  video-processing
laravel-tus-upload
A package for handling resumable file uploads in a Laravel application via the http://tus.io/ resumable file upload protocol.
Stars: ✭ 43 (+22.86%)
Mutual labels:  upload
Face-Recognition-Attendance
Face recognition using OpenCV and developed Advance high speed Attendance System on old CCTV footage
Stars: ✭ 19 (-45.71%)
Mutual labels:  video-processing
Tracktor-ComposeUI
Track the progress of anything in one place
Stars: ✭ 25 (-28.57%)
Mutual labels:  pet-project
Implicit-Internal-Video-Inpainting
[ICCV 2021]: IIVI: Internal Video Inpainting by Implicit Long-range Propagation
Stars: ✭ 190 (+442.86%)
Mutual labels:  video-processing

PEPIC

Pepic is a small app that helps me to upload, store, convert and serve pictures or videos on your server.

I use it as media proxy for my pet-projects and on my blog. Pepic can convert, resize and optimize media files in-flight to save you monies and bandwidth. Internally it uses ffmpeg for videos and vips for images, which means it's quite fast and supports JPG, PNG, GIF, WEBP, SVG, HEIF, TIFF and wide range of video formats.

It's not meant to be used by anyone else except me. Use it only if you're brave. Scroll down this README for better alternatives.

🤖 How to run it locally

This command starts a local server on localhost:8118. Useful for development.

go run main.go serve --config ./etc/pepic/config.yml

⚠️ If you're getting invalid flag in pkg-config error, run export CGO_CFLAGS_ALLOW="-Xpreprocessor" in advance

🐳 Running in Docker

  1. Get Docker

  2. Clone the repo

git clone [email protected]:vas3k/pepic.git
cd pepic
  1. Build and run the app
docker build .
docker run -p 8118:8118 -v ${PWD}/uploads:/app/uploads $(docker build -q .)
  1. Go to http://localhost:8118 and try uploading something. You should see uploaded images or videos in the data directory (./uploads) after that.

  2. Try to resize an image by adding a number of pixels to its URL. For example: https://localhost:8118/file.jpg -> https://localhost:8118/500/file.jpg

  3. Check out the etc/pepic/config.yml file. Some stuff is turned off by default. You can tweak them for yourself and rebuild the docker again (step 3) to apply them.

🚢 Production Usage

⚠️ If you plan to host anything bigger than a blog, always put it behind CDN. CloudFlare offers a free one if you don't hate big corporations :D

Let's say, you want to host it on https://media.mydomain.org

1. Modify etc/pepic/config.yml to your taste

global:
  host: 0.0.0.0 
  port: 8118  # internal host and port, leave it as it is
  base_url: "https://media.mydomain.org"
  secret_code: "secretpass"
  max_upload_size: "500M"

2. Build and run production docker

Don't forget to mount upload volume to store files on host (or you can lose those files when container will be killed).

docker run -p 8118:8118 -v /host/dir/uploads:/app/uploads --restart=always $(docker build -q .)

If you prefer docker-compose, you can use it too. Check out the included docker-compose.example.yml. You can easily transform it into your favourite k8s config or whatever is fashionable this summer.

👍 Don't forger to periodically backup the /host/dir/uploads directory just in case :)

3. Use nginx or your other favourite proxy

Just proxy all calls from the domain (media.mydomain.org) to pepic backend (0.0.0.0:8118). It can handle static files too.

server {
    listen 80;
    server_name media.mydomain.org;

    location / {
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_pass http://0.0.0.0:8118;
    }
}

😍 Contributions

Contributions are welcome.

Open an Issue if you want to report a bug and propose an idea.

TODO

  • Tests :D
  • Upload by URL
  • Crop, rotate and other useful transformations (face blur? pre-loader generator?)
  • Live conversion by changing file's extension
  • Set format and quality during the upload (using GET/POST params?)

🤔 Alternatives

After reading all this, you probably realized how bad it is and looking for other alternatives. Here's my recommendations:

👩‍💼 License

It's MIT.

Contact me if you have any questions — [email protected].

❤️

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].