Created
September 7, 2021 16:01
-
-
Save Mr-Guilherme/81d3a52027b8e4498a9f02b2a0f8a423 to your computer and use it in GitHub Desktop.
Revisions
-
Mr-Guilherme created this gist
Sep 7, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ ## Cut video with re-encoding 1. Flag `-to HH:MM:SS.MILLISECONDS` is for determining the end time of the video to be cut. 2. Flag `-i` is input video as path. 3. The last path is output of video. ```shell foo@bar: ffmpeg -to 00:15:00 -i ./media/file.mp4 ./media/newFile.mp4 ``` 4. Flag `-ss` is for determining the start time of the video to be cut. 5. It is algo possible convert the video format. ```shell foo@bar: ffmpeg -ss 00:15:00 -i ./media/file.mkv ./media/newFile.mp4 ``` ## Cut video without re-encoding The arguments `-c:v copy` and `-c:a copy` is for duplicate video and audio track. Increases speed a lot, but can be inaccurate. ```shell foo@bar: ffmpeg -ss 00:15:00 -to 00:30:00 -i ./media/file.mp4 -c:v copy -c:a copy ./media/newFile.mp4 ```