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

Enable pausing and resuming of stream #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

yannikwirbs
Copy link

@yannikwirbs yannikwirbs commented Apr 26, 2024

Video and audio output pipe are on hold while paused.
There is no video or audio in discord.
Maybe there is a way to implement a way to send a still image to the video.
Video and audio are not desyncing.

REFERENCE ISSUE: #5

Video and audio output pipe are on hold while paused.
@longnguyen2004
Copy link
Collaborator

longnguyen2004 commented Apr 26, 2024

I'm wondering how this will behave in an actual live stream, and whether stream backpressure will be a problem.
Also, eloquent-ffmpeg has a built-in pause and resume function, maybe we should look at that as well?

Repeating the last frame is definitely not possible, since it'll break the bitstream.

@longnguyen2004
Copy link
Collaborator

longnguyen2004 commented Apr 26, 2024

Investigating RFC 7728 is also interesting Ignore, this is for a receiver to request a pause

@dank074
Copy link
Owner

dank074 commented Apr 28, 2024

This will also only work if noSleep is disabled.

From looking at eloquent-ffmpeg it seems it just suspends the process and then resumes it, like some people were already doing using SIGSTOP and SIGCONT

@longnguyen2004
Copy link
Collaborator

like some people were already doing using SIGSTOP and SIGCONT

And it also works on Windows using the undocumented NtSuspendProcess and NtResumeProcess functionns, so that's a plus.

I also wonder how the functionality should be exposed to user code. Maybe we'd need to create some kind of playback controller object, with play(), pause() and stop() functions.

@BitcircuitEU
Copy link

@longnguyen2004 while implementing ffmpeg api in nodejs maybe make a pause function that stores current timecode of demuxing and continue from there if possible. Not sure if SIGSTOP and SIGCONT is that reliable.

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

Successfully merging this pull request may close these issues.

4 participants