
Youtube Clip
Pricing
$10.00/month + usage

Youtube Clip
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
-
Fetch YouTube Cookies
- Uses Puppeteer to log in and extract cookies.
- Saves cookies in Netscape format for
yt-dlp
authentication.
-
Download Video Transcript (Optional)
- Fetches and saves the transcript in
.vtt
format. - Converts transcript to plain text for easier processing.
- Fetches and saves the transcript in
-
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.
-
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.
- Uses
π 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:
Parameter | Type | Required | Description |
---|---|---|---|
videoUrl | string | β | The URL of the YouTube video. |
fileName | string | β | Name of the output video file. |
startTime | number | β | Start time in seconds (Required if method="timestamps" ). |
endTime | number | β | End time in seconds (Required if method="timestamps" ). |
textSegment | string | β | A spoken phrase to locate in the transcript (Required if method="textSegment" ). |
startSegment | string | β | Start phrase in the transcript (Required if method="startEndText" ). |
endSegment | string | β | End phrase in the transcript (Required if method="startEndText" ). |
downloadTranscriptFlag | boolean | β | Whether to save the full transcript (true or false , default: false ). |
videoQuality | string | β | Video quality (default: 360 ). |
cookies | string | β | 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