Bilibili Audio
Extract the ordinary complete audio track from a public Bilibili video. Default to MP3; use M4A/AAC when the user prefers the source audio without a second lossy conversion.
Workflow
Confirm the user supplied a Bilibili URL and requests the complete audio track. Do not infer permission for private, paid, login-required, region-locked, or otherwise restricted content.
Use
scripts/extract_bilibili_audio.py. It queries only Bilibili's public playback information and does not use cookies or credentials.Resolve
scripts/extract_bilibili_audio.pyrelative to thisSKILL.md. Default the output directory todownloads/bilibiliwithin the active workspace. Run:python3 <skill-dir>/scripts/extract_bilibili_audio.py \ '<URL>' --output-dir downloads/bilibili --format mp3If FFmpeg is not installed, install a local, isolated FFmpeg provider only after approval, then re-run the command with its binary:
python3 -m venv .codex-tools/bilibili-audio-venv .codex-tools/bilibili-audio-venv/bin/pip install imageio-ffmpegObtain the binary with
python3 -c 'import imageio_ffmpeg; print(imageio_ffmpeg.get_ffmpeg_exe())'and pass it via--ffmpeg.Report the generated local file as a clickable link. State the duration or source bitrate only if verified by the extraction output. Keep the downloaded MP3/M4A; the script removes its temporary
.m4sstream after a successful conversion.
Options
- Add
--format m4ato remux the original AAC audio when available, avoiding re-encoding. - Add
--bitrate 192konly when the user specifically wants a larger MP3. Increasing MP3 bitrate cannot improve the source audio. - Add
--ffmpeg /absolute/path/to/ffmpegwhen the executable is not onPATH.
Boundaries
- Do not perform vocal, dialogue, or background-music separation; use a dedicated audio-separation workflow for that.
- Stop and explain if Bilibili does not expose an accessible public audio stream. Do not try cookies, account credentials, DRM workarounds, or restrictions bypasses.
- Handle the result as the user's local file; do not upload or redistribute it.