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

To play a video file currently being written #234

Closed
sharmasulekh87 opened this issue Jan 2, 2023 · 6 comments
Closed

To play a video file currently being written #234

sharmasulekh87 opened this issue Jan 2, 2023 · 6 comments

Comments

@sharmasulekh87
Copy link

If I try to play a video .ts file that I am currently writing with the help of ffmpeg, the player set its duration and play up to the specified duration only and stop, on the other side the writing has not been ended yet. I have tried to play the same file with vlc as well as ffplay, they continue to play till the file is being written. With flyleaf player, it do play after the loaded duration only if i seek the file to little earlier than end time. I have attached the screenshot as well. Is there any way to accomplish same thing with flyleaf player?

image

image

@SuRGeoNix
Copy link
Owner

Hi @sharmasulekh87, that's an interesting case. I'm just wondering if this is should be consider as Live stream or not and how Flyleaf will be informed with the new Duration as it has been changed.
Can you help me reproduce it as I'm not very familiar with FFmpeg commands and see how I can support it?

@sharmasulekh87
Copy link
Author

Thanks for your reply. I am using simple ffmpeg command to split a big mp4 file into smaller .ts file, and while writing them I try to play it with the flyleaf, vlc and ffplay as I have already told. So here is the command I am using

ffmpeg -re -i input.mp4 -c copy -map 0 -segment_time 00:00:20 -f segment output%03d.ts

Here input.mp4 is the large input file which I am splitting in small .ts segment named as output000.ts,output001.ts etc.

I just wanted to ask one more question that in flyleaf player, when using reverse playback, the speed can't be increased or decreased. How can we do that? And while playing normal the speed can be increased upto 8x only, can we not increase beyond that?

@SuRGeoNix
Copy link
Owner

@sharmasulekh87 for the reverse playback currently speed cannot be changed. For the normal playback you can go up to 16. Performance wise it will be really bad for the GPU to use so high speed. As other users mention this, I guess what you are trying to do is to just skip larger parts of the media and not actually increasing the speed which is different. If that's the case please provide more details so I will consider adding this in the future.

@navarrillo
Copy link

I have a question that i don't know if it's 100% related to this.
Is it possible to view an udp or rtsp livestreaming and go back 10 minutes and then go back to live?

The idea i had is to save in file the live and what i play in flyleaf is that file that is recording all time so i guess i could play passed minutes and then go back to live.
@SuRGeoNix Thank you!

@SuRGeoNix
Copy link
Owner

SuRGeoNix commented Feb 16, 2023

Hi @navarrillo, this is not related to this issue, but your workaround sounds as the best solution as currently flyleaf does not support temporary save of previous packets. You can seek forward to the already demuxed packets (eg. if you pause the live stream it will store the future packets for Config.Demuxer.BufferDuration time) but this will not currently work for the backward seeking (as it will discard all the previous packets on each seek request). I'm planning to support this in the future (to set through config the previous packets duration).

Another possible solution it would be trans muxing/coding your udp/rtsp to hls with 10 minutes cache, then you could use Flyleaf to seek on HLS live stream within 10 minutes range.

@SuRGeoNix
Copy link
Owner

Closing this as it is already supported by ffmpeg with file protocol and follow option:-

https://ffmpeg.org/ffmpeg-protocols.html#toc-file

Having multiple files is a different case, I think this should be down with HLS playlist to work properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants