Skip to content

Instantly share code, notes, and snippets.

ffmpeg -referer "https://claplivehdplay.ru/" -http_persistent false -i "https://salamus2023.onlinehdhls.ru/wiki/wikiten1/tracks-v1a1/mono.m3u8" -referer "https://claplivehdplay.ru/" -http_persistent false -i "https://salamus2023.onlinehdhls.ru/wiki/wikiten3/tracks-v1a1/mono.m3u8" -filter_complex "[0:v][1:v]xstack=inputs=2:layout=0_0|0_h0[v]" -map "[v]" -map 0:a -f matroska - | ffplay -
@colemar
colemar / 1 videoframes.md
Last active January 22, 2023 23:37
Extract key frames and scenecuts from video

Extract key frames and scenecuts from video

  Usage: videoframes [OPTION] FILE
  Extract key frames and scenecuts from video FILE.

  -k  key frames only
  -s  scenecuts only

  Creates jpg pictures containing a mosaic of thumbnails of the selected frames.
@colemar
colemar / print_key_frames
Last active January 10, 2023 17:59
Print key frame numbers and intervals with ffprobe
ffprobe in.mkv -v error -select_streams v:0 -show_frames -skip_frame nokey -print_format csv | gawk -F, "/^frame/{print $22,$22-n;n=$22}"
ffprobe in.mkv -v error -select_streams v:0 -show_frames -skip_frame nokey -show_entries frame=pts_time -print_format csv | gawk -F, "/^frame/{printf \"%.0f %.0f\n\",$2*23.976,($2-n)*23.976;n=$2}"
ffprobe in.mkv -v error -select_streams v:0 -show_entries packet=pts_time,flags -print_format csv | gawk -F, "$3~\"^K\"{printf \"%.0f %.0f\n\",$2*23.976,($2-n)*23.976;n=$2}"
@colemar
colemar / #wg-peer.md
Last active April 20, 2024 20:55
Manage Wireguard peers (IPv4 only)

Manage Wireguard peers (IPv4 only)

List, add or delete Wireguard peers. Also show client configuration for already added peers.

wg-peer [add|show <peer>|del <peer>|list]

where:

  • a[dd] add a new peer
@colemar
colemar / README.md
Last active November 23, 2022 21:09
Find Files in Time Range

Find Files in Time Range

Recursively search for all files whose last modification time is in a specified range.

fftr path {time|file} range [b]

where:

  • path is where to start the search
ipaddr=144.24.81.189
[[ "$ipaddr." =~ ^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])[.]){4}$ ]] && echo "Well formed" || echo "Syntax error"
@colemar
colemar / Free ip address geolocation with bash
Last active November 21, 2022 14:58
Free ip address geolocation with bash
sudo wget https://gist.github.com/colemar/727125dea3d17543b1099ccff84f6eda/raw/88dd98c6283d9586248e9644023b4bb37ee1799f/gil -o /usr/local/bin/gil
sudo chmod +x /usr/local/bin/gil