5秒 係一個variable
諗左2個可行方法
但係都係做唔到 有冇大神幫下手
ffmpeg: 但係要學太難 唔同encoder output既duration都會唔同 暫時未有一個簡單既方法
software (window機): 暫時未搵到
ffmpeg -i input.mp4 -c copy -segment_time 5 -f segment output_%03d.mp4
ffprobe -loglevel error -show_entries frame=pts_time -skip_frame nokey -select_streams v:0 -of csv=print_section=0 "input.mp4"
0.000000,
3.878878
6.965289
9.509500
14.931589
19.853167
21.813456
ffprobe -v error -select_streams v:0 -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "input.mp4"
ffprobe -v error -select_streams v -of default=noprint_wrappers=1:nokey=1 -show_entries stream=r_frame_rate "input.mp4"
ffmpeg -i "input.mp4" -c copy -segment_time 5 -f segment -reset_timestamps 1 -avoid_negative_ts 0 "output\output_%03d.mp4"
(for %i in ("output\*.mp4") do @echo file '%i') > mylist.txt
ffmpeg -f concat -safe 0 -i "mylist.txt" -c copy "merge.mp4"
ffmpeg -i "input.mp4" -c:v libx264 -crf 23 -x264-params keyint=120:scenecut=0 -filter:v fps=fps=24 "output.mp4"
ffmpeg -i "output.mp4" -c copy -segment_time 5 -f segment -reset_timestamps 1 -avoid_negative_ts 0 "output\output_%03d.mp4"
祝您使用ffmpeg愉快!