Hey. I'm not sure that you can do anything better at the moment. Initializing
the decode process with Gstreamer requires some work and this is what is
causing the lag that you are seeing. While it possible in the gstreamer
framework to rewind a file, it's not obvious how to make use of that in
liquidsoap.
One thing you might be able to do is to use `request.dynamic`. This source uses
a callback operator which returns requests. You can then send the next request
to be prepared in the asynchronous event queue, which should behave better with
the streaming thread. Here's an example:
```
r = ref request.create("background_bottom.mp4")
def prepare_request() =
def fn() =
ignore(request.resolve(!r))
(-1.)
end
add_timeout(fast=false,0.,fn)
end
def get_request() =
res = !r
r := request.create("background_bottom.mp4")
prepare_request()
res
end
s = request.dynamic(get_request)
```
I'm gonna close the issue here. Feel free to follow-up here or on the mailing
list.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/714#issuecomment-464554921
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users