Skip to content

Instantly share code, notes, and snippets.

@pysh
pysh / vcpkg_install_ffmpeg.cmd
Created April 27, 2024 16:52
How to install vcpkg with ffmpeg #ffmpeg #vcpkg
REM More info:
REM https://github.com/Microsoft/vcpkg
REM https://learn.microsoft.com/ru-ru/vcpkg/get_started/get-started-packaging
cd /D "d:\Sources\"
git clone https://github.com/Microsoft/vcpkg.git
cd vcpkg
.\bootstrap-vcpkg.bat
.\vcpkg integrate install
.\vcpkg install "ffmpeg:x64-windows"
@pysh
pysh / ffmpeg_snippets.md
Last active April 23, 2024 16:03
ffmpeg snippets #ffmpeg

Encoding audio and copy metadata, subs, chapters, etc

ffmpeg -i ".\input+.mkv" -y -vn -c:a libopus -b:a 64k ".\output+.mkv"

Encoding audio with channel layout and setting the title of the audio0

ffmpeg -i ".\input+.mkv" -y -vn -c:a libopus -af aformat=channel_layouts="7.1|5.1|stereo" -b:a 64k -metadata:s:a title="Audio#0 Title" ".\output+2.mkv"
@pysh
pysh / AVSShader.avs
Last active April 23, 2024 15:23
AVSShader #AviSynth
AddAutoloadDir("X:\Apps\_VideoEncoding\StaxRip\Apps\FrameServer\AviSynth\plugins")
LoadPlugin("X:\Apps\_VideoEncoding\StaxRip\Apps\Plugins\Dual\L-SMASH-Works\LSMASHSource.dll")
LWLibavVideoSource("1iPebC-9jwI.mkv")
ConvertBits(bits=16)
ConvertToShader(Precision = 2)
s = last
Shader("X:\Apps\_VideoEncoding\StaxRip\Apps\Plugins\AVS\AviSynthShader\Sharpen Adaptive.hlsl", output = 1)
ExecuteShader(last, s, Precision=2, OutputPrecision=2, Clip1Precision=2)
ConvertFromShader(last, Precision = 2, Format="YV12")
@pysh
pysh / keytool_cert_gen.md
Last active April 23, 2024 15:24
Keytool generate certificates

Export key from jks to pfx

keytool -importkeystore -srckeystore existing-store.jks -destkeystore new-store.p12 -deststoretype PKCS12

---

The command below will create a pkcs12 Java keystore server.jks with a self-signed SSL certificate:

keytool \