![]() |
![]() |
GStreamer Entrans 0.10 Reference Manual | ![]() |
---|
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”
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 | ? | mask | ||
swapuv | videocore rgbswap | Swap U and V | ? | rbswap | ||
eq2 | gamma | MPlayer eq2 | ? |
|
||
field, phase | fields, doublefps | drop, * fields | ? | fields | ||
- | decimate | Decomb decimate | Decomb | decimate | ||
- | 32detect | - | ? | detectinter | ||
- | ivtc | Decomb telecide | Decomb | ivtc | ||
kerndeint | - | kernel deinterlacer | kerndeint | kerneldeint | ||
unsharp | unsharp | - | ? | unsharp | ||
hqdn3d | hqdn3d | MPlayer hqdn3d | ? | hqdn3d | ||
denoise3d | denoise3d | MPlayer denoise3d | ? | hqdn3d high-quality=false | ||
- | dnr | Denoise | ? | dnr | ||
- | smooth | - | ? | smooth | ||
- | msharpen | MSharpen | msharpen | msharpen | ||
- | xsharpen | - | xsharpen | xsharpen | ||
- | cshift | Chroma shift | ? | cshift | ||
- | csub | - | ? | csub | ||
? | whitebalance | ? | ? | whitebalance | ||
- | divxkey | - | ? | divxkey | ||
delogo | - | MPlayer delogo | ? | delogo | ||
volume | astat | - | ? | astat |
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.
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 ! y4mtrans command=yuvdenoise ! y4mparse
y4menc ! y4mtrans command=y4mdenoise ! y4mtrans command=yuvmedianfilter ! y4mparse
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 stamp 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 ! y4mparse ! 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 procpipe may come in handy as well.