ls -1 * | perl -nle 'my $cmd = "ffmpeg -threads 2 -i %s.MP4 -c:a copy -c:v libx265 -tag:v hvc1 %s_h265.MP4"; my $fn = $_; if ($fn !~ /h265/ && $fn =~ /^(.+)?\.mp4$/i) { my $realcmd = sprintf($cmd,$1,$1); system $realcmd; }' 分割 ffmpeg -ss 210 -i input.MP4 -t 30 -c copy output.mp4