Last active
April 15, 2020 21:41
-
-
Save QasimK/0fe6ebc15559965b10d6cf2cab1e1e8f to your computer and use it in GitHub Desktop.
description
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[snippets]] | |
description = "Cut a video file" | |
command = "ffmpeg -i <file> -ss <start> -to <end> -c copy cut-<file>" | |
output = "" | |
[[snippets]] | |
description = "Strip all personal data from an image using exiftool" | |
command = "exiftool -all= <image>" | |
output = "" | |
[[snippets]] | |
description = "Print timestamps of all keyframes of a video file" | |
command = "ffprobe -loglevel error -skip_frame nokey -select_streams v:0 -show_entries frame=pkt_pts_time -of csv=print_section=0 <file>" | |
output = "" | |
[[snippets]] | |
description = "Mount a drive \"better\"" | |
command = "udisksctl mount -b /dev/sd<letter><number>" | |
output = "" | |
[[snippets]] | |
description = "Pretty print all mount points" | |
command = "mount | column -t" | |
output = "" | |
[[snippets]] | |
description = "Get the Weather" | |
command = "curl wttr.in" | |
output = "" | |
[[snippets]] | |
description = "Get your IP address" | |
command = "curl ifconfig.co" | |
output = "" | |
[[snippets]] | |
description = "Display a QR code" | |
command = "qrencode -s 7 -o - \"<string>\" --type ANSI256" | |
output = "" | |
[[snippets]] | |
description = "Transcode a video to a target bit rate" | |
command = "ffmpeg -y -i <file> -c:v libx264 -b:v 8000k -pass 1 -an -f mp4 /dev/null; and ffmpeg -i <file> -c:v libx264 -b:v 8000k -pass 2 -c:a copy out-<file>" | |
output = "" | |
[[snippets]] | |
description = "Transcode/Downscale a video to 1080p H.264" | |
command = "ffmpeg -i <file> -c:v libx264 -preset slow -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease:flags=lanczos -c:a copy -movflags +faststart 1080p-<file>" | |
output = "" | |
[[snippets]] | |
description = "Transcode/Downscale a video to 1080p H.265" | |
command = "ffmpeg -i <file> -c:v libx265 -preset slow -vf scale=w=1920:h=1080:force_original_aspect_ratio=decrease:flags=lanczos -c:a copy -movflags +faststart 1080p-<file>" | |
output = "" | |
[[snippets]] | |
description = "Start a webserver serving current folder" | |
command = "python -m http.server 8080 --bind 127.0.0.1" | |
output = "" | |
[[snippets]] | |
description = "Generate a QR code for a WiFi Access Point" | |
command = "qrencode -t ansiutf8 \"WIFI:T:WPA;S:<SSID>;P:<PASSWORD>;;\"" | |
output = "" | |
[[snippets]] | |
description = "Find time to watch all videos in this folder (total length of videos)" | |
command = "exiftool -q -m -p '$Duration#' ./*.mp4 | awk '{sum += $0}; END{print sum/60\"mins\"}'" | |
output = "" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment