From 020b9fbe7391cf02f15d2d43981229b1e4e55b6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorena=20A=20Ram=C3=ADrez-L=C3=B3pez?= Date: Fri, 1 May 2020 23:03:25 -0400 Subject: [PATCH 1/2] Update: Adding fade/afade to streams --- index.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/index.html b/index.html index cfd43de..2c04530 100644 --- a/index.html +++ b/index.html @@ -729,11 +729,32 @@ + + + +
+
Fade both video and audio streams
+

ffmpeg -i input_file -filter:v "fade=in:st=0:d=1, fade=out:st=59:d=1" -filter:a "afade=in:st=0:d=1, afade=out:st=59:d=1" -c:v libx264 -c:a aac output_file

+

This command fades in and out the first and last 30 video frames and 44100 audio samples on a video

+
+
ffmpeg
starts the command
+
-i input_file
path, name and extension of the input file
+
-filter:v "fade=in:st=0:d=1, fade=out:st=59:d=1"
applies a video filter that fades in the first and last 30 video frames
+
-filter:a "afade=in:st=0:d=1, afade=out:st=59:d=1"
applies an audio filter that fades in the first and last 30 video frames. st sets the start and d sets the duration.
+
-c:v video_codec
as a video filter is used, it is not possible to use -c copy. The video must be re-encoded with whatever video codec is chosen, e.g. ffv1, v210 or prores.
+
-c:a audio_codec
as an audio filter is used, it is not possible to use -c copy. The audio must be re-encoded with whatever audio codec is chosen, e.g. aac.
+
output_file
path, name and extension of the output_file
+
+ +
+ +
Synchronize video and audio streams
+

ffmpeg -i input_file -itsoffset 0.125 -i input_file -map 1:v -map 0:a -c copy output_file

A command to slip the video channel approximate 2 frames (0.125 for a 25fps timeline) to align video and audio drift, if generated during video tape capture for example.

From a33ed1d24fbcc52ed229d2ec517d1c2e43e53b92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorena=20A=20Ram=C3=ADrez-L=C3=B3pez?= Date: Fri, 1 May 2020 23:09:49 -0400 Subject: [PATCH 2/2] Apply suggestions from code review Good point. Thanks Co-authored-by: Ashley --- index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/index.html b/index.html index 2c04530..0d9a0de 100644 --- a/index.html +++ b/index.html @@ -754,7 +754,6 @@
Synchronize video and audio streams
-

ffmpeg -i input_file -itsoffset 0.125 -i input_file -map 1:v -map 0:a -c copy output_file

A command to slip the video channel approximate 2 frames (0.125 for a 25fps timeline) to align video and audio drift, if generated during video tape capture for example.