프로그램 사용/ffmpeg & ffserver
ffmpeg을 이용한 원하는 동영상 구간 자르기
구차니
2022. 7. 28. 13:44
-ss와 -t 조합으로 가능한데, -to 로는 잘안되서 쓰는법을 모르겠다.
-codec copy는 코덱변경없이 단순하게 원본을 자르는거라 속도도 빠르고 화질 저하도 없게 하는 옵션이다.
$ ./ffmpeg -ss 00:39:05 -i input.mkv -codec copy -t 00:03:03 out.mkv |
[링크 : https://superuser.com/questions/742434/use-ffmpeg-to-cut-mkv-file]
[링크 : https://trac.ffmpeg.org/wiki/Seeking]
$ ffmpeg -ss 00:01:00 -to 00:02:00 -i input.mp4 -c copy output.mp4 -i: This specifies the input file. In that case, it is (input.mp4). -ss: Used with -i, this seeks in the input file (input.mp4) to position. 00:01:00: This is the time your trimmed video will start with. -to: This specifies duration from start (00:01:40) to end (00:02:12). 00:02:00: This is the time your trimmed video will end with. -c copy: This is an option to trim via stream copy. (NB: Very fast) |