-
-
Notifications
You must be signed in to change notification settings - Fork 140
Open
@glitchednoop
Description
Script works perfect but trying to figure out the best way to save a long live stream but keep the saved chunks to an hour each.
Is there a way to interrupt but still finalize the file? Currently using the basic example:
video = ffmpeg_streaming.input(url)
stream = video.stream2file(Formats.hevc())
stream.output(savepath)
Since the input() call is blocking it seems the only way to exit before the stream ends is a ctrl+c or keyboard interrupt that just exits the ffmpeg call, however if you do it twice or too fast you exiting the script leaving the mp4 corrupt. I assume its missing headers and could probably be transcoded to fix it. But is there a cleaner way to exit that will still finalize the headers? I feel like I could multi thread this to handle the kill but is there a cleaner way that's already built in?
Metadata
Metadata
Assignees
Labels
No labels