Loading...
Loading...
Generate subtitles (SRT/VTT) and plain text transcripts from video or audio files using AWS Transcribe. Use when creating captions, extracting spoken content, generating transcripts for notes, or making video content searchable.
npx skill4agent add rameerez/claude-code-startup-skills transcribe-video$ARGUMENTSen-USes-ES.srt.vtt.txtffmpegawsffmpegbrew install ffmpegawsbrew install awscli && aws configures3:*transcribe:*ffmpeg -i "input.mp4" -vn -acodec mp3 -q:a 2 "/tmp/transcribe-audio.mp3" -yBUCKET="tmp-transcribe-$(date +%s)"
aws s3 mb "s3://$BUCKET" --region us-east-1
aws s3 cp "/tmp/transcribe-audio.mp3" "s3://$BUCKET/audio.mp3"JOB_NAME="tmp-job-$(date +%s)"
aws transcribe start-transcription-job \
--transcription-job-name "$JOB_NAME" \
--language-code en-US \
--media-format mp3 \
--media "MediaFileUri=s3://$BUCKET/audio.mp3" \
--subtitles "Formats=srt,vtt" \
--output-bucket-name "$BUCKET" \
--region us-east-1en-USes-ESfr-FRde-DEpt-BRja-JPzh-CNit-ITko-KRen-USwhile true; do
STATUS=$(aws transcribe get-transcription-job \
--transcription-job-name "$JOB_NAME" \
--region us-east-1 \
--query 'TranscriptionJob.TranscriptionJobStatus' \
--output text)
if [ "$STATUS" = "COMPLETED" ] || [ "$STATUS" = "FAILED" ]; then break; fi
sleep 5
done.srt.vttaws s3 cp "s3://$BUCKET/$JOB_NAME.srt" "/path/to/input.srt"
aws s3 cp "s3://$BUCKET/$JOB_NAME.vtt" "/path/to/input.vtt"aws s3 cp "s3://$BUCKET/$JOB_NAME.json" "/tmp/transcribe-result.json".results.transcripts[0].transcript.txt# Delete S3 bucket and all contents
aws s3 rb "s3://$BUCKET" --force --region us-east-1
# Delete the transcription job
aws transcribe delete-transcription-job --transcription-job-name "$JOB_NAME" --region us-east-1
# Delete temp audio file
rm -f "/tmp/transcribe-audio.mp3" "/tmp/transcribe-result.json"| Video | Duration | Audio Size | Transcribe Time | Subtitle Segments |
|---|---|---|---|---|
| X/Twitter clip | 2:40 | 2.5 MB | ~20 seconds | 83 |
| Screen recording | 18:45 | 11.4 MB | ~60 seconds | 500+ |
original-video.mp4
original-video.srt # Subtitles with timestamps (most compatible)
original-video.vtt # Web-optimized subtitles (for HTML5 <track>)
original-video.txt # Plain text transcript (no timestamps)ls -lh /path/to/original-video.{srt,vtt,txt}