Skip to content

Instantly share code, notes, and snippets.

View psenough's full-sized avatar

Filipe Cruz psenough

View GitHub Profile
@psenough
psenough / shorts_60.bat
Created February 22, 2021 01:30
Batch Script to overlay mp3 id3 info and artwork cover into an animated video background in the format of youtube shorts
@ECHO OFF
REM %1 video background in 1920x1080
REM SET video="C:\Users\Filipe Cruz\Videos\wrighter\2021-02-20 23-13-44.mov"
REM SET video = %1
REM %1 video background already rotated into 1080x1920
SET videorot="C:\Users\Filipe Cruz\Videos\wrighter\rot_2021-02-21 22-53-37.mp4"
REM SET videorot = %1
REM %2 cover artwork in squared form (any res above what we use)
@psenough
psenough / index.html
Created May 15, 2019 16:38
device orientation and motion detection test page
<DOCTYPE html>
<html>
<head>
<script>
function init() {
//Find our div containers in the DOM
var dataContainerOrientation = document.getElementById('dataContainerOrientation');
var dataContainerMotion = document.getElementById('dataContainerMotion');
//Check for support for DeviceOrientation event
@psenough
psenough / video_from_mp3s.bat
Last active January 15, 2019 15:02
batch script to use ffmpeg to concat all mp3s in the directory and create a video using 00_1425.jpg single frame image as visuals
(for %%i in (*.mp3) do @echo file '%%i') > temp_list.txt
ffmpeg -f concat -i temp_list.txt -c copy temp_audio.wav
del temp_list.txt
ffmpeg -loop 1 -i 00_1425.jpg -i temp_audio.wav -shortest -vf scale=-2:480 video.mp4
del temp_audio.wav
node "C:\Users\Filipe Cruz\Documents\tracklist_from_directory_with_mp3s\app.js" "%cd%\\" >> temp_tracklist.txt
pause
@psenough
psenough / wavs_to_flac.bat
Created August 23, 2018 22:58
reencode all wavs in diretory to flac using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -map_metadata -1 "%%~nf.flac"
)
echo Finished
PAUSE
@psenough
psenough / wavs_to_mp3_no_metadata.bat
Created August 23, 2018 14:13
batch script to convert all wavs in a directory to 44.1 320kbps mp3s without metadata using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -ab 320k -map_metadata -1 "%%~nf.mp3"
)
echo Finished
PAUSE
@psenough
psenough / wavs_to_mp3.bat
Created August 22, 2018 04:07
batch script to convert all wavs in a directory to 44.1 320kbps mp3s using ffmpeg
@ECHO OFF
FOR %%f IN (*.wav) DO (
echo Converting: %%f
ffmpeg -i "%%f" -ar 44100 -ab 320k -map_metadata 0 "%%~nf.mp3"
)
echo Finished
PAUSE
@psenough
psenough / gist:a42d639aa202bb7ed9e41116f466b986
Last active August 9, 2018 13:02
few random shadertoy plasma tests
void mainImage( out vec4 O, vec2 U )
{
U *= 1./iResolution.xy;
if ((0.5*cos(iTime*5.0+U.x) - U.y+ 0.5) > 0.0) {
O = texture( iChannel0, U);
} else if ((0.5*cos(iTime*2.0+U.y) - U.x+ 0.5) > 0.0){
O = texture( iChannel1, U);
} else {
O = texture( iChannel2, U);
@psenough
psenough / test-gyro.html
Created May 30, 2018 09:21
gyroscope test page for mobile browsers
<DOCTYPE html>
<html>
<head>
<script>
function init() {
//Find our div containers in the DOM
var dataContainerOrientation = document.getElementById('dataContainerOrientation');
var dataContainerMotion = document.getElementById('dataContainerMotion');
//Check for support for DeviceOrientation event
@psenough
psenough / pixelscamp 2017 quiz answers
Created September 5, 2017 01:16
pixelscamp 2017 quiz answers
https://quiz.pixels.camp/challenge/2017-1-tick-tock-8e50a5ab-d59e82c126ab7660/steps/0-start.html
myst
ubik
grim fandango
foundation
street fighter alpha
contact
jet set willy
solaris
@psenough
psenough / dnxhd.bat
Created August 8, 2017 23:35
convert 1080p files with weird encoding to a davinci resolve friendly format
ffmpeg -i "in.mov" -vf format=yuv422p,scale=-1:1080,pad=1920:1080:(ow-iw)/2:0 -r 24000/1001 -c:v dnxhd -b:v 115M "out.mov"