hzeller / gmrender-resurrect

Resource efficient UPnP/DLNA renderer, optimal for Raspberry Pi, CuBox or a general MediaServer. Fork of GMediaRenderer to add some features to make it usable.
GNU General Public License v2.0
850 stars 207 forks source link

gstout-buffer-duration #247

Open antonellocaroli opened 2 years ago

antonellocaroli commented 2 years ago

Hi,

I cannot understand what values this setting accepts (min and max) and what it actually does... could someone please clarify this for me, thank you!!!

mill1000 commented 2 years ago

The usage should be documented under the --help-gstout option.
https://github.com/hzeller/gmrender-resurrect/blob/4ac7d8914dc089651ae9d6c421ecda8f4d0ab5e3/src/output_gstreamer.c#L399-L400

In summary, it accepts a decimal number of seconds to buffer the network stream before playback. The value is scaled to nanoseconds and provided to the gstreamer playbin. https://github.com/hzeller/gmrender-resurrect/blob/4ac7d8914dc089651ae9d6c421ecda8f4d0ab5e3/src/output_gstreamer.c#L515-L522

The minimum value is 0, or no buffer. The maximum value is probably the maximum value of a gint64 (approax 9.2x10e18 ns, or about 292 years).

antonellocaroli commented 2 years ago

I did a test by setting:

--gstout-buffer-duration=300.0

in fact the use of ram changes...and sometimes the play, of course, starts with a certain delay...

so I thought of unplugging the LAN cable to see if the playback would continue (thinking that the stream is stored in RAM), but as soon as I unplugged the cable the playback stops immediately ...

perhaps it would be more functional if there were an input buffer and an output buffer.

mill1000 commented 2 years ago

Playback and buffering are all handled by gstreamer. This project has no control of how the buffering is implemented.