Cookie Setup

Configure cookies for downloading videos from platforms that require authentication, such as YouTube (age-restricted content) or Bilibili (member-only videos).

When Do You Need Cookies?

Cookies are only required when downloading videos that need authentication:

  • Age-restricted YouTube videos
  • Bilibili member-exclusive content
  • Platform-specific premium content

For public videos, no cookie configuration is needed.

How to Get Cookies

  1. Log in to the target platform (YouTube, Bilibili, etc.) in your browser
  2. Install a browser extension like Get cookies.txt or EditThisCookie
  3. Export the cookies to a cookies.txt file (Netscape format)
  4. Configure VideoCaptioner with the cookie file path

Configuration

Terminal
# Set cookie file path
videocaptioner config set download.cookie_file /path/to/cookies.txt

# Download with cookies
videocaptioner download "https://www.youtube.com/watch?v=xxx"

Security note

Cookie files contain your login credentials. Keep them private and do not share or commit them to version control. Cookies may expire and need to be re-exported periodically.

Video Download

VideoCaptioner can download videos from supported platforms before processing:

Terminal
# Download from YouTube
videocaptioner download "https://www.youtube.com/watch?v=xxx"

# Download from Bilibili
videocaptioner download "https://www.bilibili.com/video/BVxxx"

# Download and process in one step
videocaptioner process "https://www.youtube.com/watch?v=xxx" --target-language ja