Jump to content

Can --demuxer-lavf-analyzeduration option used to start live tv faster


denz

Recommended Posts

denz

Since this is beta any reason for not trying to reduce the 10 second live tv start by reducing the analyzeduration to a smaller amount.  

--demuxer-lavf-analyzeduration=<value>
Maximum length in seconds to analyze the stream properties.

 

I have finally retired my WMC and now am using WMC UI. got a new mini pc ryzen 7 5700U and it doesn't freeze wmc on full screen but the static content on video is shaking. I had the same thing with a mini pc N100 only it was mpv that the static content was shaking but WMC was freezing on full screen. 

Thank you

Link to comment
Share on other sites

1 hour ago, denz said:

Since this is beta any reason for not trying to reduce the 10 second live tv start by reducing the analyzeduration to a smaller amount.  

The startup lag is not caused by MPV player.
With TVnext, start and channel switching times are in the range of a single second (if transcoding at the server it's plus 0.7-1.2 seconds)  - with MPV and other players and without making any changes to MPV config. 
The time is not lost at the client side.

Link to comment
Share on other sites

denz
Posted (edited)

Didn't know that I assumed since the recordings can start straight away that that was the cause for the live tv to start slow. Using mpv from command line it starts videos immediately but starting network stream it takes much longer. 

Currently I have sports on 3 channels and it's a pain switching between them. In WMC it was near instant for the channels in the same Mux and a second if it wasn't. 

It's all good knowing about TVnext but when will we actually get to try it. 

Edited by denz
  • Agree 1
Link to comment
Share on other sites

14 hours ago, denz said:

Didn't know that I assumed since the recordings can start straight away that that was the cause for the live tv to start slow.

After opening and initializing the tuner (always) and receiving the signal from the tuner (+0-1 s), Emby needs to probe the TV stream first. This is done externally by running ffprobe (+1-2 s). Based on the result and the client capabilities, Emby configures ffmpeg accordingly (+0.x s) When ffmpeg runs, it probes the video stream again (+x s), it needs to wait for a video key frame (+0-1s), then it starts transcoding and writes HLS segments to disk, each of which covers 3 seconds (+3s). After the first segment is created and written to disk and Emby has detected that is is available (+0.x s), it is transmitting the first segment to the client (+0-1s). Only then, it's a matter of how fast the client player will show the first picture.

TVnext can re-use an existing tuner stream (if same mux). All streams go through the server and are processed and parsed there, so no external probing is needed. The parsing (probing) may take 50-200ms, but TVnext doesn't wait for this. It stores and uses the probe result from a previous playback and sets up things immediately as if that information would be correct. It does that setup at 0T, even before it has received anything from the tuner. Only when it would turn out to be wrong (after the probing results are available), it would abandon the preliminary setup and re-create it (nothing has been sent out to the client within those max 200ms). It does not use ffmpeg for creating segments, it does that in memory instead and it sends out the first segment to the client immediately without waiting for the first 3 second segment to be complete. Then it depends on the client player and how long it will wait (building up a small buffer) until it starts playing.

That's roughly why it takes > 8s with current Emby but only 500-1200ms with TVnext (without transcoding, which adds about 1s)

  • Thanks 7
Link to comment
Share on other sites

  • 1 month later...
Peter Nent

Setting video 'Internet Quality', 'Chromecast Streaming quality' and audio 'Internet Quality' NOT on automatically, but to a certain value solved my 'lag' issue. Does this help you ?

Grtz. Peter

Link to comment
Share on other sites

denz
23 hours ago, Peter Nent said:

Setting video 'Internet Quality', 'Chromecast Streaming quality' and audio 'Internet Quality' NOT on automatically, but to a certain value solved my 'lag' issue. Does this help you ?

Grtz. Peter

I think you may be thinking about something else. I am talking about shortening the length of time MPV takes analyzing the stream before it is displaying the video that is coming from HDHomerun. In WMC it takes about a second and it can even less to tune to a HDHomerun channel. In Emby it takes 10 seconds. If you have sports on multiple channels it becomes a pain because tuning to another channel its 10 and then to go back it is another 10. In sports 10 seconds is a long time to miss on the action.  

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...