Legal Notice | Get In Touch
The Ogg Video Tools  oggCut & oggCat  

Using oggCut

oggCut extracts parts of an ogg file. The synopsis is quite easy:

# oggCut -s 2000 -e 60000 inputFile.ogv outputFile.ogv

(In earlier version of oggCut < 0.8 you need to specify the input with -i and the output with -o)

This command creates a new ogg file named "outputFile.ogv". This file consists of a subpart of the original "inputFile.ogv". The new starts at milisecond 2000 (2 seconds) of the original file and ends at the millisecond 6000 (6 seconds).

As a video stream consists of I-frames (which are full pictures) and P-frames (which are delta pictures to the leading I-frame). If a video file starts with a P-frame, the player would not be able to interpret this picture, as the leading I-frame (on where it is based) is not available.

oggCut starts the I-frame search at the start time given by the '-s' option. So expect a shorter time than the calculated seconds for the new file.

Using oggCat

Sometimes it would be nice to concatenate (join) two or more video files. For that you can use oggCat, which creates a continuous Ogg video file from the given files.

# oggCat newFile.ogv file1.ogv file2.ogv [ file3.ogv [...] ]

However, the video files must correspond in framerate, keyframe gap, framesize etc.

The first file is always taken as the "corresponding" file. The parameters given by this file are checked against the proceeding files. If a file does not match, this file is not used for the concatenation and the next file is tested against the parameter set.

For example, if the framesize does not match, the following information is printed :

theora parameter compare: height or width are not matching:360:288 != 640:480
I could not find enough matching streams for file <file2.ogv>

The frame position for both, video and audio is completely recalculated for the new file, so that there are no timestamp problems (e.g. with players like cortado).