/media-os:ffmpeg-captions [action] [input]from media-os
Extracts, converts, and preserves CEA-608/708 closed captions using ffmpeg, including passthrough, extraction to SRT, SCC/MCC/STL import/export, and burning captions into video.
Ships in media-os. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Context: $ARGUMENTS
CEA-608/708 closed captions are carried inside the H.264 video stream (A53 SEI NAL units) or in sidecar SCC/MCC/STL files. They are NOT subtitle tracks. For subtitle-file workflows (SRT/ASS/VTT), use the ffmpeg-subtitles skill.
-a53cc 1 recipeccextractor recipeffmpeg-subtitles.scc, .mcc, or .stl and need to mux or convert it..srt from 608/708 for downstream tools.Captions can live in one of five places. Check all of them:
ffprobe -show_streams.ffprobe as codec_name=eia_608 or closed_caption..scc) — timecoded hex byte pairs, NTSC drop-frame usually..mcc) — MacCaption, SCC's modern descendant with explicit frame-rate header..stl) — EBU 3264, European broadcast.readeia608 filter.To detect embedded SEI captions:
ffprobe -loglevel error -select_streams v:0 -show_entries frame=side_data_list \
-of default=noprint_wrappers=1 in.ts | grep -i a53 | head -5
If nothing is returned, try the filter path (picture line 21):
ffmpeg -hide_banner -i in.mov -vf "readeia608,metadata=mode=print" -an -f null - 2>&1 | head -40
Or hand off to the external detector:
ccextractor in.mov --stdout > /dev/null # exits nonzero if no CC found
| Goal | Operation | Command |
|---|---|---|
| Keep captions when transcoding H.264 | preserve | -a53cc 1 on libx264 |
| Keep captions when remuxing (no re-encode) | passthrough | -c copy |
Get a .srt from embedded 608/708 | extract | ccextractor |
Get a .srt from .scc / .mcc | convert | ccextractor |
| Burn captions into the picture | burn | extract to SRT, then ffmpeg-subtitles |
| Import SCC as a subtitle stream into TS | mux | -f scc -i ... -c:s copy |
ffmpeg -i in.ts -c:v libx264 -crf 20 -a53cc 1 -c:a copy out.ts
Without -a53cc 1, libx264 silently discards SEI CC data. This flag only preserves what the source already has — it does not create captions.
ffmpeg -i in.ts -c copy -map 0 out.mp4
Copying the video stream preserves the A53 SEI NAL units automatically. MPEG-TS → MP4 and MP4 → MOV generally survive; verify with Step 4.
ccextractor in.ts -o out.srt
ccextractor in.mov -out=srt -o out.srt # explicit
ccextractor in.ts -o out.vtt -out=webvtt # VTT instead
ccextractor in.mcc -o out.srt # MCC → SRT
ccextractor in.scc -o out.srt # SCC → SRT
Install on macOS: brew install ccextractor. On Debian/Ubuntu: apt install ccextractor.
ffmpeg -i in.mov -vf "readeia608,metadata=mode=print:file=captions.txt" \
-an -f null -
This only works when 608 bytes are drawn into the picture on lines 0–1 (legacy NTSC line 21). It does NOT read SEI-embedded CC. Output is frame-level metadata (lavfi.readeia608.0.cc, .sub, etc.) which you then parse into SRT yourself.
ffmpeg -i video.mp4 -f scc -i captions.scc \
-c:v copy -c:a copy -c:s copy -map 0:v -map 0:a -map 1 out.mp4
SCC demuxer support depends on ffmpeg build; verify with ffmpeg -formats | grep -i scc. If missing, fall back to ccextractor round-trip: SCC → SRT → mux as soft subtitle (see ffmpeg-subtitles).
Two-step: extract to SRT, then hand off.
ccextractor in.ts -o captions.srt
# now use the ffmpeg-subtitles skill:
ffmpeg -i in.ts -vf "subtitles=captions.srt" -c:a copy out.mp4
# 1. Probe for A53 side data on first video frames
ffprobe -loglevel error -select_streams v:0 \
-show_entries frame=side_data_list -read_intervals "%+#20" out.ts \
| grep -i a53
# 2. Decode and re-read via readeia608 (after on-screen render)
ffmpeg -i out.ts -vf "readeia608,metadata=mode=print" -an -f null - 2>&1 \
| grep -i 'lavfi.readeia608' | head
# 3. External sanity check
ccextractor out.ts -o /tmp/verify.srt && wc -l /tmp/verify.srt
If all three return empty, captions were dropped.
scripts/cc.py — detect / preserve / extract / passthrough helper around ffmpeg + ccextractor. Subcommands: detect, preserve, extract, passthrough. --dry-run, --verbose.uv run ${CLAUDE_SKILL_DIR}/scripts/cc.py detect --input in.ts
uv run ${CLAUDE_SKILL_DIR}/scripts/cc.py preserve --input in.ts --output out.ts --crf 20
uv run ${CLAUDE_SKILL_DIR}/scripts/cc.py extract --input in.ts --output captions.srt
uv run ${CLAUDE_SKILL_DIR}/scripts/cc.py passthrough --input in.ts --output out.mp4
references/formats.md for CEA-608 vs 708 protocol differences, per-container carriage matrix, SCC / MCC / STL file layouts, ccextractor flag reference, SEI A53 NAL details, and the verification checklist.ffprobe -show_streams, and tools unaware of SEI will silently ignore them.-a53cc 1 does NOT create captions. It only preserves existing SEI CC data during libx264 encode. Source must already have them.-a53cc 1 silently drops captions. No warning, no error. Always set the flag when re-encoding H.264 broadcast source.-c:v copy preserves SEI automatically because it copies the raw NAL units. Prefer passthrough when possible.-a53cc 1) or a dedicated c608/c708 track. They are different; check which one your target player expects.c608/c708 track types — FCP, Resolve, Adobe Media Encoder expect this, NOT SEI.brew install ccextractor / apt install ccextractor.readeia608 reads lines 0–1 of the DECODED picture, NOT SEI or side-data. Only useful for open/burned captions on NTSC line 21.ccextractor --cc=1..mcc to .scc.-c:v copy. Verify with Step 4 after every transcode.-bsf:v filter_units=... can accidentally strip SEI. Avoid when captions must survive.ffmpeg -i master.mxf -c:v libx264 -crf 18 -preset slow -a53cc 1 \
-c:a aac -b:a 192k -ac 2 out.ts
ccextractor out.ts -o /tmp/verify.srt # confirm CC1 present
ccextractor broadcast.scc -o broadcast.srt
ccextractor in.ts --cc=1 -o cc1.srt
ffmpeg -i in.ts -vf "subtitles=cc1.srt:force_style='FontSize=28'" \
-c:a copy social.mp4
ffmpeg -i broadcast.ts -c copy -movflags +faststart broadcast.mp4
ffprobe -loglevel error -select_streams v:0 \
-show_entries frame=side_data_list -read_intervals "%+#10" broadcast.mp4 \
| grep -i a53
Cause: source has no embedded CC, or they are in a c608 track not SEI.
Solution: run ffprobe -show_streams in.mov | grep -i eia_608 to check for a dedicated CC track. If present, extract with ffmpeg -i in.mov -map 0:s -c:s copy out.srt — try ffmpeg-subtitles skill for the mux. If neither, the file truly has no captions.
ffmpeg -c copyCause: the target muxer stripped SEI NAL units (some MP4 builds, WebM always).
Solution: mux to MPEG-TS instead, or re-encode with -c:v libx264 -a53cc 1. WebM/Matroska cannot carry 608/708 SEI — convert to a separate subtitle track.
Cause: SCC timecode is drop-frame (29.97), tool interpreted as non-drop (30).
Solution: pass --ucla to ccextractor or explicitly set -ff=30000/1001 on the video side. MCC files avoid this because they carry a frame-rate header.
readeia608 returns no output on broadcast captureCause: captions are in SEI, not drawn on picture line 21.
Solution: use ccextractor instead. readeia608 only reads pixels from decoded video, not bitstream metadata.
-a53cc 1 rejected: "Option not found"Cause: your libx264 build is too old, or you applied the flag to a non-libx264 encoder.
Solution: verify with ffmpeg -h encoder=libx264 | grep a53cc. Upgrade ffmpeg if missing. HEVC/AV1 have separate mechanisms (hevc: -udu_sei 1 for SEI passthrough; AV1: -enable-cdef etc.).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub damionrashford/media-os --plugin media-os110 skills in this plugin
/audio-coreaudioManipulate macOS audio at the Core Audio HAL layer: afinfo (audio file metadata), afplay (play), afconvert (convert format/rate/bit-depth/channel layout), say (TTS), SwitchAudioSource (change default input/output/system device — brew install switchaudio-osx), audiodevice CLIs (npm/Go variants), AppleScript via osascript to drive System Preferences Sound. HAL plugins at /Library/Audio/Plug-Ins/HAL/ load virtual drivers (BlackHole 2ch/16ch/64ch, Loopback, Background Music). Aggregate Device (drift-corrected multi-in) and Multi-Output Device via Audio MIDI Setup.app or AudioHardwareCreateAggregateDevice. Use when the user asks to change default macOS audio device, route audio between apps on Mac, install BlackHole, build an Aggregate Device, convert audio files with afconvert, or script Mac audio from the terminal.
/audio-jackRoute professional low-latency audio with JACK Audio Connection Kit (jackaudio.org): jackd server (ALSA/CoreAudio/PortAudio/ASIO backends), jack_control (D-Bus JACK2 config), jack_lsp (list ports/connections), jack_connect/jack_disconnect (manage links), jack_cpu_load, jack_samplerate, jack_bufsize (runtime period size), jack_transport, jack_rec (multi-channel WAV recording), jack_iodelay (round-trip latency), jack_wait, jack_midi_dump. JACK1 C maintenance vs JACK2 C++ multicore. Modern Linux swaps jackd for PipeWire's libjack shim — same client API. JackTrip for uncompressed multichannel UDP over the Internet. Use when the user asks to run a JACK server, connect audio clients, measure roundtrip latency, record from JACK ports, set JACK period size, or bridge JACK over the network with JackTrip.
Other plugins' skills for the same job