Skip to content

Instantly share code, notes, and snippets.

@mansarip
Last active June 26, 2025 13:40
Show Gist options
  • Save mansarip/2458e4f37b15af3c34e6c3acf86383aa to your computer and use it in GitHub Desktop.
Save mansarip/2458e4f37b15af3c34e6c3acf86383aa to your computer and use it in GitHub Desktop.
Video Processing

Download Video

Download video dari youtube, format mp4, kualiti terbaik :

yt-dlp --cookies ~/Library/cookies-yt.txt -f "bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best" <youtube-link>

Trim Video (Cara 1)

Potong (trim) video berdasarkan masa (hh:mm:ss) :

ffmpeg -ss 00:18:41 -to 00:20:28 -i input.mp4 -c copy output1.mp4

Trim Video (Cara 2)

Guna capcut je. Supaya sync dengan generated srt.

Capcut to SRT

Guna website ni untuk convert caption capcut ke srt :

https://capcut-srt-export.vogelcodes.com/

SRT to ASS

ffmpeg -i input.srt output.ass

Burn Subtitle ASS ke Video

ffmpeg -i input.mp4 -vf "ass=subtitle.ass" -c:v libx264 -crf 18 -preset slow -c:a copy output.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment