snippets/shell/bash/avt/README.md

63 lines
2.5 KiB
Markdown
Raw Normal View History

2023-01-11 19:44:42 +03:00
# avt: ali's (h264) video tool
2023-01-11 20:02:46 +03:00
2023-01-11 19:44:42 +03:00
avt: ali's (h264) video tool
Usage: ./avt rec|record
./avt nvid|normalize
./avt help
Environment variables:
avt_debug: print every command before running [set to enable]
2023-01-11 19:44:42 +03:00
Commands:
2023-01-11 19:44:42 +03:00
./avt rec / record
Record screen and audio in very high quality
Usage: ./avt rec
2023-01-11 19:44:42 +03:00
Enviroment variables:
2023-01-12 00:12:20 +03:00
rec_display: set x11 display (default: $DISPLAY)
rec_out: set output file (default: ~/Desktop/$(date +%F_%H-%M-%S).mkv)
2023-01-11 19:44:42 +03:00
rec_fps: set framerate (default: 60)
rec_res: set resolution (default: 1920x1080)
2023-01-11 21:35:31 +03:00
rec_preset: set preset (default: ultrafast)
rec_vrate: replace -crf options
rec_crf: set crf, use 0 for lossless (default: 10)
rec_adev: space separated pulseaudio source devices (default: default and first running monitor)
2023-01-11 21:24:16 +03:00
rec_ar: set audio samplerate (default: 96000)
rec_compress: immediately start comp after recording ends [set to enable]
./avt comp / compress
Compress a recording without losing any video quality and noticeable audio quality
Usage: ./avt comp <file> [outfile]
Environment variables:
comp_crf: set crf, this should be greater than or equals to rec_crf (default: 10)
comp_ac: set audio codec (default: libopus)
comp_ba: set audio bitrate (default: 320k)
comp_ar: set audio samplerate, this should be less than or equals to rec_ar (default: 96000)
2023-01-11 19:44:42 +03:00
./avt nvid / normalize
Normalize video & audio for backwards compatibility and lower file size
2023-01-11 19:44:42 +03:00
Usage: ./avt nvid <file> [outfile]
Environment variables:
nvid_preset: set preset (default: veryslow)
nvid_vrate: replace -crf options
2023-01-11 21:20:53 +03:00
nvid_crf: set crf value (default: 19)
2023-01-11 19:44:42 +03:00
nvid_rgb: use libx264rgb [set to enable]
nvid_pixfmt: set pixel format (default: yuv420p)
nvid_profile: set profile (default: high)
2023-01-11 21:35:31 +03:00
nvid_ac: set audio codec (default: libopus)
2023-01-11 19:44:42 +03:00
nvid_ba: set audio bitrate (default: 160k)
nvid_ar: set audio samplerate (default: 48000)
avt will try to source ~/.avtrc if it exists. You have access to the findmonitor function in there.
2023-01-11 20:02:46 +03:00
# Dependencies
- `bash`
- `ffmpeg`
- `perl`
- `pactl`
# Requirements
This assumes you use X11, PipeWire and pipewire-pulse.
2023-01-11 20:07:00 +03:00
You also need a pretty fast disk and a lot of free space to record with this tool with the default settings. Consider increasing [`rec_crf`](https://trac.ffmpeg.org/wiki/Encode/H.264#crf) or choosing a slower [`rec_preset`](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset) if you don't have those.