Tech Brief: How To Create A Clip From A YouTube Video

Still from clip of Trump saying "Take the guns first, go through due process second"

Click the screenshot above to play or download the clip. This brief walks through how it was made, step by step.

Permanent Arweave URL (once propagated):
Trump: Take the guns first, go through due process second (24 sec, 891 KB)

The Problem

You want a short clip from a YouTube video -- not the whole thing, not a re-encoded screen recording, just the raw segment. Maybe it's a politician saying something revealing, a good bit from a podcast, or a funny moment you want to save locally.

The Tool

yt-dlp -- the de facto standard for downloading YouTube content. It's a maintained fork of the original youtube-dl that handles YouTube's constant anti-scraping changes better. It can search, download, trim, and convert in one pass.

Check if you have it:

which yt-dlp

If not, install it (macOS):

brew install yt-dlp

Or with pip:

pip install yt-dlp

Step-by-Step: The Trump "Take the Guns First" Clip

Step 1: Find the right video

Search YouTube for the most distinctive phrase from the quote. For Trump's "take the guns first, go through due process second" line, that exact phrase works as a search query:

yt-dlp --flat-playlist --dump-json ytsearch10:"take the guns first go through due process second"

This returns JSON metadata for the top 10 results. Look for the video title, channel, and duration to identify the source. In this case, the Fox Business segment (4:09) was the original source -- the interview where Trump said it to Jake Tapper.

Direct URL: https://www.youtube.com/watch?v=du4xz6Lndxk

Step 2: Find the exact timestamp of the quote

Download the auto-generated subtitles to find where the quote appears:

yt-dlp --write-auto-subs --sub-lang en --convert-subs srt --skip-download \
  -o "trump_fox" "https://www.youtube.com/watch?v=du4xz6Lndxk"

Read the resulting .srt file. The transcript reveals:

TimestampText
0:41"what do I need to take so long to go to court"
0:43"to get the due process procedures I like"
0:47"taking the guns early"
1:00"take the guns first, go through due process second"

The full quote runs from 0:41 to 1:05 -- start to finish of that thought.

Step 3: Download just the clip

Use --download-sections to specify the time range. The * prefix means relative to the video start. --force-keyframes-at-cuts ensures clean cuts (no frozen frames at boundaries).

yt-dlp --download-sections "*0:41-1:05" --force-keyframes-at-cuts \
  -f "bestvideo[height<=?1080]+bestaudio/best" \
  -o "trump-take-guns-first.mp4" \
  "https://www.youtube.com/watch?v=du4xz6Lndxk"

What this does:

Step 4: Play it

open trump-take-guns-first.mp4.mkv

Or with mpv (with your vim keybindings):

mpv trump-take-guns-first.mp4.mkv

Pro Tips

Search with specific channels. Append channel names to narrow results:

ytsearch5:"trump take the guns first Fox Business"

Download just audio. For podcast clips or music:

yt-dlp --download-sections "*1:30-2:00" -x --audio-format mp3 \
  -o "clip.mp3" "URL"

List available formats. See what resolutions/codecs are available:

yt-dlp -F "URL"

Handle archive issues. If you get "has already been recorded in the archive", bypass it:

yt-dlp --download-archive /dev/null --download-sections "*0:41-1:05" "URL"

Cleaner quotes without auto-generated subs. For critical transcripts, open the video in a browser and re-type the quote from the captions -- YouTube's auto-subs often mangle punctuation and split words oddly.

Summary

One command, a subtitle check, and you have a clean, source-quality clip. No re-encoding, no screen recording, no online clip services. Just the raw segment, saved locally.


Want to stay in touch?

If you'd like to support my work:

If there is a topic you'd like me to cover, please let me know! Questions, comments, and suggestions are welcome.