[ogg-dev] How to concatenate Ogg in the browser JS?
Vitaly Zdanevich
zdanevich.vitaly at ya.ru
Thu Nov 15 19:01:00 UTC 2018
Maybe you know some existing code snippet or library for Javascript for altering serial and crc? Just now I compiled your quick script to wasm but the size is 28K, I think about simple correct solution for that case.
15.11.2018, 21:15, "Vitaly Zdanevich" <zdanevich.vitaly at ya.ru>:
> Yes, I found that serials of my Oggs is all zeros, thank you, I will try to alter serial.
>
> 15.11.2018, 19:39, "Ralph Giles" <giles at thaumas.net>:
>> On 2018-11-15 4:22 a.m., Vitaly Zdanevich wrote:
>>
>>> Note: Stream 1 has serial number 0, which is legal but may cause problems with some tools.
>>
>> Note if *both* files have the same serial number, it's impossible to
>> find the points where they were concatentated by bisection, and most
>> tools will assume they've found all the sections and calculate an
>> incorrect duration. They can still be played individually because there
>> is not concatenation boundary to find in the individual case.
>>
>> If ogginfo shows the same serial (00000000) for both of your input
>> streams, that's likely the problem. Muxers are supposed to use a random
>> serial number to make conflicts unlikely. You can fix them by rewriting
>> the serial number so there's no conflict. Basically, you change the
>> serialno field in each ogg page header and then update the crc.
>>
>> If you want an example, I have a quick script for doing this in
>> https://git.xiph.org/?p=rogg.git;a=blob;f=rogg_serial.c
>>
>> HTH,
>> -r
More information about the ogg-dev
mailing list