Last active
May 5, 2023 01:49
-
-
Save bousqi/b83db0069beea36c1f8a72f9b6230d0a to your computer and use it in GitHub Desktop.
Revisions
-
bousqi revised this gist
Aug 6, 2022 . 1 changed file with 1 addition and 1 deletion.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 @@ -10,7 +10,7 @@ ffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -c:a copy output.mkv # to exlcude a stream : -map -0:5 # For NVIDIA graphic card encoder usage : 6 time faster (your GC might not support 10bit encoding) # replace encoder from libx264 to h264_nvenc ffmpeg -i input.mkv -map 0 -c:v h264_nvenc -crf 18 -vf format=yuv420p -c:a copy output.mkv -
bousqi revised this gist
Aug 6, 2022 . 1 changed file with 12 additions and 0 deletions.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 @@ -1,3 +1,7 @@ ########################## # FFMPEG 5 ########################## # refer to : https://superuser.com/questions/1380946/how-do-i-convert-10-bit-h-265-hevc-videos-to-h-264-without-quality-loss # 10-bit/12-bit HEVC to 8-bit H.264 ffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv @@ -6,6 +10,14 @@ ffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -c:a copy output.mkv # to exlcude a stream : -map -0:5 # For NVIDIA graphic card encoder usage : **6 time faster** (your GC might not support 10bit encoding) # replace encoder from libx264 to h264_nvenc ffmpeg -i input.mkv -map 0 -c:v h264_nvenc -crf 18 -vf format=yuv420p -c:a copy output.mkv ########################## # FFMPEG 4 ########################## # x265 to x264 (audio copy) set FNAME="file" set BITRATE="3500K" -
bousqi revised this gist
Aug 6, 2022 . 1 changed file with 8 additions and 0 deletions.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 @@ -1,3 +1,11 @@ # refer to : https://superuser.com/questions/1380946/how-do-i-convert-10-bit-h-265-hevc-videos-to-h-264-without-quality-loss # 10-bit/12-bit HEVC to 8-bit H.264 ffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -vf format=yuv420p -c:a copy output.mkv # 10-bit/12-bit HEVC to 10-bit H.264 ffmpeg -i input.mkv -map 0 -c:v libx264 -crf 18 -c:a copy output.mkv # to exlcude a stream : -map -0:5 # x265 to x264 (audio copy) set FNAME="file" set BITRATE="3500K" -
bousqi created this gist
Mar 11, 2020 .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,51 @@ # x265 to x264 (audio copy) set FNAME="file" set BITRATE="3500K" # 2pass ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -an -b:v %BITRATE% -pass 1 -2pass -1 %FNAME%.new.mkv ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -acodec copy -b:v %BITRATE% -pass 2 -2pass -1 -y %FNAME%.new.mkv # 1pass ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -acodec copy -b:v %BITRATE% -y %FNAME%.new.mkv # x265 to x264 (audio aac 192k) set FNAME="file" set BITRATE="3500K" # 2pass ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -an -b:v %BITRATE% -pass 1 -2pass -1 %FNAME%.new.mkv ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -c:a aac -b:a 192k -ac 2 -b:v %BITRATE% -pass 2 -2pass -1 -y %FNAME%.new.mkv # 1pass ffmpeg -hwaccel cuvid -i %FNAME%.mkv -f matroska -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -c:a aac -b:a 192k -ac 2 -b:v %BITRATE% -y %FNAME%.new.mkv #------------------------------------------------------------------------------------------------------------------------------------------------------ # SW enc ffmpeg.exe -i .\MVI_3796.MOV -c:v libx264 -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 .\MVI_3796.AVI # HW encoder (for NVidia) ++ ffmpeg.exe -i .\MVI_3796.MOV -c:v h264_nvenc -qmin 28 -qmax 52 -preset fast -c:a aac -b:a 128k -ac 2 .\MVI_3796.AVI + ffmpeg.exe -i .\MVI_3796.MOV -c:v h264_nvenc -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 .\MVI_3796.AVI ffmpeg.exe -hwaccel cuvid -i IMG_2616.MOV -c:v h264_nvenc -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 IMG_2616.AVI # HW decoder + encoder (faster, less CPU) ffmpeg.exe -hwaccel cuda -i IMG_2616.MOV -c:v h264_nvenc -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 IMG_2616.AVI ffmpeg.exe -hwaccel cuvid -c:v h264_cuvid -i IMG_2616.MOV -crf 19 -preset slow -c:a aac -b:a 192k -ac 2 IMG_2616.AVI ffmpeg -y -hwaccel cuvid -c:v h264_cuvid -vsync 0 -i MVI_3796.MOV -vcodec h264_nvenc MVI_3796.AVI ffmpeg -h encoder=nvenc # deprecated ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc ll_2pass_quality -an -b:v 2.4M -pass 1 -2pass -1 "IMG_2616.high.avi" ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc ll_2pass_quality -acodec copy -b:v 2.4M -pass 2 -2pass -1 -y "IMG_2616.high.avi" # with correct plugin ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -an -b:v 2.4M -pass 1 -2pass -1 "IMG_2616.high_cbr.avi" ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -acodec copy -b:v 2.4M -pass 2 -2pass -1 -y "IMG_2616.high_cbr.avi" # with audio compression # ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -b:v 2.4M -pass 1 -2pass -1 -an "IMG_2616.high_cbr_aac.avi" # ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -b:v 2.4M -pass 2 -2pass -1 -y -c:a aac -b:a 192k -ac 2 "IMG_2616.high_cbr_aac.avi" # with correct plugin ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -an -b:v 4M -pass 1 -2pass -1 "IMG_2616.high_cbr4M.avi" ffmpeg -hwaccel cuvid -i "IMG_2616.MOV" -c:v h264_nvenc -preset llhq -profile:v high -rc cbr_ld_hq -acodec copy -b:v 4M -pass 2 -2pass -1 -y "IMG_2616.high_cbr4M.avi" DVD : ffmpeg.exe -i concat:"z:\tmp\GRAND_INCENDIE_DE_PONTYPANDY___71-1.vob|z:\tmp\GRAND_INCENDIE_DE_PONTYPANDY___71-1.vob" -vf yadif -c:v libx264 -crf 28 -preset slow -c:a aac -b:a 128k -ac 2 C:\Work\Sam_le_Pompier.mp4