diff --git a/css/css.css b/css/css.css index 0b560cf..1658f06 100644 --- a/css/css.css +++ b/css/css.css @@ -150,6 +150,13 @@ img { text-align: center; } +.sample-image-small { + margin: 0 auto; + margin-bottom: 18px; + max-width: 250px; + text-align: center; +} + div { font-family: 'Merriweather', serif; color: white; diff --git a/img/crop_example_aftercrop1.png b/img/crop_example_aftercrop1.png new file mode 100644 index 0000000..e0dff12 Binary files /dev/null and b/img/crop_example_aftercrop1.png differ diff --git a/img/crop_example_aftercrop2.png b/img/crop_example_aftercrop2.png new file mode 100644 index 0000000..326bd2f Binary files /dev/null and b/img/crop_example_aftercrop2.png differ diff --git a/img/crop_example_aftercrop3.png b/img/crop_example_aftercrop3.png new file mode 100644 index 0000000..008e27a Binary files /dev/null and b/img/crop_example_aftercrop3.png differ diff --git a/img/crop_example_orig.png b/img/crop_example_orig.png new file mode 100644 index 0000000..a098a9b Binary files /dev/null and b/img/crop_example_orig.png differ diff --git a/index.html b/index.html index 46195e7..cbeed67 100644 --- a/index.html +++ b/index.html @@ -666,6 +666,36 @@
ffmpeg -i input_file -vf "crop=width:height" output_file
This command crops the input video to the dimensions defined
+It's also possible to specify the crop position by adding the x and y coordinates representing the top left of your cropped area to your crop filter, as such:
+ffmpeg -i input_file -vf "crop=width:height[:x_position:y_position]" output_file
The original frame, a screenshot of the SMPTE colourbars:
+ +Result of the command ffmpeg -i smpte_coloursbars.mov -vf "crop=500:500" output_file
:
Result of the command ffmpeg -i smpte_coloursbars.mov -vf "crop=500:500:0:0" output_file
, appending :0:0
to crop from the top left corner:
Result of the command ffmpeg -i smpte_coloursbars.mov -vf "crop=500:300:500:30" output_file
:
ffmpeg -i input_file -map 0:v:0 video_output_file -map 0:a:0 audio_output_file
ffmpeg -i input_file -map 0:v:0 video_output_file -map 0:a:0 audio_output_file
This command splits the original input file into a video and audio stream. The -map command identifies which streams are mapped to which file. To ensure that you’re mapping the right streams to the right file, run ffprobe before writing the script to identify which streams are desired.
ffmpeg -i video_file -i audio_file -map 0:v -map 1:a -c copy output_file
This command takes a video file and an audio file as inputs, and creates an output file that combines the video stream in the first file with the audio stream in the second file.
+Note: in the example above, the video input file is given prior to the audio input file. However, input files can be added any order, as long as they are indexed correctly when stream mapping with -map
. See the entry on stream mapping.
Include the audio tracks from both input files with the following command:
+ffmpeg -i video_file -i audio_file -map 0:v -map 0:a -map 1:a -c copy output_file