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
| #!/usr/bin/env python3 | |
| """A tiny, entirely fictional development workstation. Python 3.9+, no packages. | |
| Run: python3 dev_show.py | |
| Keys: Q / Esc quit, Space pause, +/- speed, T theme, N next file. | |
| Nothing is executed, downloaded, built, or written by the simulation. | |
| """ | |
| import argparse | |
| from collections import deque |
| mkdir -p tracks | |
| shnsplit -o flac -f album.cue -d tracks album.flac | |
| cd tracks | |
| for f in *.flac; do | |
| echo "==> Converting: $f" | |
| ffmpeg -hide_banner -loglevel warning -stats -i "$f" \ | |
| -codec:a libmp3lame -q:a 2 -map_metadata 0 \ | |
| "${f%.flac}.mp3" |
| from telethon import TelegramClient | |
| from telethon.sessions import StringSession | |
| API_ID = int(input("API_ID: ")) | |
| API_HASH = input("API_HASH: ") | |
| with TelegramClient(StringSession(), API_ID, API_HASH) as client: | |
| print("STRING_SESSION=", client.session.save()) |
| #!/usr/bin/env python3 | |
| import subprocess | |
| import json | |
| import re | |
| import sys | |
| from pathlib import Path | |
| def extract_chapters(input_file): | |
| """ |
| import os | |
| import shutil | |
| from datetime import datetime | |
| from tqdm import tqdm | |
| source = "/mnt/raid/iPhoneDima/iphone_dump_25_04_14" | |
| dest = "/mnt/raid/iPhoneDima/" | |
| file_list = [] |
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 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"