GithubHelp home page GithubHelp logo

brenekh / encodarr Goto Github PK

View Code? Open in Web Editor NEW
59.0 2.0 6.0 6.16 MB

Self-hosted web app for encoding files to a target format using distributed computing.

License: Mozilla Public License 2.0

Dockerfile 0.58% HTML 1.63% CSS 0.72% Go 74.17% TypeScript 22.89%
video encoding transcoding media homeserver go golang golang-application typescript react

encodarr's People

Contributors

brenekh avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

encodarr's Issues

Run a health check against dispatched jobs

The Controller should perform some sort of health check to make sure runners are still running their jobs. It could be as simple as recording the last time they checked in and seeing if it was over an hour ago (the exact time would be configurable).

Media inspection

Would generate graphs and provide insights on the type of media in the monitored library. Things like video codecs, audio channels/codecs, and whether or not have subtitles are likely candidates for information to show.

Future Runner API Improvements

IMO, the complete signal portion of the API (POST /job/complete) is a bit clunky.

Certain elements can be computed server-side (datetime completed, and filename). And the nested json may have been nice for the Python version, but the Go version doesn't make it nearly as easy.

Customizability

Add some way to modify settings such as file system check interval and tv show optimized queue.

This is probably easiest done as another section to the Web UI (Settings or something) and a matching /config/config.json storage file.

Build Scratch-Based Docker Images

It would be advantageous to build a runner docker image that doesn't rely on a package manager to download FFmpeg.

A possible source of these binaries could be https://johnvansickle.com/ffmpeg/, but the licensing needs to be looked at. I assume it'd be fine to download using curl or wget and put into a docker image, but I'm not 100% on that just yet.

Use files table in DB to skip mediainfo

Instead of completely skipping a file that has the same modtime, it should only skip running mediainfo on the file. This also means that the files table needs to be updated to cache the mediainfo data.

Making this change means that the user can change the requirements (target codec and stereo audio) and the Controller will instantly start queueing files instead of waiting for the modtime to change.

Allow Runners to cancel their jobs

Not sure how to make sure only the Runner that owns the job can cancel it, but it would be nice to allow Runners to cancel their job to allow resources back to the system. The Controller would just appendleft it back into the queue.

Show each Library's queue

I'm thinking a button that brings up a modal of the queue is a good way to show it in the Web UI, instead of displaying it in the Libraries tab directly.

Notifications

It could be nice to send notifications when a file is queued and when a file is started/finished.

Jobs get deployed to "Phantom" runners

Essentially, if a Runner disconnects from the Controller, that new job request will still be handled and the job will have to be cleaned up by the Runner health check before it can be worked on.

Rename files (as a plugin)

Plugins could have the ability to rename the file, which would allow for a plugin to replace outdated codec info stored in the filename with more up-to-date data, or strip it out completely.

Runner modes

Runner modes would allow users to set what jobs a runner does based on media information.

Strange Runner health check behavior

I need to investigate more, but it seems that the last_updated value in the dispatched_jobs table isn't getting set and then the health check invalidates the job.

Allow importing a Handbrake preset

This is definitely down the line (when plugins get implemented), but it would be nice to import a Handbrake preset file and make the runners convert using those exact specifications. The only issue I foresee currently is detecting when a media file is already compliant with the preset.

Uniform HTTP Headers

Currently, headers are a combination of x--prefixed and rc/redcedar-named. The new convention should be all first-letter capitalized, with RedCedar (or whatever the name ends up being) being the first word in the header name.

Queue icons on running job cards

I think it would look nice and be pretty informative if the icons used in the queue were also on the running job card. I'm thinking probably stacked on top of each other to the right of the filename.

Reduce amount FFmpeg fluff that the Runner needs to parse through

FFmpeg's default output gives a lot of information about copyright and the media that the Runner needs to parse through before getting to the stats we care about. The arguments -hide_banner, -loglevel warning, and -stats should give a more parseable output.

Fixup README

The README needs a big overhaul so that it reflects the current state of the project.

Release artifacts

This is more of a mental note than an actual issue, but both the Controller and the Runner should be available as docker images, but the Runner should also be available as a standalone binary (maybe even a GUI).

Embed webfiles using Go 1.16 //go:embed directive

Go version 1.16 adds the ability to embed files into the final executable using the //go:embed directive. This is a fantastic option for the web interface resources so that they don't need to be extracted with an installer.

Send files via HTTP

Currently, the Runners have to be attached to the storage media in a similar manner to the Controller, but that can cause weird permissions issues among other problems. A much more robust solution is to go with the original plan and send the files to the Runners.

Check if completed file should actually be copied back into the folder

If a Job that is running is replaced with a new file(for example, the file is upgraded), Encodarr will still copy the completed file even though it is not relevant.

The problem is detecting this kind of change. A hash could be computed when the Job is dispatched/generated and checked again when the file is ready to be copied back. This only works for files named the same, but some file existence checks could supplement that as well.

Whatever the solution, it probably should be an option for the user.

Speed up json operations

https://github.com/goccy/go-json is a project that claims to significantly increase the speed of encoding and decoding json.

This may be useful because we have database data that is stored as a slice of bytes because SQLite doesn't support serializing them. One such operation is the scanning of the filesystem (reading and writing to the files table mostly), which does seem to take some time to complete.

Different queue types

Currently, the job queue prioritizes TV Shows over Movies, but other options should be available such as prioritizing only stereo audio track over any encoding to HEVC.

Don't use encoded file if it is larger than the original

Previous versions of RedCedar would sometimes leave larger files than what it started with. When only adding a stereo audio track, some size increase is to be expected, but if the file is being converted to HEVC, then the goal is for the file to be smaller not larger.

About section in the Settings tab

Include:

  • Controller version
  • Web API and Runner API supported versions
  • License Info This project is licensed using the GNU Public License v2 (or whatever I end up choosing)
  • Link to the project GitHub

Way to test settings

Basically would cut a clip the user selects to the length they specify and then send it to a Runner and see what happens. Would be very beneficial for testing things like Codecs and Container formats, but also isn't necessarily necessary since a user could do it on their own.

API version negotiation

The current idea is for the Controller to advertise which API versions it supports and then the Runner can determine which to use.

Controller doesn't save to $config/dispatched_jobs.json

I need to investigate further, but something about the move to Go broke the saving to dispatched_jobs.json. I think that the problem might be more recent and possibly related to the introduction of the options package.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.