View gen_movie.ps1
This file contains 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
$movies = @( | |
@{FileName=".\2023-01-27 15-29-36.mkv";FadeInTime=0;From=0;Time=5}, | |
@{FileName=".\2023-01-27 15-29-36.mkv";FadeInTime=1;From=63;Time=29}, | |
@{FileName=".\2023-01-27 15-32-51.mkv";FadeInTime=1;From=0;Time=3}, | |
@{FileName=".\2023-01-27 15-32-51.mkv";FadeInTime=1;From=55;Time=29}, | |
@{FileName=".\2023-01-27 15-40-44.mkv";FadeInTime=1;From=13;Time=10} | |
) | |
$filter_complex_v = "" | |
$filter_complex_a = "" |
View scroll_text_with_aac.ps1
This file contains 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
# @seealso https://nico-lab.net/drawtext_with_ffmpeg/ | |
ffmpeg -f lavfi -i 'color=c=black:r=15:s=640x50' -f dshow -i "audio=CABLE Output (VB-Audio Virtual Cable)" -filter_complex "[0]drawtext=fontfile='\\Windows\\fonts\\meiryob.ttc':textfile='\\temp_files\\foobar_nowplaying.txt':reload=1:fontsize=(h/2.2):y=0:x=w-mod(n*6\,w+tw):y=(h-th)/2:fontcolor=white" -c:v h264_nvenc -b:v 128k -c:a aac -b:a 128k -f flv rtmp://192.168.0.100/live/livestream |
View getchannnels_from_pecast.ps1
This file contains 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
$result = @{"method"="getChannels";"id"=19021;"jsonrpc"="2.0";"params"=@{}} | ConvertTo-Json | Invoke-WebRequest -Method Post -Headers @{"Content-type"="application/json";"X-Requested-With"="XMLHttpRequest"} http://192.168.0.100:7144/api/1 | %{ [Text.Encoding]::UTF8.GetString([Text.Encoding]::UTF8.GetBytes($_.Content)) } | ConvertFrom-Json | |
$result.result | %{ $_.info } |
View _generate_images.ps1
This file contains 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( | |
[Parameter(Mandatory=$true, | |
Position=0, | |
HelpMessage="Literal path to movie file.")] | |
[ValidateNotNullOrEmpty()] | |
[string] | |
$MovieFile, | |
[Parameter(Mandatory=$true, | |
HelpMessage="Name of directory for generating image files.")] | |
[ValidateNotNullOrEmpty()] |
View create_movie.ps1
This file contains 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
<# | |
地獄のようなffmpesクロスフェード再び | |
ポイント: | |
* 画像は直に長さを指定すればよしなにしてくれる | |
* xfadeはfpsを合わせないと文句を言うので指定しておく | |
* xfadeはオフセットと移行時間を指定するがフィルタに入力された動画に依存する | |
* つまりオフセットを足し合わせて移行時間を引く必要がある | |
* afadeは移行時間を指定するだけでよしなにしてくれる | |
* 画像の部分は無音にしたいのでadelayで時間を後に伸ばす | |
#> |
View post_recognizedtext.ps1
This file contains 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
Invoke-WebRequest http://192.168.0.100:9090/philmist-bundle/recognized -Method "POST" -Headers @{"Content-Type"="application/json;charset=utf-8"} -Body ([Text.Encoding]::UTF8.GetBytes((@{"code"="R";"text"="本日青天なれど | |
も波高し"} | ConvertTo-Json))) -ContentType 'application/json' |
View create_quilt_with_magick_montage.ps1
This file contains 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
<# | |
See also: | |
https://qiita.com/udoP_/items/8495aac075dbca5df143 | |
https://qiita.com/hsagae/items/1b72fb9f3d6024ba46f0 | |
https://ja.stackoverflow.com/questions/2485/imagemagick%E3%81%A7%E8%A4%87%E6%95%B0%E7%94%BB%E5%83%8F%E3%82%92%E4%B8%80%E6%B0%97%E3%81%AB%E3%83%AA%E3%82%B5%E3%82%A4%E3%82%BA%E3%81%97%E3%81%9F%E3%81%84 | |
#> | |
magick ".\ff14lf_knight_flowerelpis_mae\%04d.png[2-49]" +antialias -font "Ricty-Diminished-Regular" -pointsize 32 -gravity SouthEast -annotate +10+10 "FF14: (C) SquareEnix Co.Ltd., All rights reserved." .\_out\%04d.png | |
magick montage -tile 8x6 -geometry 100%+0+0 .\_out\*.png ./output.png |
View generate_vertical_font.py
This file contains 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
#!/usr/bin/env python | |
# | |
# Usage: | |
# fontforge -script generate_vertical_font.py original_font.ttf | |
import fontforge | |
import math | |
import os | |
import psMat | |
import sys |
View dat2html.py
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import os | |
import sys | |
import glob | |
import getopt | |
import re | |
import unicodedata | |
import logging |
View ffmpeg_speedup.ps1
This file contains 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 -ss 12:21 -to 12:36 -i $v -ss 12:36 -to 20:30 -i $v -ss 20:30 -to 20:53 -i $v -filter_complex "[1:v]setpts=PTS/10[spv];[1:a]atempo=10[spa];[0:v][0:a][spv][spa][2:v][2:a]concat=n=3:v=1:a=1[outv][outa]" -map "[outv]" -map "[outa]" -c:v h264_nvenc -b:v 10M -c:a aac twitter.mp4 |
NewerOlder