Jump to content

Use transcoding temp folder or similar to cache direct stream videos


blockdor

Recommended Posts

blockdor

Hi
So if I understand right when a client transcodes a video the server copies the video file to the trancode temp dir, then trancodes the entirety of it and stores it there while someone watches the video.
This is great as my transcode temp is on a SSD, while main files are on HDDs meaning better seeking if needed and the HDD can spin down when transcode is done (Fast for me as i have H/W accel and a dedicated GPU)

I was wondering if this copy to temp folder when someone watches a film could be done for direct play as well?

That way the HDD can do a quick sequential read of the file at start of play then spin down afterwards. 
With multiple users the benefits increase as HDD does 1 big sequential for each film and is unlikely to be serving 2+ files at the same time increasing seek/reducing throughput.

I realise i could do some kind of cache in the filesystem but this would make it much more targeted and reliable.
Also whatever mechanism is in place to remove temp files from transcode folder would apply equally for direct play videos.

Thoughts? In my programmer head it would seem to be really easy to implement given it's just do same as transcode but no FFDShow step.

NB i'm on emby server for linux.
Cheers

Alex

 


 

Edited by blockdor
Link to comment
Share on other sites

Hi, so essentially you want emby server to copy your media to a new location so that it can be streamed from there, rather than the original source. Is that correct?

Link to comment
Share on other sites

That seems like it could cause a large delay to start playing to have to copy a video file, especially if it's several gigabytes or more.

Link to comment
Share on other sites

blockdor

I think I may have confused things by saying direct play when I meant direct stream.

Treat it like you do transcoding and split into tmp/ts chunks and start playing before the "transcode"(copy) is finished.
Just don't bother hooking up any decoding or encoding and boom direct stream cache in the transcode dir.

Sorry got my terminology wrong.

A

 

Link to comment
Share on other sites

blockdor

I suppose another way of looking at it is that when the transcoder is doing

Video codec:
H264 (direct)

Save the H264 chunks to the transcode directory as you would if it was actually transcoding.
And always do direct for video and audio even if unnecessary.

A

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...