Skip to content

Instantly share code, notes, and snippets.

@musan6363
Last active October 5, 2021 08:03
Show Gist options
  • Save musan6363/acde2adfff3658c239efa123ce0d6d65 to your computer and use it in GitHub Desktop.
Save musan6363/acde2adfff3658c239efa123ce0d6d65 to your computer and use it in GitHub Desktop.
ディレクトリ内のすべての動画を音なしh265形式に変換するプログラム
#! /bin/bash
###
# Usage
# Make an output dir under the current directory and name it "h265".
# bash h265.sh <dirname>
###
# ffmpeg -i test.mov -hide_banner -c:v libx265 -vsync 1 -preset faster -crf 28 -tag:v hvc1 -an test.mp4
for file in `ls $1/*.mp4` ; do
# echo $file
newfile=`basename $file`;
ffmpeg -i $file -hide_banner -c:v libx265 -vsync 1 -preset faster -crf 23 -tag:v hvc1 -an h265/$newfile
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment