Youtube Clip avatar
Youtube Clip
Under maintenance

Pricing

$10.00/month + usage

Go to Store
Youtube Clip

Youtube Clip

Under maintenance
elpetas/youtube-clip

Developed by

Johann Vargas

Maintained by Community

Actor: YouTube Video Clipper 🎬 Downloads Youtube video clips Features βœ… Download YouTube clips by specifying start and end timestamps. βœ… Extract clips based on spoken phrases by analyzing video transcripts. βœ… Automatically authenticate using YouTube cookies. βœ… Uses Apify Proxy to avoid detection.

0.0 (0)

Pricing

$10.00/month + usage

0

Monthly users

4

Runs succeeded

>99%

Response time

6.7 days

Last modified

9 days ago

YouTube Clip Downloader with Apify

This Apify Actor enables you to download specific video clips from YouTube based on either timestamps or text segments extracted from the video transcript. The Actor utilizes yt-dlp, Puppeteer, and Apify SDK to handle video fetching, authentication via exported cookies, and transcript analysis.

Features

  • Download video clips by timestamp: Provide a start and end time to extract a specific segment.
  • Download video clips by text segment: Automatically determine timestamps by searching the transcript.
  • Fetch YouTube authentication cookies: Uses Puppeteer to extract and store session cookies for authentication.
  • Supports proxy configuration: Ensures successful video access and downloads via rotating proxies.
  • Handles transcripts intelligently: Fetches auto-generated subtitles and processes them for timestamp extraction.

How It Works

  1. Fetch YouTube Cookies

    • Uses Puppeteer to log in and extract cookies.
    • Saves cookies in Netscape format for yt-dlp authentication.
  2. Download Video Transcript (Optional)

    • Fetches and saves the transcript in .vtt format.
    • Converts transcript to plain text for easier processing.
  3. Find Timestamps from Text (If using text-based clipping)

    • Searches transcript for a specific phrase and extracts timestamps.
    • Adds buffer time before and after the detected segment.
  4. Download Video Clip

    • Uses yt-dlp with cookies and proxy support.
    • Clips the desired section based on timestamps.
    • Saves the extracted video file on Apify Storage.

πŸ›  Input Parameters

Using your own Cookies is encouraged to avoid getting blocked by youtube they (provided cookies are not stored anywhere) The Actor accepts a JSON object with the following parameters:

ParameterTypeRequiredDescription
videoUrlstringβœ…The URL of the YouTube video.
fileNamestring❌Name of the output video file.
startTimenumber❌Start time in seconds (Required if method="timestamps").
endTimenumber❌End time in seconds (Required if method="timestamps").
textSegmentstring❌A spoken phrase to locate in the transcript (Required if method="textSegment").
startSegmentstring❌Start phrase in the transcript (Required if method="startEndText").
endSegmentstring❌End phrase in the transcript (Required if method="startEndText").
downloadTranscriptFlagboolean❌Whether to save the full transcript (true or false, default: false).
videoQualitystring❌Video quality (default: 360).
cookiesstring❌Cookies in Netscape format

πŸ”Ή Example Input

###Basic Structure

1{
2   "tasks": [
3      {
4         "videoUrl": "https://www.youtube.com/watch?v=abc123",
5
6      }
7   ]
8   "cookies": "# Netscape HTTP Cookie File\n..."  
9}
10
11### πŸ“Œ Clip by Timestamps  
12```json
13{
14  "videoUrl": "https://www.youtube.com/watch?v=abc123",
15  "fileName": "example_clip",
16  "startTime": 30,
17  "endTime": 60,
18  "videoQuality": 720,
19}

πŸ“Œ Clip by Text Segment

1{
2  "videoUrl": "https://www.youtube.com/watch?v=abc123",
3  "fileName": "example_clip",
4  "method": "textSegment",
5  "textSegment": "Hello everyone, welcome back!",
6  "videoQuality": 1080,
7}

πŸ“Œ Clip by Start & End Text

1{
2  "videoUrl": "https://www.youtube.com/watch?v=abc123",
3  "fileName": "example_clip",
4  "startSegment": "Let's begin our tutorial",
5  "endSegment": "That concludes our session",
6  "videoQuality": 144,
7  "downloadTranscriptFlag": true,
8}

πŸ“¦ Output Storage

The extracted video clip and transcript (if requested) are stored in Apify Key-Value Store.

  • Video file: {fileName}.webm
  • Transcript (if requested):
    • {fileName}_transcript.txt (Plain text)
    • {fileName}_transcript.vtt (VTT format)

You can retrieve the files from Key-Value Store via the Apify API or Console.

Pricing

Pricing model

RentalΒ 

To use this Actor, you have to pay a monthly rental fee to the developer. The rent is subtracted from your prepaid usage every month after the free trial period. You also pay for the Apify platform usage.

Free trial

3 days

Price

$10.00