Loading more results

This is an old revision of the document!


ffmpeg re-encode to mkv

x264 (avc) & aac

  1. ffmpeg -i "x" -c:v libx264 -crf 18 -c:a aac "x.mkv"
  2. (delete original video file & assorted files like subs posters samples etc)

x265 (hevc) & aac

  1. ffmpeg -i "x" -c:v libx265 -vtag hvc1 -crf 18 -c:a aac "x.mkv"
  2. (delete original video file & assorted files like subs posters samples etc)

x265 (hevc) HW acceleration & aac & subs - bash loop

  1. 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
  2. (delete original video file & assorted files)

copy only video remove audio - bash loop

  1. for f in *.mp4; do ffmpeg -i "$f" -vcodec copy -an "${f%.mp4}_noaudio.mp4"; done
  2. (replace “mp4” as needed)

This theme is made by desbest and Jessica Russell Flint

terminal/ffmpegencode.1723677725.txt.gz · Last modified: 2024/08/14 23:22 by melo