I am encoding a video with ffmpeg into H.264 stored in an FLV container. I would like to be able to trim segments of this video out as it is still encoding. The video contains no audio.
I am encoding the video like so:
ffmpeg -i recording.mp4 -c libx264 output.flv
And I'm attempting to trim the video with:
ffmpeg -i output.flv -ss 00:00:00.000 -t 00:00:01.000 -c copy output2.mp4
While the video is still encoding, I see this error when I try to trim:
Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)
Also while encoding, using ffprobe, I get information like the following:
Duration: 00:00:26.96, start: 0.080000, bitrate: 126 kb/s Stream #0:0: Video: h264 (High), yuv420p, 640x480, 25 fps, 25 tbr, 1k tbn, 50 tbc
How can I go about trimming this file while it's still encoding? I am willing to change container formats from flv to something else if needed. Ultimately, I need to be in mp4, but I don't mind doing some container shuffling to allow me to trim out portions while still encoding.