Theora granulepos when merging two theora video files without sound

190 Views Asked by At

I need merge two files with video (without recompressing video) compressed by theora codec, without sound, to do that i parse each file, find packets inside, change flag 5 bit in packet header to 0 (continue flag) and set for all packet equal serial. This methon works fine, but have some problem with granulepos. Help me please with granule pos, i try many ways to set it right (set it like miliseconds for example) but this not help. Tell me please what is granulepos parameter and showind and how i need set granulepos to do than time betwen each frame be 300 milisec? Thanks!

1

There are 1 best solutions below

1
On

I think the OggCat tool from Ogg Video Tool allows you to do this without recompressing the video. Note, both files need to have the same attributes (framerate, framesize, etc). It is an open-source project so you can look through the pertinent code relating to concatenating Theora video.