You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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:
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?
The text was updated successfully, but these errors were encountered: