Jellyfin Forum
How does Jellyfin live transcoding? - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Server Development (https://forum.jellyfin.org/f-server-development)
+--- Thread: How does Jellyfin live transcoding? (/t-how-does-jellyfin-live-transcoding)



How does Jellyfin live transcoding? - theprof - 2024-10-23

How does Jellyfin do live transcoding?

Basically, how is FFMPEG doing the realtime transcoding meanwhile the client's browser is able to fast forward/seek in terms of HTTP?

I'm able to pipe the FFMPEG transcoding output to the browser HTML5 video. However, it keeps downloading and increasing the duration during the playback so it's possible to seek to a specific minute mark until the whole video has been downloaded. How does Jellyfin do it?


RE: How does Jellyfin live transcoding? - TheDreadPirate - 2024-10-23

On a decently spec'd system, ffmpeg is transcoding faster than real time and building up a buffer. If you skip to a part that already has been transcoded, Jellyfin will send the segment from that time stamp. If you skip to a portion of the video where ffmpeg has not yet transcoded, ffmpeg will be restarted at that time stamp and there is usually a noticeable delay of a few seconds for this situation.


RE: How does Jellyfin live transcoding? - KodiUser1138 - 2025-03-05

I'm curious what JF does as it's transcoding, specifically with the new format file it is creating? It saves to the designated hard drive location, correct? How long does it stay there for? (Also is there a discussion for best spec systems I can't yet find)?


RE: How does Jellyfin live transcoding? - TheDreadPirate - 2025-03-05

The transcode files stay in the transcode directory until the client that requested the transcode ends their playback session. At which point Jellyfin immediately cleans up just the transcode files associated with that session.

If Jellyfin happens to crash hard, there is a job in the Scheduled Tasks dashboard that will clean up the transcode directory of any files older than 24 hours. This job runs on startup and every 24 hours after.

As for the "best" specs, it depends on your budget and needs. And whether it will be a dedicated server or mixed use. A lot of people run Jellyfin on their gaming PC. In that situation, I'd recommend an Nvidia GPU for transcoding. For a dedicated server, I'd recommend an Intel dedicated GPU or Intel CPU with an iGPU (this excludes most Xeons and F SKU desktop chips).


RE: How does Jellyfin live transcoding? - KodiUser1138 - 2025-03-06

IS there a setting to adjust how long JF keeps the transcode before trashing it once playback stops? Just thinking of times when you might stop to get snacks, answer the door or something but not be gone longer than 10-20 minutes.

Also likely best for another thread but I'm looking at my options for a purpose built machine down the road and want it to have POWER but not be like Mad Max overkill. Just haven't found a real good build guide.discussion for that.


RE: How does Jellyfin live transcoding? - TheDreadPirate - 2025-03-06

If you pause playback, the files will remain. It is only when you straight up stop playback or close the client that Jellyfin will clean up.

But there is no setting to adjust how long Jellyfin retains transcode files in the event that you unintentionally stop playback.

As for specs when building a dedicated machine, honestly my system specs are a good starting up. Start a separate thread and include your budget, your typical simultaneous user count, and the specs of your current system and what parts you have lying around that you could re-use.


RE: How does Jellyfin live transcoding? - KodiUser1138 - 2025-03-06

I am going to add a feature request for a time toggle on how long to keep full/partial transcode files before culling the transcode folder. Reason being if something causes your connection to end but it will be back up shortly, no need to harness power and compute cycles to re-transcode everything all over again. IU thnk that makes sense?