-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Add AWS support for downloads #11
base: master
Are you sure you want to change the base?
Conversation
Thanks for this PR, do you use Rclone to mount your bucket in Plex? For the code style, it's nice but a lot of important comment were removed (in the image resizer part), because it's a Plex reimplementation it could be nice to keep all the comments 😊 I preferer AirBnB codestyle, is it possible to switch on it? |
I can change eslint to use the airbnb rules and make prettier’s configuration closer to airbnb, but prettier is opinionated and has its own style. I use it because it’s the only JS code style tool that I know of that is deterministic (it parses the code into an AST and will always give the same output style). Did it remove comments? I didn’t notice. I’ll fix that when I’m at my dev computer next. |
Oh, and I use s3fs. I’ve been able to achieve exceptional performance with it. With a c5.large and an S3 VPC endpoint, I get constant speeds of 1Gbps per transfer and bursts up to 6Gbps. I don’t use the cache on the transcoder instances. |
I checked this commit again and after a talk with @drouarb, we'll introduce a generic "FileResolve" API soon, the UnicornLoadBalancer will call each resolver to transform the original path to an HTTP link (for download / transcoders). I think it will be easier to support new providers/resolvers, what do you think ? |
I think that would be a good idea, even if the transcoder is downloading from the load balancer. The Plex Transcoder version of ffmpeg supports pipe as an input, so we don’t even need to write it to disk. |
Why do you want to pipe data to ffmpeg? It also support HTTP(s) link directly ✌ |
Oh, I didn’t realize it supports links directly. That could definitely be good. I’m about to reformat this PR to be more like airbnb style and then start working on making UnicornTranscoder report transcoding speed to CloudWatch Metrics for autoscaling. I’m also going to make UnicornLoadBalancer aware of autoscaling groups so that it can change desired count from 0 to 1 (to start the first transcoder). |
Transcode speed can be handled on "/progress" route called by ffmpeg |
Changed to follow airbnb style. What do you think? Also, I couldn't find any comments that were removed. |
My bad, a mistake on my side, sorry |
I'm working on the It's not tested and not implemented, but it give you an idea of how it will be interfaced ✌ |
I have to take a break from developing on this for now. I have final projects due in two programming classes, so that’s going to have to take precedence. I intend to work on this project more once I have the time again. |
Hi,
I don't know if these types of changes are desired or not, but I figured I'd offer.
This changeset adds support for S3/CloudFront signed URLs to allow secure downloading directly from AWS.
I also formatted the code using prettier, added an eslint configuration file, and added a Sublime Text project. I can remove the configuration files, but unformatting the code wouldn't be practical.
Are you interested in these changes? I'm planning on more AWS stuff like spinning up EC2 instances on demand.