things
39 subscribers
28 photos
13 videos
10 files
7 links
random 4 u
Download Telegram
FFMPEG TIME:

Trim the First 5 Seconds of the Audio and Combine with Video (will be silenced 5 sec):
ffmpeg -i "VIDEO.mkv" -i "AUDIO.flac" -c:v libx264 -c:a aac -map 0:v -map 1:a -af "atrim=start=5" -shortest "output_with_shifted_audio.mp4"


Remove Original Audio, Add New Audio, and Shift the Audio Forward by 5 Seconds (same as before):
ffmpeg -i "VIDEO.mkv" -i "AUDIO.flac" -c:v libx264 -c:a aac -map 0:v -map 1:a -shortest -af "adelay=5000|5000" "output_with_shifted_audio.mp4"


Just add audio to video (with replacing original audio):
ffmpeg -i "VIDEO.mkv" -i "AUDIO.mp3" -c:v libx264 -c:a aac -map 0:v -map 1:a -shortest "output_with_new_audio.mp4"











Finally shift auido properly for 5 sec. without silence:



ffmpeg -i "AUDIO.mkv" -i "VIDEO.mp3" -filter_complex "[0:v]trim=start=0,setpts=PTS-STARTPTS[v];[1:a]atrim=start=5,asetpts=PTS-STARTPTS[a];[v][a]concat=n=1:v=1:a=1[vout][aout]" -map "[vout]" -map "[aout]" -c:v libx264 -c:a aac -shortest "output_with_shifted_audio.mp4"
alternative method for resizing *.qcow2:

  qemu-img info nix_disk.qcow2 
qemu-img resize nix_disk.qcow2 +30G
virt-sparsify --in-place nix_disk.qcow2
qemu-img info disk.qcow2
qemu-img info nix_disk.qcow2
sudo modprobe nbd max_part=10
sudo qemu-nbd -c /dev/nbd0 nix_disk.qcow2
gparted /dev/nbd0
sudo qemu-nbd -d /dev/nbd0
dont forget to strip your binary!
ffmpeg -ignore_loop 0 -i "ghostsaibu - 1774814925807894552.gif" -i "CHVRCHES - Deliverance (Official Instrumental).mp3" -vf "scale=trunc(iw/2)*4:trunc(ih/2)*4" -sws_flags neighbor -vcodec libx265 -preset medium -tune animation -acodec aac -b:a 192k  -shortest -t 00:00:30 video.mp4


another 101 way to make gif+sound=mp4
VOTV max performance settings for GTX950
Determining processor & platform:
LD_SHOW_AUXV=1 $(which true) | grep _PLATFORM
Search all files for HEX pattern "E831" recursively in current dir:
ug  --all --hexdump -U 'E831' -r $(pwd)
🥰1
Check installed packages with pacutils:

 paccheck --md5sum --quiet
Yes, the GCC oneliner

exec 5>$(mktemp) && printf "main(){write(1,\"haiiiiiiihelloooooohaiiiiiii\",29);}" | gcc -std=c89 -xc -o /dev/fd/5 - 2>/dev/null && /lib64/ld-linux-x86-64.so.2 /dev/fd/5
cb.c
1.4 KB
smol useful prog that will send to clipboard piped content

usage:

gcc -o cb cb.c $(pkg-config --cflags --libs gtk+-3.0) &&  chmod +x cb && sudo cp cb /usr/local/bin/


then
any command with output  | cb


example:
find /tmp | cb
Irregular alternative to heredoc cat using bare /dev/stdin:
cp /dev/stdin /tmp/plaintext.txt << EOF
some
multiline
text
test
test
EOF
A way to make a full disk backup of WIN* (NTFS partition):

backup:

~/trash $ cat save-image.sh 

ntfsclone --save-image -o - /dev/sdb1 | zstd -9 -o /run/media/host/old2.52/WIN8.1BKUPS/sdb1-DEFRAG-ACT-NVIDIA-OPTI-11AUG2021.img


restore:

~/trash $ cat restore-images.sh 

zstdcat /run/media/host/old2.52/WIN8.1BKUPS/SELEECT |ntfsclone --restore-image --overwrite /dev/SELEECT -
bash forkbomb not working there:


systemd-run --user --unit=safe-fork \
--property=MemoryMax=1G \
--property=CPUQuota=10% \
--property=TasksMax=3 \
--property=TimeoutSec=3 \
--pty /bin/bash
best compression using ZPAQ

lrzip -z -L 9 -U  -p $(nproc) <file>



(its very slow, but compression ratio around 30% better than ZST )
ZST variant:


zstd --ultra -22 --long=16 -T$(nproc) -v storage.qcow2 -o storage_$(date +%Y%m%d)_.qcow2.zst


zstd --ultra -22 --long=16 -T$(nproc) -v system.qcow2 -o system_$(date +%Y%m%d)_.qcow2.zst