Video Capture, FFmpeg

1

I have a program written in Node.Js that uses the following FFmpeg command to capture videos:

ffmpeg -f dshow -i video=Integrated Webcam -c:v libx264 -f segment -strftime 1 -segment_time 60 -segment_format mp4 out%Y-%m-%d_%H-%M-%S.mp4

There is a need for the design of the video to be interrupted at any time by means of a button. When finalized by the command:

taskkill /im ffmpeg.exe /t /f

The video is corrupted and can not be played.

Any way to end the process but preserve the recorded content?

    
asked by anonymous 03.10.2017 / 21:33

1 answer

0

I solved the problem by adding to the initial command the following excerpt: -segment_format_options movflags=empty_moov

    
04.10.2017 / 17:47