[FFmpeg-user] Hello, I want to ask about sending very long argument into ffmpeg command line.

Ted Park kumowoon1025 at gmail.com
Tue Nov 5 11:08:01 EET 2019


> I have to split one video into large amount(usually more than 1000) of segments and reassemble segments into one video. 
> Suppose I try split only, then command will be like
> 
> ffmpeg -i input.mp4 -vcodec copy -acodec copy -ss 00:00:00 -t 00:01:00 -sn test_split001.mp4 -vcodec copy -acodec copy -ss 00:01:00 -t 00:02:00 -sn test_split002.mp4 -vcodec copy -acodec copy -ss 00:02:00 -t 00:13:50 -sn test_split003.mp4 -vcodec copy -acodec copy -ss 00:13:50 -t 00:19:27 -sn test_split004.mp4 ...
> Currently I am sending just one command per extraction to the kernel, because kernel doesn't accept if given command is too long. 
> Since I am making too many segments, efficiency is way too low.
> 
> This is why I asked you about modifying main(generating command arguments inside of main function). Did my answer cleared your question?

Oh okay, in that case, have a look at the segment muxer and concat "demuxer". 


More information about the ffmpeg-user mailing list