Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caching Support (for live streams, backwards seeking) #270

Open
shushu789 opened this issue Apr 1, 2023 · 3 comments
Open

Caching Support (for live streams, backwards seeking) #270

shushu789 opened this issue Apr 1, 2023 · 3 comments
Labels
enhancement New feature or request v4

Comments

@shushu789
Copy link

How to enable progress bar buffering for the flv from the URL (https://xxx.com/test.flv), for example, when I play the flv live broadcast of this URL address in the potplayer player, it can be played like a normal video To adjust the progress, for flv live streaming, at least you should be able to adjust the buffer position that has been played at will. I am currently using WPF. When I play the flv live stream in the URL, the progress bar slider will not move, it is always fixed at the current live time position. I'm new to Flyleaf, I checked the wiki and couldn't find instructions for that, maybe I'm missing something? Thank you!

my development environment

  • Windows 10
  • visual studio 2022
  • Flyleaf NuGet:FlyleafLib.Controls.WPF 1.2.10
  • FFmpeg.AutoGen 6.0
  • FFmpeg 6.0
    image
@SuRGeoNix
Copy link
Owner

@shushu789 Just to confirm, when you open the input (eg. with potplayer) you can't directly seek backwards, right? Only the time that you buffer and probably after sometime it will not buffer more (eg. 2min behind?). If that's the case currently Flyleaf, does not support backwards buffering/seeking.

@shushu789
Copy link
Author

@shushu789确认一下,当你打开输入时(比如用potplayer)你不能直接向后搜索,对吧?只有你缓冲的时间,可能在一段时间后它不会缓冲更多(例如,落后 2 分钟?)。如果目前 Flyleaf 是这种情况,则不支持向后缓冲/查找。

Playing flv live streaming on potplayer can buffer infinitely, that is to say, as long as it keeps playing, the buffered position will always be there. We can adjust the progress slider at any time to watch the previous position. It is not 2 minutes, there is no limit. It is similar to the video in the on-demand type, which is temporarily cached locally. In this way, users can watch back and forth some previously missed clips while playing the live stream. For example, a live stream address in tiktok (https://pull-flv-f11-sg01.tiktokcdn.com/stage/stream-7216991120713075457_or4.flv) is like this.

It may be possible to implement this function by generating a temporary cache while playing. When the player window is closed or the playback is stopped, the cached data will be deleted. But I don't know how to decode these cached data while playing this live stream to achieve this goal by adjusting the position of the slider at will. I don't know what you think, and the same is true for hls streams.

  • Play synchronously
    image

  • Play a minute ago
    image

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Apr 1, 2023

Yes, that's local caching of potplayer. Flyleaf currently does caching(buffering) only for forward packets (based on Config.Demuxer.BufferDuration). I'm planning to support this in the future. Just wanted to make sure that the stream (input format) does not support seeking, currently live seeking is supporting in HLS (if the streams provide earlier cache)

@SuRGeoNix SuRGeoNix added the enhancement New feature or request label Apr 1, 2023
@SuRGeoNix SuRGeoNix changed the title How to enable progress bar buffering for flv from URL Caching Support (for live streams, backwards seeking) Apr 1, 2023
@SuRGeoNix SuRGeoNix added the v4 label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request v4
Projects
None yet
Development

No branches or pull requests

2 participants