yuvresample

NAME
SYNOPSIS
DESCRIPTION
EXAMPLES
OPTIONS
SEE ALSO
BUGS
AUTHOR

NAME

yuvresample − a resampler for YUV4MPEG streams

SYNOPSIS

yuvresample [-h] [-f rate] [-F rate] [-i interlacing] [-I interlacing] [-m mode] [-v] [-d]

DESCRIPTION

Resamples a YUV4MPEG stream to change the frame rate, optionally changing the interlacing mode as well. The source stream is read from the standard input and the result is written to the standard output.

Each output frame/field is produced as the weighted average of the two temporally closest input frames/fields. Optionally, the closest input frame/field can be used as the single source. Blending of the two closest frames/fields does not cause as visible stepping as simply dropping or duplicating frames does but it blurs moving objects. Try both approaches to see which you prefer.

EXAMPLES

Convert video to PAL frame rate:
lav2yuv input.avi | yuvresample -f 25:1 | yuv2lav -o output.avi

Convert interlaced video to progressive video and PAL frame rate:
lav2yuv input.avi | yuvresample -f 25:1 -i p | yuv2lav -o output.avi

Create slow motion 1/5 speed video (assuming PAL frame rate for input):
lav2yuv input.avi | yuvresample -F 5:1 -f 25:1 | yuv2lav -o output.avi

Speed up video 2 times (assuming PAL frame rate for input):
lav2yuv input.avi | yuvresample -F 50:1 -f 25:1 | yuv2lav -o output.avi

Convert progressive scan video to interlaced video:
lav2yuv input.avi | yuvresample -i b | yuv2lav -o output.avi

OPTIONS

−h

Print brief usage information and exit immediately.

−f rate

Specify the output frame rate as a ratio. For example, 25:1 for PAL or 30000:1001 for NTCS. Defaults to the input frame rate.

−F rate

Override the input frame rate by the specified frame rate ratio. This can be used if you wish to speed up or slow down the original video or if the frame rate information for the input is incorrect. If you wish to just change the frame rate information of the stream then see yuvfps(1) option -c.

−i interlacing

Specify the output interlacing mode. Defaults to the input interlacing mode. The possible values are:

p − progressive scan (non-interlaced)
t
− top-field first
b
− bottom-field first

−I interlacing

Override the input interlacing mode by the specified mode. This can be used if the interlacing information for the input is incorrect. The possible values are same as for -i.

−m mode

Specify the resampling mode to be used when producing an output frame/field. The possible values are:

c − use only the closest input frame/field
a
− use the weighted average of two input frames/fields

−v

Be more verbose.

−d

Enables debug output. Implies -v.

SEE ALSO

mjpegtools(1), yuvfps(1), yuv4mpeg(5)

BUGS

yuvresample does not try to account for motion. Motion compensation would reduce blurring of moving objects caused by simply blending the two closest frames/fields.

AUTHOR

yuvresample was implemented by Johannes Lehtinen. For input and output it uses the mjpegutils library provided by the mjpegtools(1) package.