Skip to content

Instantly share code, notes, and snippets.

@udasan
udasan / ffmpeg_shrink.bat
Created February 6, 2021 14:44
shrink video by ffmpeg
@echo off
set INPUT=%1
set OUTPUT=%2
set WIDTH=%3
ffmpeg -i %INPUT% -vf "scale=%WIDTH%:trunc(ih*%WIDTH%/iw/2)*2" -movflags +faststart -c:v libx264 -c:a copy -crf 28 %OUTPUT%
@udasan
udasan / SteamVR_AudioPlaybackMirrorDevice.cs
Created December 23, 2016 01:13
Steam VR Audio Playback Mirror Device
public string GetAudioPlaybackMirrorDevice ()
{
System.Text.StringBuilder sb = new System.Text.StringBuilder(128);
Valve.VR.EVRSettingsError er = new Valve.VR.EVRSettingsError();
Valve.VR.OpenVR.Settings.GetString(
Valve.VR.OpenVR.k_pch_audio_Section,
Valve.VR.OpenVR.k_pch_audio_OnPlaybackMirrorDevice_String,
sb,
(uint)sb.Capacity,
@udasan
udasan / Unity.snippet
Last active November 8, 2016 13:55 — forked from neon-izm/Unity.snippet
Unity Serialized propety()
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Propety</Title>
<Author>izm</Author>
<Description>AccessCache</Description>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
<SnippetType>SurroundsWith</SnippetType>
</SnippetTypes>