Code Monkey home page Code Monkey logo

kube-plex's Introduction

kube-plex

kube-plex is a scalable Plex Media Server solution for Kubernetes. It distributes transcode jobs by creating pods in a Kubernetes cluster to perform transcodes, instead of running transcodes on the Plex Media Server instance itself.

How it works

kube-plex works by replacing the Plex Transcoder program on the main PMS instance with our own little shim. This shim intercepts calls to Plex Transcoder, and creates Kubernetes pods to perform the work instead. These pods use shared persistent volumes to store the results of the transcode (and read your media!).

Prerequisites

  • A persistent volume type that supports ReadWriteMany volumes (e.g. NFS, Amazon EFS)
  • Your Plex Media Server must be configured to allow connections from unauthorized users for your pod network, else the transcode job is unable to report information back to Plex about the state of the transcode job. At some point in the future this may change, but it is a required step in order to make transcodes work right now.

Setup

This guide will go through setting up a Plex Media Server instance on a Kubernetes cluster, configured to launch transcode jobs on the same cluster in pods created in the same 'plex' namespace.

  1. Obtain a Plex Claim Token by visiting plex.tv/claim. This will be used to bind your new PMS instance to your own user account automatically.

  2. Deploy the Helm chart included in this repository using the claim token obtained in step 1. If you have pre-existing persistent volume claims for your media, you can specify its name with --set persistence.data.claimName. If not specified, a persistent volume will be automatically provisioned for you.

➜  helm install plex ./charts/kube-plex \
    --namespace plex \
    --set claimToken=[insert claim token here] \
    --set persistence.data.claimName=existing-pms-data-pvc \
    --set ingress.enabled=true

This will deploy a scalable Plex Media Server instance that uses Kubernetes as a backend for executing transcode jobs.

  1. Access the Plex dashboard, either using kubectl port-forward, or using the services LoadBalancer IP (via kubectl get service), or alternatively use the ingress provisioned in the previous step (with --set ingress.enabled=true).

  2. Visit Settings->Server->Network and add your pod network subnet to the List of IP addresses and networks that are allowed without auth (near the bottom). For example, 10.100.0.0/16 is the subnet that pods in my cluster are assigned IPs from, so I enter 10.100.0.0/16 in the box.

You should now be able to play media from your PMS instance - pods will be created to handle transcodes, and data automatically mounted in appropriately:

➜  kubectl get po -n plex
NAME                              READY     STATUS    RESTARTS   AGE
plex-kube-plex-75b96cdcb4-skrxr   1/1       Running   0          14m
pms-elastic-transcoder-7wnqk      1/1       Running   0          8m

kube-plex's People

Contributors

billimek avatar casidiablo avatar drewstinnett avatar gandazgul avatar hogtrough avatar msenebald avatar munnerz avatar niksko avatar onedr0p avatar regisbsb avatar simplyzee avatar sputnik13 avatar tedder avatar yoshwata 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  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  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

kube-plex's Issues

Expand the readMe

I'm trying to set this up, bu I have no experience with GO and Helm. I'm not sure how to get started.

Create authentication proxy sidecar container

In order to remove the requirement to authorise the pod network universally without authentication, and to simplify the string replacement performed in the kube-plex binary, we can create an authenticating proxy sidecar container that is run alongside each instance of Plex New Transcoder.

This should listen in 127.0.0.1:32400, and simply proxy requests to the main Plex transcoder if they don't already contain auth headers. This should wrap the problematic ffmpeg call to plex-media-server:32400/.../manifest properly, thus removing the need to allow unauthenticated connections from the rest of the cluster.

Cannot import as a Helm repo

Your effort here is much appreciated. I've been running everything in Docker under Ubuntu 16.04 this year thanks to plexguide.com but would rather run it in IBM Cloud Private (ICP). The bananaspliff repo goes a long way towards enabling the supporting tools and can be directly registered as a Helm repo in ICP. Yours adds PMS to the mix, but for some reason, ICP doesn't register your repo as a Helm repo.

Any chance you can look at BananaSpliff's repo to see if there's something there that's missing from yours? I'd love to be able to deploy PleX and associated tools with Bluemix and compatible services like ICP, and adding your repo to ICP would be a great step towards that. Can't do that until I can get ICP to register your site as a Helm repo.

Thanks!

support nfs mounts in kube-plex?

Was easy enough to modify the main kube plex chart to mount in nfs ephemeral volumes, but the go script looks a bit more complicated and I'm unfamiliar with GO so can't really modify it. Looks like the plex transcode pod generated by the go script expects to be able to read from the directory.

Ideally I'd have this in the values.yaml to allow for overrides:
media: #- name: nfs-tv #path: /media/tv #mountPath: /media/tv #server: myMediaServer #readOnly: true

and then in the deployments yaml I had this:
volumeMounts: {{- range .Values.media }} - name: {{ .name }} mountPath: {{ .mountPath }} readOnly: {{ .readOnly }} {{- end }}
...
volumes: {{- range .Values.media }} - name: {{ .name }} nfs: path: {{ .path }} readOnlly: {{ .readOnly }} server: {{ .server }} {{- end }}

Deployment or StatefulSet

As I'm coming up to speed on k8s, and in particular testing with kube-plex, I'm wondering if perhaps the chart should deploy Plex media server as a StatefulSet instead of a Deployment. I can across this relevant discussion that made me wonder.

helm/charts#1863

My main reasoning is the config directory that has all the metadata, watch history, and I think whatever they use to validate the claim token. Most importantly, every time I mess something up I keep having to helm --purge delete, and this wipes out the config dir, and then I have to relink the claim token. If I'm understanding correctly as a StatefulSet it would, by default, retain and reconnect to the existing PVC every time. The only thing I'm unsure of is if you can still have a NFS PVC for shared storage across other media acquisition deployments, which I guess could make you wonder if their own history should be retained as a StatefulSet as well.

@billimek I saw you in that thread as well and updated other relevant charts.

transcoder pod of starting

I am able to the chart deployed, but when I tried to play a video that start a transcoder, it seems to crashed.

Since the pod crashed, I am not sure how to get debug info out of it.

The only thing I can see:
Containers with unready status: [plex]

image: plexinc/pms-docker:latest
docker: 1.13.1
rancher 2.0.8 on Centos 7
kebelet v1.11.2

Please let me know what other env info you might need.

Support for newer PMS versions

Are there any plans to support newer Plex versions?

The imaged used in values.yaml is a year old at this point, and trying to use anything newer fails to start a transcoder pod.

The error is "Conversion failed. A required codec could not be found or failed to install."

It also appears kube-plex's docker image has not been updated in a year either.

Possible permissions error on first start

Hi, really appreciate this project, it's a great piece of work

I'm trying to get set up, but I'm currently running into some (possibly permissions related) issues when the containers start.

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 40-plex-first-run: executing... 
Creating pref shell
mkdir: cannot create directory ‘/config/Library’: Invalid argument
/var/run/s6/etc/cont-init.d/40-plex-first-run: line 82: /config/Library/Application Support/Plex Media Server/Preferences.xml: No such file or directory
chown: cannot access '/config/Library/Application Support/Plex Media Server': No such file or directory
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
Attempting to obtain server token from claim token
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100     1    0     1    0     0      0      0 --:--:--  0:00:01 --:--:--     0
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
Plex Media Server first run setup complete
[cont-init.d] 40-plex-first-run: exited 0.
[cont-init.d] 50-plex-update: executing... 
failed to load external entity "/config/Library/Application Support/Plex Media Server/Preferences.xml"
[cont-init.d] 50-plex-update: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
Starting Plex Media Server.
/bin/mkdir: cannot create directory ‘/config/Library’: Invalid argument
chown: cannot access '/config/Library/Application Support': No such file or directory

Things I've tried:

  • Creating the required folders manually. I tried creating the Library, Application Support, Plex Media Server and Codecs directories (as I made each one, it then complained about the next one), but eventually that ended up in a similar place. I would get 'Starting Plex Media Server' and then an error about being unable to create a uuid file.
  • Fiddling with owners and permissions on the pvc folder in the nfs share. I tried setting the owner and group of the pvc to the docker user, and passing the PLEX_PID and PLEX_GID env variables with the docker user's values, but this didn't help. Also tried setting the permissions to umask 0777, also didn't help.

Can we have an arm build

I was going to do it my self, but the build instructions are missing and I am not fully sure exactly how you build this project. Ideally, it would be best to provide a multi-architecture docker image.

Feature Request : More customization on Charts from values.yaml

Hi Munnerz !

First of all , really great job on this helm chart. Works like a charm !

I had to make some customizations , and I think It can be pretty good to include them in the base chart.

Here is what would be good I think :

  • Provide some parameters for volumes : Some people will need to use a NFS for making this to work. You should probably allow more customizations on volumes. For exemple , I had to change the volumes sections for shared
      - name: shared
        flexVolume:
          driver: rook.io/rook
          fsType: ceph
          options:
            fsName: nfs-plex 
            clusterName: rook 

That would be good to provide the entire config in values.yml if needed to customize it.

  • SecurityContext : This is related. You should provide option to allow customize securityContext , so right will be managed properly on NFS

  • Ingress : A basic ingress rule would be pretty cool for this chart :)

  • PLEX_GID : This would be very good to have a parameter for that.

Well this is a lot , and I customized that for my need , but I'm pretty sure people would love this in order to allow more customizations from values.yaml.

I know this can be a lot of work , but let me know what do you think about this , and I can help if needed.

Keep rocking 😀

Questions

Does this clienten beingen effected by the error that is taked about here?wnielson/Plex-Remote-Transcoder#27
And does this clientent support multi type cpu. For example some slave are raspberry pi and others are x86 computers?

Any way to "take over" an existing server?

This is more of a question than an issue, but I'll make a PR to the docs based on the answer if it'll help :)

I've got a Plex server already, which I've migrated through all the iterations of my homelab over the past few years - which, as of today, isn't single-node Kubernetes anymore.

I'd like to retain that Plex server's database and migrate to kube-plex to take advantage of the elastic transcoding, but don't want to have to make a "new" server. The README instructs to grab a claim token and spin up a server.

Is there any way to utilize the existing server's database and not provide a new claim token? If not, would copying Plex's DB in after creating it cause any issues with the changed claim token?

kube-plex runs transcode as root, not plex UID/GID.

As far as I can figure out, the elastic-transcoding pod gets started by the kube-plex shim with the entrypoint overidden as the call to the transcoder, not the normal PMS entrypoint. 0 This makes sense, as we don't want to run the whole server, just the transcode job. Additionally, the plex user in the transcode pod is the default, not whatever's been passed via PLEX_UID/PLEX_GID to the PMS pod. (The plex user is altered to match these variables during the first-time setup of the PMS container 1)

This means that the transcoder is running as root, while plex might be running as some other user.

This breaks using remote NFS PVs for persistent transcode storage, as the transcode pod attempts to access the mount using the root user, which might be (for the sake of security) mapped to another user/nobody on the NFS server side.

Somehow, we need to modify the plex user and group within the transcode pod to match the values the server is running, and start the transcode job running as that user.

I have some experimental code 2 to do this, by modifying the entrypoint of the transcode pod to usermod/groupmod the plex user to the provided values, and su the transcode command to be run as that user, but it seems mildly prone to breakage, since in order to run multiple commands as the entrypoint I had to set bash as the entrypoint.

I'm happy to work on a solution, if anyone has any recommendations for a less brittle way to implement this. (Init containers?

Problem with health probes

Hello

I'm trying to get this up and running but am running into problems with the live- and readyness probes. I keep getting Connection Refused on them.

I've already tried to disable the probes so i could connect to the container.
If i then run "curl localhost:32400" or "curl localhost:32400/identity" from within the container i get connection refused on both calls.

Both of my shares are nfs shares and in the config folder the following files are created.
/.bash_history
/Library/Application Support/Plex Media Server/Preferences.xml

I would have expected more than only these 2 files.
Also the xml file contains only the root element with a few attributes and no inner xml - Don't know if there should be more or not.

I use the following script to install kube-plex.
#!/bin/bash
PLEXTOKEN=${1?Error: no plex token given}

kubectl apply -f ns-plex.yaml
kubectl apply -f pvc-config-plex.yaml
kubectl apply -f pvc-shared-media.yaml

helm install plex ./kube-plex/charts/kube-plex
--namespace=plex
--set claimToken=$PLEXTOKEN
--set persistence.data.claimName=pvc-shared-media
--set persistence.config.claimName=pvc-config-plex
--set persistence.config.subPath=plex
--set ingress.enabled=false
--set timezone=Europe/Copenhagen

My kubernetes is setup as a single control plane as i only have 1 machine.
I use calico as my network plugin.
My nfs shares are located on a nas - In the unlikely event that the shares could have some influence on the issue.

I have run out of ideas for debugging this myself so i'm hoping to get some input here.
Please let me know if there is any other information needed to help diagnose this.

Sub directories under data dir are not owned by plex

The mounted claim under data directory have root as the owner, I even tried to update the deployment and passed the uid and gid, however the sub directories still owned by root. Not sure if this is being developed actively but, great concept!

Add versioning

This seems to be pretty active. There's a bunch of dockerhub pushes of this code. There's no version on it. Nor tag. Seriously if you're going to push anything to dockerhub at least put a tag on the github version you built it from. Ideally you should have a matching github and dockerhub version or at least a git checksum.

Unable to pull image with containerd

crictl pull quay.io/munnerz/kube-plex:latest

FATA[0000] pulling image failed: rpc error: code = Unknown desc = failed to pull and unpack image "quay.io/munnerz/kube-plex:latest": failed to copy: httpReaderSeeker: failed open: could not fetch content descriptor sha256:13fffb730e53e451a6be2c649c4da3dfb252bb411802ce87f9f704d602d3a195 (application/vnd.docker.distribution.manifest.v1+prettyjws; charset=utf-8) from remote: not found

However docker is able to pull it fine

docker pull quay.io/munnerz/kube-plex:latest                                                                                                                                                                       12:07:11
latest: Pulling from munnerz/kube-plex
6d987f6f4279: Already exists 
e27030d5c9de: Already exists 
Digest: sha256:13fffb730e53e451a6be2c649c4da3dfb252bb411802ce87f9f704d602d3a195
Status: Image is up to date for quay.io/munnerz/kube-plex:latest

I am guessing something with the image is breaking containerd.

I found this related issue containerd/containerd#2840 that may or maynot be related. I am able to pull other quay images perfectly fine so it may just be the kube-plex image.

Easier setup instructions

I thought I was being stupid as after hours of trying to set this up on Google Cloud; I kept running into errors. After numerous Googles all I found was people in the same situation. Every post I found were people saying the instructions were useless. Would be great to have some instructions on how to set this up on services such as Google Cloud.

Transcode pod is not created with subpath

When i play a video that requires transcoding, the transcode pod dies immediately with the following logs:

container_linux.go:247: starting container process caused "chdir to cwd (\"/transcode/Transcode/Sessions/plex-transcode-4prvaib6gcbct1asr5v9iqce-95126e93-4ec7-46e7-b0ee-5bb2edefb44e\") set in config.json failed: no such file or directory"

however, I'm not quite sure why this is happening. When i enter the main plex container i can see the dir:

kubectl exec -it plex-kube-plex-65564f564c-b5b7p bash
root@plex-kube-plex:/# ls transcode/Transcode/Sessions/
plex-transcode-4prvaib6gcbct1asr5v9iqce-95126e93-4ec7-46e7-b0ee-5bb2edefb44e

any ideas?

Making timezone configurable

Currently the timezone is hardcoded the Europe/London. This should be a var configurable via values.yaml on the helm install.

Version kube-plex images

There should be some form of versioning of the kube-plex image so users can choose the correct version of kube-plex to use with PMS.

expose ADVERTISE_IP

In order for smart devices, like TVs with the Plex app, to hit the plex server, it needs to have the ADVERTISE_IP set to the IP of the l4 load balancer. I did this locally setting the ENV var and exposing it as an option in values yaml - would be cool if it could figure out what the L4 LB IP was and set it manually rather than me doing it after deployment.

Optimized files fail during transcoding

if you set up a claim for data, this only gets set as readonly for pms-elastic-transcoders, as seen in main.go file. This causes issues when optimizing videos and you wish to keep them in the same directory as them.

Looking for servers

Hi, this looks great, however... I just deployed this in my home network (with an ingress and rook storage), and upon visiting the application URL, <url>/web/index.html is stuck "Looking for servers....". Not sure where to start debugging this; the pod looks happy with its log ending in "Starting Plex Media Server."

Provide option to disable remote transcoding

The chart provided in this repository could be generally useful as a mechanism to deploy Plex on Kubernetes. We should provide an option to disable the remote transcoder functionality (i.e. don't replace Plex Transcoder) so that users can deploy a normal plexmediaserver instance as well. The chart could then potentially be submitted upstream to https://github.com/kubernetes/charts

Transcoder Not Working

Trying to play a video through the web interface and all i see is this in the logs.

[tcp @ 0x42c8d00] Connection to tcp://127.0.0.1:32400 failed: Connection refused
[libx264 @ 0x341d4c0] frame=37510 QP=23.01 NAL=2 Slice:P Poc:40  I:44   P:484  SKIP:642  size=6108 bytes
[http @ 0x445d4a0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x437ad60] Connection to tcp://127.0.0.1:32400 failed: Connection refused

The video will not play. From the looks of your go code, you're replacing three arg values for the transcoder with the PMS master address. The command I am seeing on the transcoder is. I see there are being replaced though I only see two.

/usr/lib/plexmediaserver/Plex Transcoder -codec:0 h264 -codec:1 aac -i /data/test.mkv -filter_complex [0:0]scale=w=720:h=406[0];[0]format=pix_fmts=yuv420p|nv12[1] -filter_complex [0:1] aresample=async=1:ocl='stereo':osr=48000[2] -map [1] -codec:0 libx264 -crf:0 21 -maxrate:0 1331k -bufsize:0 2662k -r:0 29.969999999999999 -preset:0 veryfast -x264opts:0 subme=2:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 expr:gte(t,0+n_forced*3) -map [2] -metadata:s:1 language=eng -codec:1 aac -b:1 162k -f dash -min_seg_duration 3000000 -skip_to_segment 1 -time_delta 0.0625 -manifest_name http://plex-kube-plex:32400/video/:/transcode/session/ohqao3aqifnu71c7yt27kwbu/6f575c59-5583-4953-b794-3b46605c68cd/manifest -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -movflags +faststart dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel debug -loglevel_plex debug -progressurl http://plex-kube-plex:32400/video/:/transcode/session/ohqao3aqifnu71c7yt27kwbu/6f575c59-5583-4953-b794-3b46605c68cd/progress

Transcode not working

Hi,

I just deployed the chart in a K8s 1.14.1 cluster, using NFS PVC. The PMS server starts correctly and when transcoding the stream fails with the following errors in the transcoding pod:
[tcp @ 0x7f040c047a00] Connection to tcp://127.0.0.1:32400 failed: Connection refused [libx264 @ 0x33d9d60] frame=1455 QP=30.87 NAL=2 Slice:B Poc:350 I:0 P:11 SKIP:499 size=86 bytes [http @ 0x357d8c0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy' [tcp @ 0x33d94c0] Connection to tcp://127.0.0.1:32400 failed: Connection refused

Checked if the no auth network multiple times and It were correctly configured (I tried multiple values) to no avail.

Greets

cert-manager and SSL for reverse proxy, insecure connections

Edge case here. I have this plex chart up and behind nginx-ingress. However my connections are Insecure when streaming, even though SSL is enabled and working for the Plex Web UI from my https://plex.mydomain.com domain.

Does anyone have this working? My guess is I need to add the pfx file to my Plex server settings but I don't know how to obtain this from cert-manager (or better yet automated creating a pfx file). Since @munnerz is a maintainer of both these projects maybe he can chime in with some knowledge.

Thanks!

Investigate ways to speed up transcode job start time

Right now there's an approx 15s delay when playing media due to k8s scheduling, launching the pod, mounting volumes etc.

We could investigate improving this time by keeping some 'warm' transcoders. This would require a bit of an architectural change, but is absolutely possible.

unknown flag: --name

Hello everyone
would it be a different way to install?
thanks

helm install ./charts/kube-plex --name plex \
--namespace plex
--set claimToken=XXX \
--set persistence.data.claimName=existing-pms-data-pvc
--set ingress.enabled=true

Error: unknown flag: --name

Transcoder Not Working

Trying to play a video through the web interface and all I see is this in the logs.

[tcp @ 0x42c8d00] Connection to tcp://127.0.0.1:32400 failed: Connection refused
[libx264 @ 0x341d4c0] frame=37510 QP=23.01 NAL=2 Slice:P Poc:40  I:44   P:484  SKIP:642  size=6108 bytes
[http @ 0x445d4a0] Setting default whitelist 'http,https,tls,rtp,tcp,udp,crypto,httpproxy'
[tcp @ 0x437ad60] Connection to tcp://127.0.0.1:32400 failed: Connection refused

The video will not play. From the looks of your go code, you're replacing three arg values for the transcoder with the PMS master address. The command I am seeing on the transcoder is. I see there are being replaced though I only see two.

/usr/lib/plexmediaserver/Plex Transcoder -codec:0 h264 -codec:1 aac -i /data/test.mkv -filter_complex [0:0]scale=w=720:h=406[0];[0]format=pix_fmts=yuv420p|nv12[1] -filter_complex [0:1] aresample=async=1:ocl='stereo':osr=48000[2] -map [1] -codec:0 libx264 -crf:0 21 -maxrate:0 1331k -bufsize:0 2662k -r:0 29.969999999999999 -preset:0 veryfast -x264opts:0 subme=2:me_range=4:rc_lookahead=10:me=dia:no_chroma_me:8x8dct=0:partitions=none -force_key_frames:0 expr:gte(t,0+n_forced*3) -map [2] -metadata:s:1 language=eng -codec:1 aac -b:1 162k -f dash -min_seg_duration 3000000 -skip_to_segment 1 -time_delta 0.0625 -manifest_name http://plex-kube-plex:32400/video/:/transcode/session/ohqao3aqifnu71c7yt27kwbu/6f575c59-5583-4953-b794-3b46605c68cd/manifest -avoid_negative_ts disabled -map_metadata -1 -map_chapters -1 -movflags +faststart dash -start_at_zero -copyts -vsync cfr -y -nostats -loglevel debug -loglevel_plex debug -progressurl http://plex-kube-plex:32400/video/:/transcode/session/ohqao3aqifnu71c7yt27kwbu/6f575c59-5583-4953-b794-3b46605c68cd/progress

A question about distribution of transcoding

Hey folks,

Sorry I have a small question about this awesome piece of software.

Is it possible to distribute one transcode job over multiple pods or is it 1 transcoding pod per video stream?

Persistent Data Stores

I've created the data store for testing purposes but during the pod creation it creates the PVC but doesn't create the PV.
I've then manually created the PV for it and tied it back to the namespace for both default and plex and sometimes it picks it up and other times it doesn't. Thank you for your awesome work on this and I'm looking forward to getting this setup to take advantage of learning kubernetes and getting this running off in OVH land. Thanks.

Plex pod can't reach internet.

Hello, love the idea of moving my Plex to this. I'm using microk8s on a single-node cluster that utilizes MetalLB (from the latest built-in microk8s snap release) and I've got a running pod that I can reach through the browser on port 32400 and begin configuring. Problem is I can't Claim the server, and when it tries to crawl for info, it gets nothing.

Having finally made it this far, I'm stopped in the last mile by what appears to be my pod having no access to outside internet. New to this process, please tell me what information I can provide for resolution. Thanks in advance!

tmpfs ram for transcode volume?

Has anybody using kube-plex considered using ram for transcoding or was that a passing fad? It seems you'd need to define an EmtpyDir volume, since by definition it's not a "persistent" volume you can associate.

Architecturally, does the distributed transcoding rely on shared storage or a network socket to pass data back from worker to stream out? Haven't quite gotten that to work yet either, but I guess that could potentially be a show stopper to my tmpfs idea.

Scalable-- meaning?

Great repository, James, just curious as to what is meant by scalable; can a transcode be distributed across multiple machines? Or does it simply allow a larger number of concurrent streams?

I've got access to a lot of motherboards with integrated quad-core Atom CPUs, and they're okay, but they seem to struggle with larger media files (buffering), but as a cluster, I'm wondering what the possibilities are.

I've got a bunch of cloud resources too and an unlimited Google Drive account that I'm playing with via Fuse, let me know if you'd like to play with my toys at some point, you definitely have some nice ideas. One server has a symmetrical 700mb connection.

Integrate UnicornTranscoder

There is now a docker container for UnicornTranscoder & UnicornLoadBalancer.

We should consider what it would look like to integrate the UnicornTranscoder 'system' into kube-plex.

From this comment:

I have made available a suite of Docker containers that will run alongside an unmodified Plex container. I have been using these containers in production for weeks without issue. The transcoding container will query the designated Plex Server for its current version and then gather the corresponding codec and EAE versions automatically at startup -- the user will no longer need to modify config files or environment variables. I have been using this with my PlexPass servers with are set to auto-update.

Maybe kube-plex (at least the helm chart) could be extended to support this?

Quick start guide

Hi and thanks for your work!

Would you be able to write up a little quick start guide for people like myself who are new to Kubernetes and may have limited experience with Google Cloud / AWS / Azure?

I am running a machine with Proxmox and a Plex VM, but CPU resources are very limited on this machine. I feel like elastic transcode could be my savior.

Hardware transcoding

It looks like the current implementation does not support gpu hardware transcoding. From my understanding, we just need the NVIDIA/AMD drivers in the plex containers to make this happen. I can work on this if you have some direction.

integrate Tautulli?

Is there any interest in adding an optional integration with Tautulli in kube-plex?

As the Tautilli (formerly plexpy) implementation requires access to the Plex logs in the plex runtime filesystem, running this as a sidecar seems like a logical choice.

If this is something that would be accepted, I'm happy to take a crack at a PR to implement this feature.

readinessProbe & livenessProbe?

There is currently no readiness or liveness probes. Can we consider adding something like this?

        readinessProbe:
          tcpSocket:
            port: pms
          initialDelaySeconds: 5
          periodSeconds: 10
        livenessProbe:
          tcpSocket:
            port: pms
          initialDelaySeconds: 15
          periodSeconds: 20

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.