Loading more results

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
terminal:ffmpegencode [2024/08/12 23:33] meloterminal:ffmpegencode [2025/01/03 21:50] (current) melo
Line 1: Line 1:
-===== ffmpeg re-encode to mkv =====+===== ffmpeg re-encode =====
  
-x264 (avc) & aac +x264 (avc) & aac: 
-  <code>ffmpeg -i "x" -c:v libx264 -crf 18 -c:a aac "x.mkv"</code> +<code>ffmpeg -i "x" -c:v libx264 -crf 18 -c:a aac "x.mkv"</code> 
-  (delete original video file & assorted files like subs posters samples etc)+(delete original video file & assorted files like subs posters samples etc)
  
-x265 (hevc) & aac +x265 (hevc) & aac: 
-  <code>ffmpeg -i "x" -c:v libx265 -vtag hvc1 -crf 18 -c:a aac "x.mkv"</code> +<code>ffmpeg -i "x" -c:v libx265 -vtag hvc1 -crf 18 -c:a aac "x.mkv"</code> 
-  (delete original video file & assorted files like subs posters samples etc)+(delete original video file & assorted files like subs posters samples etc)
  
-x265 (hevc) HW acceleration & aac & subs - bash loop +x265 (hevc) HW acceleration & aac & subs - bash loop: 
-  <code>for f in *.mkv; do ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "$f" -c:v hevc_nvenc -vtag hvc1 -crf 23 -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done</code> +<code>for f in *.mkv; do ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i "$f" -c:v hevc_nvenc -vtag hvc1 -crf 23 -c:a copy -c:s copy -map 0 "${f%.*} HEVC.mkv"; done</code> 
-  (delete original video file & assorted files)+(delete original video file & assorted files)
  
 +copy only video remove audio - bash loop:
 +<code>for f in *.mp4; do ffmpeg -i "$f" -vcodec copy -an "${f%.mp4}_noaudio.mp4"; done</code>
 +(replace "mp4" as needed)
 +
 +**below command is only for camcorder sources**
 +
 +GPU accelerated camcorder source MPEG+AC3+VOBSUB to x264+AC3+VOBSUB (little to no file size reduction, for web uploads)
 +<code>ffmpeg -y -vsync 0 -hwaccel cuda -hwaccel_output_format cuda -extra_hw_frames 10 -i "input.mkv" -c:a copy -c:v h264_nvenc -c:s copy -b:v 5M "output.mkv"</code>

This theme is made by desbest and Jessica Russell Flint

terminal/ffmpegencode.1723505586.txt.gz · Last modified: 2024/08/12 23:33 by melo