Loading...
Loading...
Extract transcript or subtitles from a local video file. Use this skill whenever the user asks to transcribe a video, extract speech-to-text, get subtitles, or wants a text version of what's said in a video. Also trigger on "提取字幕", "视频转文字", "语音转文字", "transcribe", "extract audio text", or when the user references getting a script/transcript from any video file (mp4, mkv, mov, avi, webm). This skill is for LOCAL video files — for YouTube or other online URLs, use the download-video skill first to get the file, then transcribe it.
npx skill4agent add feiskyer/video-skills transcribe-videoffprobe -v quiet -select_streams s -show_entries stream=index,codec_name:stream_tags=language,title -of json "<video_path>"# Extract as SRT (stream index 0 for first subtitle track; adjust if needed)
ffmpeg -i "<video_path>" -map 0:s:0 -c:s srt "<output_path>.srt" -y\d{2}:\d{2}:\d{2}<i></i><video_name>.txt~/.transcribe_video.envtest -f ~/.transcribe_video.env && echo "OK" || echo "MISSING"~/.transcribe_video.envOPENAI_API_KEY=your-key-here
# Optional Base URL:
# OPENAI_API_BASE=https://<base-url>/v1/
# Optional Model Name:
# TRANSCRIBE_MODEL=gpt-4o-transcribepython3 -c "from openai import OpenAI; from dotenv import load_dotenv; print('OK')" 2>&1pip install openai python-dotenvpython3 <skill_directory>/scripts/transcribe.py "<video_path>"<video_name>.txt