Last active
August 16, 2025 01:08
-
-
Save kwappa/b65738a8a8c352280737ed39b5eea575 to your computer and use it in GitHub Desktop.
よく使うメディア変換コマンドメモ
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
| # 複数の動画ファイル(*.ts)を結合してMP4に再エンコードする | |
| # *.tsを列挙してffmpeg用インプットファイルを作る | |
| for f in *.ts; do echo "file '$f'" >> list.txt; done | |
| # list.txtをインプットとしてMP4にエンコードする | |
| # crf : Constant Rate Factor 0〜51 低いほど高品質 デフォルト 23 | |
| # 90分の動画を -crf 23 でエンコードすると200MBを超えることがあるので 25 を指定している | |
| ffmpeg -f concat -i list.txt -c:v libx265 -crf 25 -preset medium -tag:v hvc1 -c:a aac -b:a 128k output.mp4 |
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
| # afconvert を使って wav を m4aに変換する | |
| afconvert input.WAV -f 'mp4f' -d 'aac' output.m4a |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
TSのダウンロードにはこれがべんり : HLS Downloader - Chrome ウェブストア