尚未收集儲存庫資訊。
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
Make TikTok LIVE AV1 (FLV codecId 13) streams playable in FFmpeg — no re-encoding. From TokLiveRecorder.
翻譯準備中
取自儲存庫 README
正在載入完整 README。
檢視完整 README ↗Make TikTok LIVE recordings that use AV1 playable in FFmpeg, without re-encoding.
Some TikTok LIVE streams, mostly from creators broadcasting with TikTok LIVE Studio and hardware encoding, send their original-quality FLV with AV1 video in a non-standard tag (codecId 13). FFmpeg doesn't recognise it, so recordings fail or come out with no picture. This tool rewrites those tags into standard Enhanced FLV av01 tags on the fly. The video is not re-encoded: quality is unchanged, and audio stays in sync.
Stream #0:0: Video: none for a TikTok LIVE .flv and ends with Conversion failed!hd/sd/ld) to make it play, and long recordings slowly drift out of sync. The transcoded TikTok qualities have video timestamps that run 6–9% slow.Requires Node.js 18+ and an FFmpeg with Enhanced FLV support (6.1 or newer).
git clone https://github.com/zqfgyshj1992-web/tiktok-live-av1-flv-fix.git
cd tiktok-live-av1-flv-fix
# fix a saved file, then remux to MP4 without re-encoding
node cli.mjs input.flv fixed.flv
ffmpeg -i fixed.flv -c copy output.mp4
# or fix a live stream on the fly
curl -s "$FLV_URL" | node cli.mjs | ffmpeg -i pipe:0 -c copy output.mp4
No dependencies to install. Once published to npm, npx tiktok-live-av1-flv-fix input.flv fixed.flv works the same way.
Streams that aren't AV1 (H.264, HEVC) pass through byte-for-byte, so it's safe to leave the tool in a pipeline for every recording.
If you record with an open-source TikTok LIVE recorder that saves .flv files, run this on the .flv before converting it.
import { createAv1FlvFixer } from 'tiktok-live-av1-flv-fix';
const fixer = createAv1FlvFixer();
for await (const chunk of flvStream) {
const out = fixer.push(chunk); // bytes ready to write; may be empty
if (out.length) ffmpeg.stdin.write(out);
}
console.log(`rewrote ${fixer.rewritten} AV1 tags`);
push() works with any chunk size. The output is identical whether bytes arrive one at a time or all at once.
TikTok's codecId 13 video tag has the same layout as an AVC tag: 1 byte frameType | codecId, 1 byte packetType, 3 bytes composition time, then AV1 OBUs. The tool rewrites each tag into the Enhanced RTMP / FLV form:
| TikTok tag | Rewritten as |
|---|---|
packetType 0 (sequence header) | SequenceStart, fourcc av01 |
packetType 1 (frame) | CodedFrames, fourcc av01 (no CTS field) |
packetType 2 (end of sequence) | dropped |
If the stream never sends a separate sequence header, the tool takes the first Sequence Header OBU found inside a frame and emits it as a SequenceStart first. FFmpeg builds av1C from it. Frames before the first sequence header can't be decoded and are dropped. Audio and script tags are untouched.
npm test
This was extracted from the recording pipeline of TokLiveRecorder, a cloud recorder for TikTok LIVE. In October 2026, TokLiveRecorder found that recordings were failing with "Video: none" whenever a creator streamed origin-quality AV1, and fixed it with this rewriter instead of falling back to a transcoded quality. If you'd rather not run a recorder yourself, TokLiveRecorder records TikTok LIVE in the cloud and gives you the MP4. It also has an auto-record option for creators who go live while you're asleep.
MIT