mediacenterjs icon indicating copy to clipboard operation
mediacenterjs copied to clipboard

Stream of movie doesn't stop

Open CodingPeak opened this issue 9 years ago • 9 comments

When starting a movie, the stream starts. When returning to the movie overview (and stop watching the movie), the stream of frames doesn't stop, resulting in a quite busy server.

image

CodingPeak avatar Oct 20 '14 21:10 CodingPeak

After a while, an error occurs and the streaming stops as the server restarts.

image

CodingPeak avatar Oct 20 '14 21:10 CodingPeak

This is an interesting one. From one point of view it would be good if the transcoding continues as long as the machine is idle. It will result in instantaneous playback seeing as the movie has already been transcoded. But that only applies when the server is idle. If you continue to use MCJS, it could cause slowdowns and errors.

jansmolders86 avatar Oct 21 '14 11:10 jansmolders86

True, but when switching to another movie, two movies are being streamed.. I don't think that's good..

CodingPeak avatar Oct 21 '14 12:10 CodingPeak

I think perhaps it should carry on transcoding for 5 or so minutes after you've stopped watching, just incase you resume it. And then optionally (as in the user can choose an option in settings) it will carry on after 5 minutes if it's idle. However the problem I have with transcoding is that if it's permanent it will use a lot of disk space as it's basically duplicating your movie library.

Jon889 avatar Oct 21 '14 13:10 Jon889

Also it seems there's a problem with progression markers, which is actually a bug, rather than unimplemented [yet].

Jon889 avatar Oct 21 '14 13:10 Jon889

@Jon889 I belive your latest changes to the transcoding methods may have fixed this issue, correct?

jansmolders86 avatar Nov 27 '14 22:11 jansmolders86

No, it only prevents starting a new transcoding if it's the same movie. If you switch to another movie then still both movies will be transcoding.

It would be good to be able to limit the resources that ffmpeg can use, currently on my machine it will transcode as fast as possible, using all the CPU power and making the fans on my laptop go to full speed, when really it only needs to be transcoding just ahead of the current playback time.

Also I have some movies that are already in mp4 format and don't need to be transcoded to be played back in the browser. So it would be good to detect this and just not transcode in this case at all.

Jon889 avatar Nov 27 '14 22:11 Jon889

I agree, I want to add the MP4 detection as well.

But as far as the trancoding goes, of course you can choose the level of quality but other than that I don't know how I would go about lessening the load on the CPU.

jansmolders86 avatar Nov 28 '14 08:11 jansmolders86

Hey @Jon889,

FYI: MP4 detection has been added! currently if the requested video is an MP4, it will be copied so that the browser can access it (streaming directly from harddisk isn't supported by browsers).

jansmolders86 avatar Dec 05 '14 07:12 jansmolders86