tunarr icon indicating copy to clipboard operation
tunarr copied to clipboard

Remove Plex transcoder

Open chrisbenincasa opened this issue 1 month ago • 0 comments

The original DTV streaming code had the option of invoking the Plex transcoder to use as the normalization pipeline for a channel. This allowed the user to attempt to run their channels with a local instance of FFMPEG. There are a few pros/cons to allowing this option:

Pros:

  1. Plex transcoder can handle some special cases, like HDR tonemapping (theoretically we could handle this too, but it's out of scope right now and non-trivial to do for Dynamic HDR items for a live stream
  2. It in theory simplifies setup by reusing a user's Plex transcoding setup, which probably exists before they install Tunarr
  3. Plex has a handful of folks working on their transcoder pipeline -- theoretically making it more robust

Cons:

  1. Plex transcoder is opaque to us -- the API is not public or documented, the implementation we have is likely based off of watching how the Plex web app interacts with the transcoder. This makes it hard to maintain
  2. If the user wants to use features like watermark, it will require a local ffmpeg invocation, which potentially leads to double-encoding and generation loss
  3. We lack complete control over the stream by relinquishing control to the Plex transcoder; Plex's system has a separate use-case then us and thus it's unlikely their pipeline is optimized for concatenated playback of different filetypes.
  4. Invoking the Plex transcoder slows down the TTFB when initializing a stream.
  5. To counter pro point 2, using the Plex transcoder takes some flexibility away from the user
  6. We are bound to Plex's custom FFMPEG version
  7. We have another variable in our matrix of version support FFMPEG + Plex version, which makes it hard to create reproducible setups for users

At the end of the day, I think using the Plex transcoder just leads to overly complex with limited benefit. Since with #440 we are likely making FFMPEG required, it skews this even more towards the idea that we should remove the Plex transcoder path entirely and effectlvely "enable force direct play" for all users.

chrisbenincasa avatar May 16 '24 11:05 chrisbenincasa