gst-entrans Plugins

avidemux — filters from avidemux
entrans — generic pipeline elements and video transformers
mencoder — filters from mplayer/mencoder
transcode — filters from transcode
virtualdub — filters from virtualdub and/or avisynth
y4m — YUV4MPEG and mjpegtools related elements

The collective intent of the above plugins is to provide the GStreamer framework with a set of filters as already available in various other multimedia applications, e.g. MPlayer/mencoder, transcode, avidemux, many of them often duplicated over and over again. Once so available in GStreamer framework, they are accessible by a common API, so that the very same code can be used repeatedly (as opposed to duplicated), in line with GStreamer Motivation & Goals.

There a number of ways to make such filters available, each requiring more or less effort, and providing less or more quality (typically in that order). Foremost, of course, is to perform a code-level port, making the filter (operation) natively available in GStreamer. Alternatively, one could resort to dynamic or runtime binding

Code Ports

Clearly, when being done properly, this leads to most robust quality results. As it also requires most effort and maintenance, priority focus is given to the popular ones, defined here as roughly proportional to occurrence across various existing applications. The following table compares some filter operations, that implement an identical or very similar algorithm.

mencoder transcode avidemux virtualdub GStreamer
rectangle mask Blacken borders ? entransmask
swapuv videocore rgbswap Swap U and V ? entransrbswap
eq2 gamma MPlayer eq2 ?
gamma gamma=1/html/[transcode value]
field, phase fields, doublefps drop, * fields ? entransfields
- decimate Decomb decimate Decomb entransdecimate
- 32detect - ? entransdetectinter
- ivtc Decomb telecide Decomb entransivtc
kerndeint - kernel deinterlacer kerndeint entranskerneldeint
unsharp unsharp - ? entransunsharp
hqdn3d hqdn3d MPlayer hqdn3d ? entranshqdn3d
denoise3d denoise3d MPlayer denoise3d ? entranshqdn3d high-quality=false
- dnr Denoise ? entransdnr
- smooth - ? entranssmooth
- msharpen MSharpen msharpen entransmsharpen
- xsharpen - xsharpen entransxsharpen
- cshift Chroma shift ? entranscshift
- csub - ? entranscsub
? whitebalance ? ? entranswhitebalance
- divxkey - ? entransdivxkey
delogo - MPlayer delogo ? entransdelogo
volume astat - ? entransastat

The above table by no means intends to suggest that GStreamer offers the widest collection of filters available (at present?). Indeed, other programs as mentioned above often have many alternative implementations and algorithms with similar goals. The above merely considers the GStreamer perspective/intersection, and if anything, simply illustrates there is a great deal of duplicating, copying and reworking out there.

Runtime Binding

The Netpbm and mjpegtools suites provide long since a number of image/video processing operations as stand-alone programs.

If so desired, and these programs are present and PATH accessible, they can be used in a pipeline. For example, one or more mjpegtools filters can appear as follows:

y4menc ! entransy4mtrans command=yuvdenoise ! entransy4mparse
y4menc ! entransy4mtrans command=y4mdenoise ! entransy4mtrans command=yuvmedianfilter ! entransy4mparse

Be aware that the above pipeline fragments have timestamp resequencing as a side-effect. So, take care not to cause an imbalance when muxing, e.g. by using entransstamp if needed in other streams.

The elements used above can also be put to use in dealing with a set of files (as input or output). For example,

jpeg2yuv -f 25 -j image-%05.jpg > image.yuv
# then run following pipeline
filesrc location=image.yuv ! entransy4mparse ! videoflip ! \
  y4menc ! filesink location=image-out.yuv
# if desired
# y4mtopnm and pnmtojpeg processing

Of course, the intermediate file could be omitted by means of some piping, and entransprocpipe may come in handy as well.