Last active
August 10, 2021 04:07
-
-
Save Philmist/0e6f7a78f44b5bdbd97782432e4ab4cf to your computer and use it in GitHub Desktop.
ffmpegでフレーム数を上に表示させる
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
ffmpeg -i '.\2021-08-07 05-38-37.mkv' -vf "drawtext=fontfile=meiryo.ttc:text=%{n}:x=(w-tw)/2:y=h-(2*1h):fontcolor=white:box=1:boxcolor=0x00000099:fontsize=72" -y -c:v h264_nvenc test.mkv |
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
Param( | |
[string]$Target, | |
[string]$Output = "frames.mkv" | |
) | |
$TargetFile = Resolve-Path $Target | |
$FFmpegArgs = @('-i ', "`"$TargetFile`"", '-vf "drawtext=fontfile=meiryo.ttc:text=%{n}:x=(w-tw)/2:y=h-(2*1h):fontcolor=white:box=1:boxcolor=0x00000099:fontsize=72"', '-y', '-c:v h264_nvenc', "`"$Output`"") | |
$arg = $FFmpegArgs -join " " | |
$arg = 'ffmpeg ' + $arg | |
Write-Host $arg | |
Invoke-Expression $arg | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment