Skip to content

Instantly share code, notes, and snippets.

@ECHO OFF
SET VSWHERE_PATH="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
IF NOT EXIST %VSWHERE_PATH% (
ECHO ERROR: vswhere.exe not found!
GOTO End
)
SET PARAMS_BASE=-property displayName -latest
@v0lt
v0lt / D3DVideoDecoderInfo.cpp
Last active January 14, 2024 09:29
Direct3D Video Decoder Info
#pragma comment(lib, "d3d11.lib")
#pragma comment(lib, "d3d12.lib")
#pragma comment(lib, "dxgi.lib")
#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#define __WRL_NO_DEFAULT_LIB__
@v0lt
v0lt / DXGIAdapters.cpp
Created September 24, 2023 16:32
DXGIAdapters
#include <stdio.h>
#include <dxgi.h>
#pragma comment(lib, "dxgi.lib")
#pragma comment(lib, "dxguid.lib")
int main()
{
wprintf(L"Available DXGI adapters and outputs:\n");
@v0lt
v0lt / mp4_to_mp3.cmd
Created August 29, 2022 18:23
Convert audio from MP4 to MP3 and add first frame of video as cover art
@ECHO OFF
CHCP 65001
PUSHD %~dp0
SET ffmpegexe="C:\Utils\FFmpeg\ffmpeg.exe"
FOR %%f IN (*.mp4) DO (
%ffmpegexe% -i "%%f" -vframes 1 "%%~nf.jpg"
%ffmpegexe% -i "%%f" -i "%%~nf.jpg" -map 0:a -map 1:0 -c:v copy -codec:a libmp3lame -b:a 192k -id3v2_version 3 -metadata:s:v title="Album cover" -metadata:s:v comment="Cover (front)" "%%~nf.mp3"
DEL "%%~nf.jpg"