Last active
April 28, 2022 12:06
-
-
Save podocarp/d696ac31ae8f8645d7f01c9ee3d090ca to your computer and use it in GitHub Desktop.
concatenate videos with ffmpeg together with nvdec/nvenc
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 characters
ffmpeg -y \ | |
-hwaccel nvdec -i 01* \ | |
-hwaccel nvdec -i 02* \ | |
-hwaccel nvdec -i 03* \ | |
-hwaccel nvdec -i 04* \ | |
-hwaccel nvdec -i 05* \ | |
-filter_complex '[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] [3:v] [3:a] [4:v] [4:a] concat=n=5:v=1:a=1 [v] [a]' \ | |
-map '[v]' -map '[a]' \ | |
-c:v h264_nvenc \ | |
-b:v 4M -maxrate:v 5M -bufsize:v 8M -profile:v main \ | |
-rc:v vbr_hq -rc-lookahead:v 32 -refs:v 16 \ | |
-bf:v 3 -coder:v cabac -b_ref_mode:v middle \ | |
-f mp4 output.mp4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment