🖥️mplayer

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the mplayer command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ███╗   ███╗██████╗ ██╗      █████╗ ██╗   ██╗███████╗██████╗ 
#                ████╗ ████║██╔══██╗██║     ██╔══██╗╚██╗ ██╔╝██╔════╝██╔══██╗
#                ██╔████╔██║██████╔╝██║     ███████║ ╚████╔╝ █████╗  ██████╔╝
#                ██║╚██╔╝██║██╔═══╝ ██║     ██╔══██║  ╚██╔╝  ██╔══╝  ██╔══██╗
#                ██║ ╚═╝ ██║██║     ███████╗██║  ██║   ██║   ███████╗██║  ██║
#                ╚═╝     ╚═╝╚═╝     ╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝╚═╝  ╚═╝
                                                                            
                                                                            
                                                                          
mplayer recent.mp4 -loop 0 -speed 8 
# Play a video file recent.mp4 at 8x speed, looping it seamlessly forever.

mplayer -vo dummy -ao dummy -identify * 2>&1 | grep ID_LENGTH  | sed 's/.*=\([0-9]*\)/\1/' | xargs echo | sed 's/ /+/g' | bc | awk 'S=$1; {printf "%dh:%dm:%ds\n",S/(60*60),S%(60*60)/60,S%60}'
# Get the total length of all videos in the current dir in H:m:s
# You're behind on your TV catch-up, but how far behind? This command tries to open mplayer against all files in the current dir. If it's a video file it will contain ID_LENGTH, which is summed and output in hours, minutes and seconds.
# Someone better at awk could probably reduce this down a lot.

mplayer -endpos 0.1 -vo null -ao null -identify *.avi 2>&1 |grep ID_LENGTH |cut -d = -f 2|awk '{SUM += $1} END { printf "%d:%d:%d\n",SUM/3600,SUM%3600/60,SUM%60}'
# Get the total length of all video / audio in the current dir in H:m:s

soxi -D * | awk '{SUM += $1} END { printf "%d:%d:%d\n",SUM/3600,SUM%3600/60,SUM%60}'
# Get the total length of all video / audio in the current dir (and below) in H:m:s - Uses soxi instead of mplayer

mplayer 0[89]??18*.mp4 
# Play videos form Aug/Sep 2018. My phone camera app has a weird date format (MMYYDD_HHMMSS). Fortunately I can find videos I've synced to backup easily enough with globbing expressions. ? means match anything in that one place. [89] means match 8 or 9.

mplayer M?rklintage* 
# If you encounter a file that is hard to type/tab complete, try using a ? to replace the characters you can't type.

mplayer -vo png -ss 3:46 -frames 20 stairs.mp4 
# Write out 20 png format frames from a video starting at 3 minutes, 46 seconds.

mplayer -fs $( youtube-dl -g 'http://www.youtube.com/watch?v=tjUgxpl9ttg …' ) 
# Watch youtube video directly in mplayer, fullscreen.

#==============================##==============================#
# CMD MPLAYER						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░