Page for oggResize
This page shows some examples, how oggResize works. The command syntax is available here.
oggResize can resize an ogg file (ogg, oga or ogv) in multiple ways:
- changing video frame size with advanced filters
- changing datarate for the video or audio streams
- changing video frame rate
- changing audio sample rate
Additionally oggResize can now (version 0.8)
- add any comment
- add alpha blend png pictures at any time period before and after resizing
Some of the new features are displayed here:
To resize a video, use the -s option with the size you wish to have. With the quality option you can change the filter kernel size. The bigger the kernel, the more adequate the picture. However, this is on the expense of computational power. Additionally a bigger kernel will create a slight bluring. So quality -q2 is a good compromize for "natural" pictures and this is the default value for resizing.
For real film resizing, please have a look at this page which shows a video preview created with oggResize.
Command line for different qualities (original file can be found here):
oggResize -s200x150 -q1 testbild-orig1.ogv testbild-orig1-200x150q1.ogv
oggResize -s200x150 -q2 testbild-orig1.ogv testbild-orig1-200x150q2.ogv
oggResize -s200x150 -q4 testbild-orig1.ogv testbild-orig1-200x150q4.ogv
oggResize -s200x150 -q5 testbild-orig1.ogv testbild-orig1-200x150q5.ogv
You can download the file <testbild-orig1-200x150q1.ogv> through the following Link
oggResize -s320x240 -q1 testbild-orig1.ogv testbild-orig1-320x240q1.ogv
oggResize -s480x360 -q1 testbild-orig1.ogv testbild-orig1-480x360q1.ogv
You can download the file <resize_testpattern_lowpass.ogv> through the following Link
A new feature in oggResize is adding a number of pictures on top of a video at any given time.
This is usefull, e.g. if you want to add a temporary logo on the screen.
The options are:
-a: render befor resizing
-A: render after resizing
To control the appearance time, you can specify the start time after the name if the time is not given, the start time is 0. The end appearence time is the next optional parameter. If not set, it is assumed to -1, which is the very end of the stream. If the 4th parameter is set to "s", the appearance is smoothed in and out.
You can specify more than one plane to be rendered. So they will be place on one another in the apperance order on the command line.
A typical command line would look like this:
oggResize -s300x200 -d1024000 -A etwas.png,2,7,s:etwasneues.png,5,10 -o testbild.ogv movSmall-test.ogv
The created file would look as follows
Command line options
The syntax of this command is:
# oggResize [options] inputfile.ogv outputfile.ogv
Sets the size of the video frame. The size is given as <width>x<height>. The default size is 480x320.
Example: -s 320x240
Sets the datarate in byte per seconds for the video encoder (theora). This more meant to be a upper threshold. So the file may be smaller than assumed. If not set, the datarate of the original stream is used.
Example: -d 1024000
Sets the datarate in byte per seconds for the audio encoder (vorbis). This more meant to be a upper threshold. So the file may be smaller than assumed. If not set, the datarate of the original stream is used.
Example: -D 64000
Sets the frame rate of the video. This is given by the pictures per second. The default frame rate is 24 pictures per second.
Example: -f 16
Sets the sample frequency (or sample rate) of the audio data in Hertz. If the sample frequency does not match the one with the original file, resamling is invoked.
Example: -F 32000
Sets the numbers of audio channels. The default is the number of channels given with the original file.
Example: -n 1
Adds comments to the video (theora) stream. Comments are given by a pair of type and value in the form type=value. More than one comment can be concatenated with a semicolon. It is recommended to use apostrophes as the command line may use the semicolon as a seperator.
Example: -c "author=yorn;date=03.07.09"
Adds comments to the audio (vorbis) stream. Comments are given by a pair of type and value in the form type=value. More than one comment can be concatenated with a semicolon. It is recommended to use apostrophes as the command line may use the semicolon as a seperator.
Example: -C "author=yorn;date=03.07.09"
Specifies the quality of the created video. Values can be between 1(best, with slight bluring) 6(worst). The default value is 2.
This option is meant to help creating a preview of a film. The number given with this option defines the number of frames, that are omitted. E.g. if a film has 24 frames per second and -p24 is given, the newly created video shows the video 24 times faster. If you combine it with the option -f to control the framerate, then you can create nice video previews as shown here. If -p is used, the audio stream will be ignored.
Adds a picture to the video frame before it is resized. The syntax for the picture appearances:
<picture1.png> [,<startTime> [,<endTime> [,s ] ] ]
- default startTime is 0
- default endTime is -1, which is the end of the stream duration
- default s ist not set. If s ist set, the picture slides in smoothly.
More than one picture can be included. To concatenate use the colon. If the appearance time overlap, the pictures are placed on one another, so the last picture is the uppest layer.
Example: -a etwas.png,2,7,s:etwasneues.png,5,10
Adds a picture to the video frame after it is resized.
The syntax follows the same syntax as with option -a.