Article 5CPX9 how to cleanly stop ffmpeg?

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.latest?d=yIl2AUoC8zA latest?i=6K2WIiGZZLo:2uceGzgi834:F7zBnMy latest?i=6K2WIiGZZLo:2uceGzgi834:V_sGLiP latest?d=qj6IDK7rITs latest?i=6K2WIiGZZLo:2uceGzgi834:gIN9vFw6K2WIiGZZLo
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments