Skip to content

Instantly share code, notes, and snippets.

View LvJC's full-sized avatar
I may be slow to respond.


I may be slow to respond.
  • Tianjin University
View GitHub Profile
# Get all metadata
ffprobe -hide_banner -loglevel fatal -show_error -show_format -show_streams -show_programs -show_chapters -show_private_data -print_format json <video>.mp4
# {
# "programs": [
# ],
# "streams": [
# {
# "index": 0,
LvJC / imgcat
Created January 11, 2019 05:14
Visualize images on Linux Server Using imgcat
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST. We use TERM instead of TMUX because TERM
# gets passed through ssh.
function print_osc() {
if [[ $TERM == screen* ]] ; then
printf "\033Ptmux;\033\033]"