for i in .avi; do ffmpeg -i "$i" "${i%.}.mp4"; done
-vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k
for i in *.avi; do ffmpeg -i "$i" -vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k "${i%.avi}.mp4"; done
for i in .avi; do ffmpeg -i "$i" "${i%.}.mp4"; done
-vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k
for i in *.avi; do ffmpeg -i "$i" -vf yadif -c:v libx264 -preset slow -crf 19 -c:a aac -b:a 256k "${i%.avi}.mp4"; done
# 1. Compress a video to the smallest possible size | |
ffmpeg -i input.mp4 -vf "scale=iw/2:ih/2" -c:v libx265 -preset ultrafast -crf 28 -c:a aac -b:a 64k output.mp4 | |
# 2. Remove audio from a video | |
ffmpeg -i input.mp4 -an output.mp4 | |
# 3. Convert a video to a GIF | |
ffmpeg -i input.mp4 -vf "fps=10,scale=320:-1:flags=lanczos" output.gif | |
# 4. Convert a specific part of a video to a GIF (from 30s, duration 10s) |
import os | |
import shutil | |
from datetime import datetime | |
from tqdm import tqdm | |
source = "/from" | |
dest = "/to" | |
dist_set = set() | |
file_count = 0 |
import os | |
import shutil | |
from tqdm import tqdm | |
gb_games = [] | |
gbc_games = [] | |
folder_path = "/Users/wotori/Documents/ROMS/GB/" |
pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME -f ~/backup.sql
pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME | psql -U postgres DB_NAME
docker exec local_pg_container bash -c "pg_dump --dbname=postgresql://postgres:DB_PASSWORD@DB_HOST:DB_PORT/DB_NAME | psql -U postgres DB_NAME"
# from here https://askubuntu.com/questions/59356/how-do-i-get-chinese-input-to-work | |
sudo apt-get install ibus-pinyin; | |
# or | |
sudo apt-get install ibus-sunpinyin; | |
# reduce animation | |
dconf write /org/gnome/desktop/interface/enable-animations false |
video to gif | |
``` | |
ffmpeg -ss 0 -t 10 -i enter.mp4 -vf "fps=10,scale=500:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 enter.gif | |
``` |
git filter-branch --index-filter 'git rm -rf --cached --ignore-unmatch path_to_file' HEAD |