GStreamer pipeline stiring from pipeline - gstreamer

is there a way how to get a pipeline string from the pipeline? I am looking for something like opposite of the gst_parse_launch function which would take the pipeline as parameter and returned the string.
Thanks.

To the best of my knowledge, no. The closest I can think of is to generate a pipeline diagram in the dot format. To do so, you can place gst_debug_bin_to_dot_file at the point in your code when you want to render the pipeline graph (likely when it's already playing). Then execute you app with the GST_DEBUG_DUMP_DOT_DIR variable. Something like:
GST_DEBUG_DUMP_DOT_DIR=. ./app

Related

Video and audio blending/fading with gstreamer

I'm trying to evaluate functionality in gstreamer for applicability in a new application.
The application should be able to dynamically play videos and images depending on a few criteria (user input, ...) not really relevant for this question. The main thing I was not able to figure out was how I can achieve seamless crossfading/blending between successive content.
I was thinking about using the videomixer plugin and programatically transition the sinks alpha values. However, I'm not sure if this would work nor if it is a good idea to do so.
A gstreamer solution would be prefered because of the availability on development and target platform. Furthermore, a custom videosink implementation may be used in the end for rendering the content to proprietary displays.
Edit: Was able to code up a prototype using two file-sources fed into a videomixer, using GstInterpolationControlSource and GstTimedValueControlSource to bind and interpolate the videomixer alpha control inputs. The fades look perfect, however, what I did not quite have on the radar was that I cannot dynamically change the file sources location while the pipeline is running. Furthermore, it feels like misusing functions not intended for the job at hand.
Any feedback on how to tackle this use case would still be very much appreachiated. Thanks!

How to visualize more than one kernel per layer in histograms using tensorboard

I am currently using Tensorflow 2.0 with a simple CNN, i am initializing the first layer with some handcrafted filters that i would like to visualize during the learning process.
In the histogram part of tensorboard i only see the first kernel of the layer but i would like to see all of them. Is there an easy way to do this?
Thanks in advance
Creating a small function that does this on the displaycallback during the epoch end is the way i solved it, is not the cleanest , and would be nice if someone can correct it :)
class DisplayCallback(tf.keras.callbacks.Callback):
def on_epoch_end(self, epoch, logs=None):
variables_names = [v.name for v in model.trainable_variables]
with file_writer_cm.as_default():
for i in range(model.layers[0].get_weights()[0].shape[3]):
tf.summary.histogram(variables_names[0].split('/')[0]+"/kernel_"+str(i), model.layers[0].get_weights()[0][:,:,:,i], step=epoch)

Create a gst-launch description from a coded gstreamer pipeline

Consider that I have coded a Gstreamer pipeline in C. How can I generate the text description of that pipeline so that I can use it on the command line with gst-launch?
Gstreamer can create dot files of pipelines, though not the same format as gst-launch it gives me the information I'm looking for:
https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html
You just need to dump the string which you pass as an input to gst_parse_launch() function. You can use exactly same string with gst launch command

What is Pipeline of the sckit-learn?

I'm studying sckit-learn. but I cant understand the proper process of Pipeline. Here's the example like followng;
It's my studying material. How the Pipeline works here?
Your pipeline allowed you to perform multiple steps by connecting them as a pipeline.
In your case, you first generated feature vectors from the TfidfVectorizer(), and then those are "piped" to the naive bayes classifier as training data.

Video Mixing Options

I am working on a bigger project of video-wall and want to display multiple sources of videos on a single display.
something like this --
What are all my options?
Java with JMF
Python with GStreamer bindings
Before committing to a technology, I want to get a clear picture about available resources and their limitations.
With gstreamer you can realize this. You would use 4 uridecodebin instances and feed them into a videomixer. On each videomixer.pad you can set the xpos,ypos,z-order and alpha. Between the uridecodebins and the videomixer, you probably want to plug scaling and framerate adaptation.