linuxserver / docker-jellyfin

GNU General Public License v3.0
647 stars 97 forks source link

Attempting hevc (native) -> h264 (h264_omx) transcode automatically disables h264_mmal decode #43

Closed ikaruswill closed 4 years ago

ikaruswill commented 4 years ago

linuxserver.io

If you are new to Docker or this application our issue tracker is ONLY used for reporting bugs or requesting features. Please use our discord server for general support.


Expected Behavior

hevc (native) -> h264 (h264_omx) transcodes should not automatically uncheck h264 hardware decoding.

Current Behavior

Transcoding a h264 -> h264 file right after enabling h264 hardware decoding works:

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (h264_mmal) -> h264 (h264_omx))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))

However, after attempting a hevc (native) -> h264 (h264_omx) transcode:

Stream mapping:
  Stream #0:0 -> #0:0 (hevc (native) -> h264 (h264_omx))
  Stream #0:1 -> #0:1 (opus (native) -> mp3 (libmp3lame))

h264 hardware decoding will be unchecked magically.

When trying the same h264 -> h264 transcode on the same file, we see this:

Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> h264 (h264_omx))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))

Steps to Reproduce

  1. Enable h264 hardware decoding in Admin -> Playback -> OpenMax OMX
  2. Play any HEVC file from a device that does not support Direct Play (Chrome browser)
  3. Refresh Admin -> Playback -> OpenMax OMX
  4. See that h264 hardware decoding becomes unchecked

Environment

OS: Raspbian (RPi4B 4GB) CPU architecture: arm32
How docker service was installed: Running k3s on cri-o

Command used to create docker container (run/create/compose/screenshot)

---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: jellyfin
  labels:
    app: jellyfin
spec:
  replicas: 1
  selector:
    matchLabels:
      app: jellyfin
  strategy:
    type: Recreate
  template:
    metadata:
      labels:
        app: jellyfin
    spec:
      containers:
      - image: linuxserver/jellyfin:v10.5.5-ls52
        imagePullPolicy: IfNotPresent
        name: jellyfin
        env:
        - name: PUID
          value: '1000'
        - name: PGID
          value: '1000'
        - name: TZ
          value: Asia/Singapore
        ports:
        - name: http
          containerPort: 8096
        readinessProbe:
          tcpSocket:
            port: http
          failureThreshold: 1
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        livenessProbe:
          tcpSocket:
            port: http
          failureThreshold: 3
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 2
        resources:
          requests:
            memory: 384Mi
            cpu: 500m
          limits:
            memory: 512Mi
            cpu: 2000m
        securityContext:
          privileged: true
        volumeMounts:
        - mountPath: /config
          name: config
        - mountPath: /data
          name: media
          readOnly: true
        - mountPath: /archive
          name: archive
          readOnly: true
        - mountPath: /opt/vc/lib
          name: omx-libs
          readOnly: true
        - mountPath: /dev/vcsm
          name: omx-vcsm
        - mountPath: /dev/vchiq
          name: omx-vchiq
        - mountPath: /dev/video10
          name: v4l2-video10
        - mountPath: /dev/video11
          name: v4l2-video11
        - mountPath: /dev/video12
          name: v4l2-video12
      nodeSelector:
        kubernetes.io/hostname: l1
      restartPolicy: Always
      volumes:
      - name: config
        hostPath:
          path: /mnt/flash/persistent/jellyfin
          type: Directory
      - name: media
        hostPath:
          path: /mnt/hdd
          type: Directory
      - name: archive
        persistentVolumeClaim:
          claimName: nfs-media-archive
      - name: omx-libs
        hostPath:
          path: /opt/vc/lib
          type: Directory
      - name: omx-vcsm
        hostPath:
          path: /dev/vcsm
      - name: omx-vchiq
        hostPath:
          path: /dev/vchiq
      - name: v4l2-video10
        hostPath:
          path: /dev/video10
      - name: v4l2-video11
        hostPath:
          path: /dev/video11
      - name: v4l2-video12
        hostPath:
          path: /dev/video12

Docker logs

Nothing in the logs reflects why it happens.

aptalca commented 4 years ago

That's an upstream issue and they seem to be aware: https://github.com/jellyfin/jellyfin-ffmpeg/issues/29#issuecomment-613489257 You can open an issue in the jellyfin repo if there isn't one already

ikaruswill commented 4 years ago

Thanks for getting back @aptalca. Will go ahead and check out that issue. Appreciate it.