idea for creating a circular buffer for desktop recordings using ffmpeg is feasible! This concept is similar to how DVRs or security cameras with a "looping" or circular buffer function operate.
/tmp/desktop_recording000.mp4 & /tmp/desktop_recording001.mp4
at 600-second intervals, so you can always look at dementia
using nvidia hevc codec
—— upd
with HLS stream even bettter
gpu-screen-recorder-gtk - doing all this but better
ffmpeg -f x11grab -r 25 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -c:v hevc_nvenc -qp:v 20 -af hwac3 -b:a 96k -f segment -segment_time 600 -segment_wrap 2 -segment_format_options movflags=+faststart -reset_timestamps 1 /tmp/desktop_recording%03d.mp4
continuously record the desktop in 2 files: /tmp/desktop_recording000.mp4 & /tmp/desktop_recording001.mp4
at 600-second intervals, so you can always look at dementia
using nvidia hevc codec
—— upd
with HLS stream even bettter
ffmpeg -f x11grab -r 25 -s $(xdpyinfo | grep dimensions | awk '{print $2}') -i :0.0 -c:v hevc_nvenc -qp:v 20 -af hwac3 -b:a 96k -f hls -hls_time 5 -hls_list_size 0 -hls_flags delete_segments -hls_playlist_type event /tmp/output.m3u8
___upd3gpu-screen-recorder-gtk - doing all this but better
🔥1
static black screen for 10hours and 1 second:
(around 6mb)
ffmpeg -f lavfi -i color=c=black:s=1920x1080:r=1 -f lavfi -i anullsrc=channel_layout=stereo:sample_rate=8000 -t 10:00:01 -c:v libx264 -c:a aac -b:v 1k -b:a 1k -crf 63 -movflags +faststart -pix_fmt yuv420p -y output4.mp4
(around 6mb)
huge hack
Extract an image from a raw disk and transfer it to an erofsimage format
(you were unable to find anything similar on the internet)
Extract an image from a raw disk and transfer it to an erofsimage format
guestfish --ro -i tar-out -a debian-10.img / - | mkfs.erofs --all-root --gzip --tar=- debian2.erofs
(you were unable to find anything similar on the internet)
shitty regexp, get second interface name in your system:
(not well tested)
```
----
(not well tested)
```
ip -c=never -o link show | grep -oP '(?<=^2:\s)\w+'```
----
-c=neveris proper arg and should be there
The unproper way to get 10./8 IPs:
printf "%d.%d.%d.%d\n" "$((10 % 255))" "$((RANDOM % 255))" "$((RANDOM % 255))" "$((RANDOM % 255))"
try entering this text into the search bar of any web browser::
y will get editable notepad
data:text/html, <html contenteditable>
Using windows powershell cut first 512 bytes of files in C:\123\123\ folder.
$PATH = "C:\123\123\"
$BYTES_TO_TRIM = 512
$files = dir $PATH | where { !$_.PsIsContainer }
foreach ($file in $files) {
Write-Output "File being truncated: $($file.FullName)"
Write-Output " Original Size: $($file.Length) bytes"
Write-Output " Truncating $BYTES_TO_TRIM bytes..."
$byteEncodedContent = [System.IO.File]::ReadAllBytes($file.FullName)
$truncatedByteEncodedContent = $byteEncodedContent[$BYTES_TO_TRIM..($byteEncodedContent.Length - 1)]
Set-Content -value $truncatedByteEncodedContent -encoding byte -path "$($file.FullName)"
Write-Output " Size after truncation: $((Get-Item $file.FullName).Length) bytes"
Write-Output "Truncation done!`n"
}
🔥1