how to cleanly stop ffmpeg?
by Skaperen from LinuxQuestions.org on (#5CPX9)
i am wanting to download a live video feed. i have experimented with ffmpeg and it seems to do the job. but it keeps on doing the job. the live feed continues for a very long time. if i just let it keep running for hours and hours, the feed stops and ffmpeg comes to a graceful stop and i get a .mp4 file that works. but if i press ^C, it kills ffmpeg which does not finish the file it was writing.
during the download it is writing into a file that has a name like the URL but ends in .mp4.part which grows and grows. when the feed ends, ffmpeg makes it into a .mp4 file. but, if it is killed, the file never gets finished.
the ffmpeg man page says nothing about signals. i'd like to know how to gracefully stop ffmpeg and have it finish as if the feed has ended. i want to play the video up to that point long before the feed ends.
also, how can i do the finish process for the leftover files after ffmpeg is killed? i have a few of these i'd like to save. mplayer won't play the unfinished ones.


during the download it is writing into a file that has a name like the URL but ends in .mp4.part which grows and grows. when the feed ends, ffmpeg makes it into a .mp4 file. but, if it is killed, the file never gets finished.
the ffmpeg man page says nothing about signals. i'd like to know how to gracefully stop ffmpeg and have it finish as if the feed has ended. i want to play the video up to that point long before the feed ends.
also, how can i do the finish process for the leftover files after ffmpeg is killed? i have a few of these i'd like to save. mplayer won't play the unfinished ones.