Add advanced access unit delimination logic to MPEG-TS demuxer (fixes #414), ignore irrelevant PIDs in MPEG-TS metadata reading

This commit is contained in:
Vanilagy
2026-06-17 17:16:39 +02:00
parent 53833f6e94
commit bfd4059c22
4 changed files with 130 additions and 30 deletions
+10 -1
View File
@@ -17,9 +17,17 @@
source: new Mediabunny.BlobSource(file),
});
const track = await input.getPrimaryAudioTrack();
const track = await input.getPrimaryVideoTrack();
const packetSink = new Mediabunny.EncodedPacketSink(track);
const first = await packetSink.getFirstPacket({ verifyKeyPackets: true });
const second = await packetSink.getNextPacket(first, { verifyKeyPackets: true });
const third = await packetSink.getNextPacket(second, { verifyKeyPackets: true });
const fourth = await packetSink.getNextPacket(third, { verifyKeyPackets: true });
console.log(first, second, third, fourth);
/*
for await (const packet of packetSink.packets()) {
//console.log(packet);
break;
@@ -39,6 +47,7 @@
break;
}
}
*/
/*
const track = await input.getPrimaryAudioTrack();