пятница, 31 августа 2018 г.

FFmpeg to Resolume. Transcode video files to Resolume.


Try this code on PC run as *.cmd or *.bat file:

mkdir mp4
mkdir orig
FOR /F "tokens=*" %%G IN ('dir /b "*.mp4"') DO (ffmpeg -y -i "%%G" -f mp4 -vcodec libx264 -preset slow -crf 20 -movflags +faststart  -profile:v high -pix_fmt yuv420p -g 1 -bf 0  -flags +cgop -x264-params keyint=1:min-keyint=1   -acodec aac -ac 2 -ab 128k -ar 48000   -async 1  "mp4\%%~nG.mp4"  -c:a pcm_s16le "mp4\%%~nG.wav" & move "%%G" orig\)
pause

You should start this script file in same folder with your video files.

This code create 2 folders for encoded files and for original files, make transcoded video file and audio in "mp4" folder, and remove original file to "orig" folder.

You can use [-an] instead [-acodec aac -ac 2 -ab 128k -ar 48000   -async 1 ] , and change  ["*.mp4"] to other input format.
Also, you can change video quality by changing [-crf] value.

convert colors to midi note for midi controllers

I recently (2 years ago) designed and built a simple MIDI controller for my intercom system using an Arduino Leonardo, USB hub, sound card, ...