Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lavfi: add framepack filter
  • Loading branch information
kodawah committed Jan 9, 2014
1 parent aa69cbc commit a7d0e7e
Show file tree
Hide file tree
Showing 6 changed files with 412 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changelog
Expand Up @@ -54,6 +54,7 @@ version 10:
- png standalone parser
- WebP encoding via libwebp
- ATRAC3+ decoder
- framepack filter


version 9:
Expand Down
45 changes: 45 additions & 0 deletions doc/filters.texi
Expand Up @@ -1252,6 +1252,51 @@ frames with a negative PTS.

@end table

@section framepack

Pack two different video streams into a stereoscopic video, setting proper
metadata on supported codecs. The two views should have the same size and
framerate and processing will stop when the shorter video ends. Please note
that you may conveniently adjust view properties with the @ref{scale} and
@ref{fps} filters.

This filter accepts the following named parameters:
@table @option

@item format
Desired packing format. Supported values are:

@table @option

@item sbs
Views are next to each other (default).

@item tab
Views are on top of each other.

@item lines
Views are packed by line.

@item columns
Views are eacked by column.

@item frameseq
Views are temporally interleaved.

@end table

@end table

Some examples follow:

@example
# Convert left and right views into a frame sequential video.
avconv -i LEFT -i RIGHT -filter_complex framepack=frameseq OUTPUT
# Convert views into a side-by-side video with the same output resolution as the input.
avconv -i LEFT -i RIGHT -filter_complex [0:v]scale=w=iw/2[left],[1:v]scale=w=iw/2[right],[left][right]framepack=sbs OUTPUT
@end example

@anchor{frei0r}
@section frei0r

Expand Down
1 change: 1 addition & 0 deletions libavfilter/Makefile
Expand Up @@ -54,6 +54,7 @@ OBJS-$(CONFIG_FADE_FILTER) += vf_fade.o
OBJS-$(CONFIG_FIELDORDER_FILTER) += vf_fieldorder.o
OBJS-$(CONFIG_FORMAT_FILTER) += vf_format.o
OBJS-$(CONFIG_FPS_FILTER) += vf_fps.o
OBJS-$(CONFIG_FRAMEPACK_FILTER) += vf_framepack.o
OBJS-$(CONFIG_FREI0R_FILTER) += vf_frei0r.o
OBJS-$(CONFIG_GRADFUN_FILTER) += vf_gradfun.o
OBJS-$(CONFIG_HFLIP_FILTER) += vf_hflip.o
Expand Down
1 change: 1 addition & 0 deletions libavfilter/allfilters.c
Expand Up @@ -74,6 +74,7 @@ void avfilter_register_all(void)
REGISTER_FILTER(FIELDORDER, fieldorder, vf);
REGISTER_FILTER(FORMAT, format, vf);
REGISTER_FILTER(FPS, fps, vf);
REGISTER_FILTER(FRAMEPACK, framepack, vf);
REGISTER_FILTER(FREI0R, frei0r, vf);
REGISTER_FILTER(GRADFUN, gradfun, vf);
REGISTER_FILTER(HFLIP, hflip, vf);
Expand Down
2 changes: 1 addition & 1 deletion libavfilter/version.h
Expand Up @@ -30,7 +30,7 @@
#include "libavutil/version.h"

#define LIBAVFILTER_VERSION_MAJOR 4
#define LIBAVFILTER_VERSION_MINOR 0
#define LIBAVFILTER_VERSION_MINOR 1
#define LIBAVFILTER_VERSION_MICRO 0

#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
Expand Down

0 comments on commit a7d0e7e

Please sign in to comment.