diff --git a/index.html b/index.html
index c443db0..4cd1f6e 100644
--- a/index.html
+++ b/index.html
@@ -924,13 +924,14 @@
Excerpt from beginning
-
ffmpeg -i input_file -t 5 -c copy output_file
+
ffmpeg -i input_file -t 5 -c copy -map 0 output_file
This command captures a certain portion of a video file, starting from the beginning and continuing for the amount of time (in seconds) specified in the script. This can be used to create a preview file, or to remove unwanted content from the end of the file. To be more specific, use timecode, such as 00:00:05.
- ffmpeg
- starts the command
- -i input_file
- path, name and extension of the input file
- -t 5
- Tells ffmpeg to stop copying from the input file after a certain time, and specifies the number of seconds after which to stop copying. In this case, 5 seconds is specified.
- -c copy
- use stream copy mode to re-mux instead of re-encode
+ - -map 0
- Tells ffmpeg to map all streams of the input to the output.
- output_file
- path, name and extension of the output file
@@ -947,7 +948,7 @@
Trim a video without re-encoding
-
ffmpeg -i input_file -ss 00:02:00 -to 00:55:00 -c copy output_file
+
ffmpeg -i input_file -ss 00:02:00 -to 00:55:00 -c copy -map 0 output_file
This command allows you to create an excerpt from a video file without re-encoding the image data.
- ffmpeg
- starts the command
@@ -955,6 +956,7 @@
- -ss 00:02:00
- sets in point at 00:02:00
- -to 00:55:00
- sets out point at 00:55:00
- -c copy
- use stream copy mode (no re-encoding)
+ - -map 0
- Tells ffmpeg to map all streams of the input to the output.
Note: watch out when using -ss
with -c copy
if the source is encoded with an interframe codec (e.g., H.264). Since ffmpeg must split on i-frames, it will seek to the nearest i-frame to begin the stream copy.
- output_file
- path, name and extension of the output file
@@ -978,13 +980,14 @@
Excerpt to end
-
ffmpeg -i input_file -ss 5 -c copy output_file
+
ffmpeg -i input_file -ss 5 -c copy -map 0 output_file
This command copies a video file starting from a specified time, removing the first few seconds from the output. This can be used to create an excerpt, or remove unwanted content from the beginning of a video file.
- ffmpeg
- starts the command
- -i input_file
- path, name and extension of the input file
- -ss 5
- Tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds into the video that ffmpeg should start copying. To be more specific, you can use timecode such as 00:00:05.
- -c copy
- use stream copy mode to re-mux instead of re-encode
+ - -map 0
- Tells ffmpeg to map all streams of the input to the output.
- output_file
- path, name and extension of the output file
@@ -1001,13 +1004,14 @@
Excerpt from end
-
ffmpeg -sseof -5 -i input_file -c copy output_file
+
ffmpeg -sseof -5 -i input_file -c copy -map 0 output_file
This command copies a video file starting from a specified time before the end of the file, removing everything before from the output. This can be used to create an excerpt, or extract content from the end of a video file (e.g. for extracting the closing credits).
- ffmpeg
- starts the command
- -sseof -5
- This parameter must stay before the input file. It tells ffmpeg what timecode in the file to look for to start copying, and specifies the number of seconds from the end of the video that ffmpeg should start copying. The end of the file has index 0 and the minus sign is needed to reference earlier portions. To be more specific, you can use timecode such as -00:00:05. Note that in most file formats it is not possible to seek exactly, so ffmpeg will seek to the closest point before.
- -i input_file
- path, name and extension of the input file
- -c copy
- use stream copy mode to re-mux instead of re-encode
+ - -map 0
- Tells ffmpeg to map all streams of the input to the output.
- output_file
- path, name and extension of the output file