GStreamer Entrans Plugins Manual
The collective intent of the provided 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 the 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 and Goals.
There are 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 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/(transcode value), videobalance |
field, phase | fields, doublefps | drop, * fields | ? | entransfields |
- | decimate | Decomb decimate | Decomb | entransdecimate |
- | 32detect | - | ? | entransdetectinter |
- | ivtc | Decomb telecide | Decomb | entransivtc |
kerndeint | - | kernel deinterlace | 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:
entransy4menc ! entransy4mtrans command=yuvdenoise ! entransy4mparse
entransy4menc ! 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.
The results of the search are