Video

June 29, 2026 ยท View on GitHub

Best Video Players

  • VLC - the open source champion forever, very mature with lots of features and built-in codec support for nearly every video format out there - it plays just about anything
  • MPlayer - another good open source media player, can sometimes play partially broken files better than VLC which may crash / exit the file if it's incomplete, and better for triggering off the command line
  • MPV - excellent open source video player based on MPlayer with more features and Lua scripting capabilities to customize its behaviours. See the MPV page for more details
brew install vlc
brew install mplayer
brew install mpv

From the command line, mpv and mplayer are better than VLC:

mpv "$file"
mplayer "$file"

Compared to:

"/Applications/VLC.app/Contents/MacOS/VLC" "$file"

If you want a short vlc command, try this:

alias vlc='/Applications/VLC.app/Contents/MacOS/VLC'

then you can do:

vlc "$file"

This is already included in the alaises in the DevOps-Bash-tools repo.

Buffer Streaming Videos in Browser

Faststream

https://faststream.online/

Install the extension and then just click the extension when on a web page.

It'll replace the video placer with a custom one that buffers.

Download Videos from Social Media

YouTube Downloader- yt-dlp

Works for various social media including YouTube, Facebook and Twitter / X.

See the YouTube Downloader page for details.

Inspect Video File Metadata

ffprobe "$file"

If you just want to see whether a video is 480p or 720p or 1080p etc:

ffprobe "$file" 2>&1 | grep 'Stream.*Video'
exiftool "$file"
mediainfo "$file"
mediainfo --fullscan "$file"
avprobe "$file"
mplayer -vo null -ao null -identify -frames 0 "$file"
tovid id "$file"

Get the resolution and other details like codec for a video file

ffmpeg -i "$file"

or

ffprobe "$file"

Downscale Video to 720p mp4

Useful to make good trade-off of quality vs size for social media posting.

Using DevOps-Bash-tools repo:

video_to_720p_mp4 "$file"

If the video is less than this resolution already, it'll do nothing.

Clip Video

Clip Video Interactively using QuickTime Player

Quickly clip a video on Mac using QuickTime Player:

open -a "QuickTime Player" "$file"

Then press shortcut Cmd + T or click Edit -> Trim to bring up a slider to drag and then save the resulting clip as a new file.

Clip Video on Command Line using FFmpeg

Create a clip from a video file using ffmpeg args:

  • -ss <offset> and -to <duration> where duration is integer seconds or HH:MM:SS format
  • -c copy - -c specifies codec, copy is quick and cheap codec compared to transcoding
ffmpeg -i input_vid.mp4 -ss 00:08:35.0 -t 72 -c copy output_vid.mp4

or using time format -to 00:01:12 which is the same as 72 seconds from offset start.

Transcode mkv into standard mp4 for smart TVs to play

ffmpeg -i "input.mkv" "output.mp4"

There is an automated script in the DevOps-Bash-tools repo's media/ directory to iterate many files easily:

mkv_to_mp4.sh *.mkv

or find all mkv files recursively under the given directory and convert them (retains originals), in this case the $pwd denoted by a dot:

mkv_to_mp4.sh .