FFMPEG
- Convert audio:
ffmpeg -i default.ogg default.mp3 - Start a RTMP server and save to file
ffmpeg -f flv -listen 1 -i rtmp://0.0.0.0:1935/live/app -c copy hi.mp4 - Start a RTMP server and play it
ffplay -listen 1 -i rtmp://0.0.0.0:1935/live/key - Stream desktop:
ffmpeg -f gdigrab -i desktop -c:v libx264 -c:a aac -f flv rtmp://35.231.89.93/live/asdfas - Stream camera to rtmp
ffmpeg -f v4l2 -i /dev/video0 -c:v libx264 -c:a aac -f flv rtmp://192.168.0.8:1935/live/key
Linux
- List video devices picked up by kernel:
ls -ltrh /dev/video*
Windows
- Clear scoop cache
scoop cache rm --all - Start webdav with rclone:
rclone serve webdav . --addr :8082(I use this to move stuff using SnapSync on iOS) - Organize based on EXIF:
'.\exiftool-13.38_64\exiftool(-k).exe' -d "%Y-%m-%d" '-directory<E:/Pictures/photos/$DateTimeOriginal' "E:/Pictures/process"- For some you may use
$CreateDate(videos?) and the fallback is$FileCreateDate
- For some you may use
Docker
- Create docker context:
docker context create remote --docker "host=ssh://azureuser:1.2.3.4" - List docker contexts:
docker context ls - Switch docker context:
docker context use <context>(local context isdefault) - Turns out there is a way to shrink the vhdx images properly in windows:
- Run in cmd:
docker system prune(optional—all), to clean up disk space - Right mouse click on docker desktop in system tray → quit
- Run in cmd:
wsl --shutdown - Run
Optimize-VHD -Path "$env:LOCALAPPDATA\Docker\wsl\data\ext4.vhdx" -Mode Full, this will resize the vhdx images
- Run in cmd:
Same way you can try to find vhdx images that utilize too much space and optimize them as well. You can use TreeSize(Bing it: Tree Size Windows) to find which image takes the most of the space and optimize them.
P.S. dont forget to run docker system prune
Tmux
- https://tmuxcheatsheet.com/
- Enable mouse:
Ctrl + b⇒:set mouse on