Skip to content

Instantly share code, notes, and snippets.

View DateAndTime.bat
echo %date%
echo %time%
set time2=%time:~0,8%
echo %time2%
pause
View invMatrix.py
import numpy as np
matrix1 = np.array([[3, 4],
[1, 1]])
matrix1_inv = np.linalg.inv(matrix1)
print(matrix1_inv)
print(np.dot(matrix1,matrix1_inv))
matrix2 = np.array([[1, 1, 2],
[3, -1, 2],
View changeVolume.bat
ffmpeg -i input.mp3 -vcodec copy -af volume=6dB output_plus_6db.mp3
ffmpeg -i input.mp3 -vcodec copy -af volume=-6dB output_minus_6db.mp3
View ChangeFramerate.bat
ffmpeg -i input.mp4
ffmpeg -i input.mp4 -r 10 output_fps10.mp4
ffmpeg -i input.mp4 -r 60 output_fps60.mp4
pause
View AudioLoop.bat
ffmpeg -y -stream_loop 10 -fflags +genpts -i input.mp3 -c copy input_10times.mp3
pause
View calculateDet.py
import numpy as np
matrix1 = np.array([[1, 2],
[3, 4]])
det1 = np.linalg.det(matrix1)
print(det1)
matrix2 = np.array([[1, 2, 3],
[4, 5, 6],
[7, 8, 9]])
View FFMPEGMovieCompare.bat
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "hstack" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -filter_complex "vstack" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]hstack=inputs=3[v]" -map "[v]" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]vstack=inputs=3[v]" -map "[v]" output.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -i input4.mp4 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" output_hstack.mp4
ffmpeg -i input1.mp4 -i input2.mp4 -i input3.mp4 -filter_complex "[0:v][1:v][2:v]xstack=inputs=3:layout=0_0|w0_0|0_h0[v]" -map "[v]" output.mp4
pause
View ZeroPadding.bat
@echo off
setlocal enabledelayedexpansion
for /l %%a in (1,1,1000) do (
set num=000%%a
set num=!num:~-4,4!
echo !num!
)
View ForTestFolder.bat
@echo off
for %%i in (*) do (
echo %%i >> filelist1.txt
)
for %%i in (*.jpg) do (
echo %%i >> filelist2.txt
)
View ForTest.bat
@echo off
for /l %%i in (0,1,10) do (
echo %%i
)
pause