TSファイルの映像のみ置き換えてサイズ圧縮するツールです。
音声やその他のパケットはそのままコピーします。
元のTSファイルと同じように扱えるので、TvtPlayでニコニコ実況や字幕を表示することができます。
必要
tsreplace
GitHubからtsreplace_x.xx_x64.7zをダウンロードします。
中身を適当なフォルダに入れます。
FFmpeg
ソフトウェアエンコードに必要です。
GitHubからffmpeg-master-latest-win64-gpl.zipをダウンロードします。
「bin」フォルダにあるffmpeg.exeをtsreplace.exeと同じフォルダに入れます。
QSVEnc
ハードウェアエンコードに必要です。
GitHubからQSVEncC_x.xx_x64.7zをダウンロードします。
中身をtsreplace.exeと同じフォルダに入れます。
NVEnc
ハードウェアエンコードに必要です。
GitHubからNVEncC_x.xx_x64.7zをダウンロードします。
中身をtsreplace.exeと同じフォルダに入れます。
バッチファイル
拡張子を.batにして保存して、tsreplace.exeと同じフォルダに入れます。
@echo off cd /d %~dp0 :loop if "%~1" == "" goto end tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e ffmpeg.exe -y -f mpegts -i - -copyts -start_at_zero -an -c:v libx264 -flags +ildct+ilme -preset slow -crf 23 -g 90 -f mpegts - shift goto loop :end
インターレース保持でx264でエンコードする例です。
使い方
TSファイルをバッチファイルにドラッグ&ドロップするとエンコードが始まります。
複数の場合は順番にエンコードされます。
終わるとコマンドプロンプトが終了します。
出力先はTSファイルと同じフォルダです。
エンコード後に画面を閉じたくない場合は:endの下にpauseを書いてください。
エンコード例
tsreplace.exeの行を書き換えてください。内容はReadme.mdに書かれているものと同じです。
インターレース解除
x264
tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e ffmpeg.exe -y -f mpegts -i - -copyts -start_at_zero -vf yadif -an -c:v libx264 -preset slow -crf 23 -g 90 -f mpegts -
x265
tsreplace.exe -i "%~1" -o "%~dpn1.hevc.ts" -e ffmpeg.exe -y -f mpegts -i - -copyts -start_at_zero -vf yadif -an -c:v libx265 -preset medium -crf 23 -g 90 -f mpegts -
QSVEnc H.264
tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e QSVEncC64.exe -i - --input-format mpegts --tff --vpp-deinterlace normal -c h264 --icq 23 --gop-len 90 --output-format mpegts -o -
QSVEnc HEVC
tsreplace.exe -i "%~1" -o "%~dpn1.hevc.ts" -e QSVEncC64.exe -i - --input-format mpegts --tff --vpp-deinterlace normal -c hevc --icq 23 --gop-len 90 --output-format mpegts -o -
NVEnc H.264
tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e NVEncC64.exe -i - --input-format mpegts --tff --vpp-deinterlace normal -c h264 --qvbr 23 --gop-len 90 --output-format mpegts -o -
NVEnc HEVC
tsreplace.exe -i "%~1" -o "%~dpn1.hevc.ts" -e NVEncC64.exe -i - --input-format mpegts --tff --vpp-deinterlace normal -c hevc --qvbr 23 --gop-len 90 --output-format mpegts -o -
インターレース保持
QSVEnc H.264
PGモードの使用可能なGPUが必要です。(Arc GPUでは使用できません)
tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e QSVEncC64.exe -i - --input-format mpegts --tff -c h264 --icq 23 --gop-len 90 --output-format mpegts -o -
NVEnc H.264
GTX1xxx以前のGPUが必要です。
tsreplace.exe -i "%~1" -o "%~dpn1.h264.ts" -e NVEncC64.exe -i - --input-format mpegts --tff -c h264 --qvbr 23 --gop-len 90 --output-format mpegts -o -
元のTSファイルを削除
shiftの上に書きます。
if %errorlevel% == 0 del "%~1"
エラー発生時は削除されません。
Amatsukazeで使う
以下の記事を参考にしてください。


コメント