|
I was hoping to be able to concatenate several webm files without transcoding by creating EncodedPacketSinks and going through the files one by one, updating timestamps on the encoded packets, and writing them out into some target. Looking at the api docs, EncodedPacket’s timestamp seems to be read only. Am I missing something? |
Replies: 2 comments
|
I misread, I didn’t see that microsecondTimestamp is the field to think about modifying. My bad! Still, any advice for concatenating webms with audio and video tracks would be much appreciated. |
|
They are all readonly, And regarding advice: the pattern you're going for is exactly it! Just make sure that when you're concatenating video, you always lead with a key frame. |
They are all readonly,
microsecondTimestampis a getter! You can modify packets viapacket.clone({...}).https://mediabunny.dev/api/EncodedPacket#clone
And yes, cloning is efficient and reuses the underlying packet data :)
And regarding advice: the pattern you're going for is exactly it! Just make sure that when you're concatenating video, you always lead with a key frame.