{"id":13908590,"url":"https://github.com/kirbs-/video-transcode","last_synced_at":"2025-04-12T06:10:16.784Z","repository":{"id":45122564,"uuid":"174617935","full_name":"kirbs-/video-transcode","owner":"kirbs-","description":null,"archived":false,"fork":false,"pushed_at":"2023-09-17T10:38:36.000Z","size":171,"stargazers_count":10,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-23T15:47:14.160Z","etag":null,"topics":["comskip","plex","plex-media-server","transcoder","transcoding-server"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirbs-.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-03-08T22:16:47.000Z","updated_at":"2024-08-09T20:53:12.000Z","dependencies_parsed_at":"2024-04-16T03:43:23.800Z","dependency_job_id":"e9bd91fc-813c-4157-a5af-6ab720a2576d","html_url":"https://github.com/kirbs-/video-transcode","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbs-%2Fvideo-transcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbs-%2Fvideo-transcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbs-%2Fvideo-transcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirbs-%2Fvideo-transcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirbs-","download_url":"https://codeload.github.com/kirbs-/video-transcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["comskip","plex","plex-media-server","transcoder","transcoding-server"],"created_at":"2024-08-06T23:02:50.947Z","updated_at":"2025-04-12T06:10:16.759Z","avatar_url":"https://github.com/kirbs-.png","language":"Python","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# video-transcode\n\nSimplified commercial cutting and transcoding for Plex DVR. \n\nvideo_transcode removes commercials and transcodes Plex recorded TV shows to smaller file. A 60 minute DVR show starting at ~5GB mpeg2 .ts file is reduced to a ~40-42 minute ~800MB h.265 .mkv file with little quality loss.\n\nThe service also supports Nvidia GPU transcoding, controls how intensive transcoding is on a machine and what time of day trnascoding can happen. e.g. only transcode overnight, limit 1 transcode at a time, etc.\n \n\n- Quickstart\n- How do I use this?\n- Docker Setup\n- Configuration Options\n- Manual installation\n\n\n## Quickstart\n\n1. Install video_transcode with `pip install video_transcode`\n2. Create docker-compose.yaml\n\n    ```docker\n    version: '3'\n    services:\n        redis:\n            restart: unless-stopped\n            image: redis:alpine\n            ports:\n                - \"6124:6379\"\n        video:\n            image: kirb5/video-transcode\n            restart: unless-stopped\n            depends_on:\n                - \"redis\"\n            volumes: \n                # REQUIRED! Folder containing Plex DVR recordings on host must be maped to /home/plex inside container\n                - ./plex:/home/plex\n\n    ```\n\n3. Start `docker-compose up`\n4. Add a video file to the transcoding queue with `video-transcode \"MacGyver - S04E01 - Fire + Ashes + Legacy = Phoenix.ts\"`\n\n\n# Usage\n## Basic usage\n`video-transcode input_file.ts`\n\n## Plex postprocessing setup \nConfiguring Plex to use video-transcode for post processing requires:\n1. Symlink video-transcode executable to DVR post processing script folder. The exact path to this folder is visible within Plex DVR settings under Postprocessing Script (see red highlight below). \n```bash\n$ ln -s $( which video-transcode ) /path/to/plex/Library/Application/Support/Plex\\ Media\\ Server/Scripts/video-transcode\n```\n2. Add absolute path of symlink to Postprocessing Script section in DVR settings (see orange highlight below).\n\n![](docs/static/dvr-setting.png)\n\n\n# Docker\nDocker image is prebuilt with Nvidia HEVC and AVC encoding/decoding support for GPU accellerated transcodes. The image requires access to a Redis server. Specify the server's URL in CELERY_BROKER and CELERY_RESULT_BACKEND keys in video_transcode/config/config.yaml\n\n## Nvidia GPU Transcoding (NVENC)\n#### Prerequisites\nDocker 19.03+ and (nvidia-container-toolkit)[https://github.com/NVIDIA/nvidia-docker] are required for GPU transcoding. ffmpeg built with cuvid and nvenc support using nv-codec-headers 9.1.23.1, CUDA 10.2 and Nvidia driver 440.82.\n\n#### Setup\nAs of 7/2/20 docker-compose does not support `--gpus` flag in Docker 19.03. Manually setting up the service is the only option for now.\n1. Install video_transcode with pip\n2. Create network in docker\n3. Create redis container\n4. Create video_transcode container\n\n\n# Configuration\n#### video_transcode\n\n#### celery\n\n\n# Manual Installation\n1. Install ffmpeg\n2. Install redis \n3. Install comchap\n4. Install comskip\n3. Install video-transcode\n4. make\n5. start service\n6. Add video-transcode script path to Plex post processing.\n\n\n# Architecture\nvideo_transcode stack includes:\n- ffmpeg\n- Compskip/comchap\n- celery\n- redis\n\n\n# To Do\n- Configurable UID/GID\n- Pass additional ffmpeg options\n- Port comcut to Python\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirbs-%2Fvideo-transcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirbs-%2Fvideo-transcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirbs-%2Fvideo-transcode/lists"}