LibVLC Android - Timeshifting live streams using sout

This forum is about all development around libVLC.
im244
New Cone
New Cone
Posts: 1
Joined: 14 Oct 2021 00:53

LibVLC Android - Timeshifting live streams using sout

Postby im244 » 14 Oct 2021 01:00

Hey everyone,

My app is a live tv channels app that connect directly to open channels in different countries.
The idea is to offer live caching/timeshifting for these live streams, so the player will cache X minutes or up to X available space and the user will be able to go backward forward within the defined limit.

The streams are mostly TS type streams, at the moment I offer an option to download or better say "record" these streams without any issues as I just download the content of the stream and save it locally, I was thinking about downloading the file and playing it at the same time, this approach does work but it create some issues when the file gets to big or when there is no more buffer in VLC, not to mention the handling of the download itself of the file.

Is there a better way to achieve what I am looking for? I tried using sout and play the file at the same time using the following options:

Code: Select all

media.addOption(":sout=#std{access=file,mux=ts,dst="+tempDir+"}"); media.addOption(":sout-display"); media.addOption(":sout-keep");
But without any success, any idea will be much appreciated.

Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 38 guests