I use yt-dlp daily inside ViralMint for competitor research across 1,800+ supported sites — YouTube, TikTok, Douyin, Bilibili, Xiaohongshu, Instagram. On a 12-minute TikTok video, yt-dlp -F returns the full format matrix in under 300ms; downloading a clean 1080p MP4 plus extracting the JSON metadata takes ~7 seconds total on a 200 Mbps connection. Browser extensions either cap resolution at 720p or break when a platform rotates its manifest format — yt-dlp doesn’t.

This post is the exact commands I run, the format-selector strings that produce clean editor-ready MP4s, and the JSON fields that matter for trend scouting. All of it lives inside ViralMint’s open-source repo at github.com/openclaw-easy/ViralMint and gets called via backend/services/yt_dlp_service.py.

1. Inspecting the Quality Matrix

Before downloading, you should check what the platform is actually serving. This is crucial for analyzing high-bitrate content from platforms like YouTube or Bilibili.

$ yt-dlp -F https://www.youtube.com/watch?v=dQw4w9WgXcQ

ID  EXT   RESOLUTION FPS CH │   FILESIZE   TBR PROTO │ VCODEC          VBR ACODEC
─────────────────────────────────────────────────────────────────────────────────
137 mp4   1920x1080   30    │   45.21MiB  1500k https │ avc1.640028  1500k video only
248 webm  1920x1080   30    │   38.12MiB  1200k https │ vp9          1200k video only
140 m4a   audio only        │    3.20MiB   128k https │ audio only          mp4a.40.2

2. The “Research-Ready” Download

To get a clean .mp4 that works in any editor (or ViralMint’s Whisper engine), use this command:

yt-dlp -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" --merge-output-format mp4 [URL]

3. Extracting Structured Data

Research isn’t just about the video file; it’s about the metadata. You can extract descriptions, tags, and view counts without even downloading the video:

yt-dlp --print-to-file "%(title)s\n%(description)s\n%(tags)s" research.txt [URL]

4. Handling Xiaohongshu (RED)

Xiaohongshu is a goldmine for lifestyle trends, but its mobile-first URLs are notoriously difficult to scrape. yt-dlp handles the JS-heavy rendering that bricks standard browser tools.

Pro Tip: If a Xiaohongshu link fails, it’s often due to a regional signature. ViralMint solves this by bundling a headless Chromium instance (Enhanced Download) that automates the manifest capture:

PlatformStandard Scraperyt-dlp / ViralMintSuccess Rate
YouTube95%100%High
TikTok80%99%High
Xiaohongshu10%95%Critical

5. Benchmarking Local Performance

Running yt-dlp locally is significantly faster than using web-based “SaaS” downloaders. Here is what we see on typical hardware:

  • Network: 1Gbps Fiber
  • Platform: YouTube (4K HDR)
  • Download Speed: ~85MB/s
  • FFmpeg Remux Time: < 3 seconds

Automate with ViralMint

If you are tired of typing terminal commands, ViralMint wraps yt-dlp in a professional desktop UI. It doesn’t just download; it immediately runs local Whisper transcription and AI hook analysis on every file.

It handles the “dirty work” of:

  • Capturing Xiaohongshu manifests automatically.
  • Managing browser cookies for age-gated content.
  • Remuxing DASH streams into clean MP4s.

Download ViralMint at viralmint.net to turn your terminal research into a automated pipeline.