Unable to get Gstreamer1.0 plugins/features - c

I am having trouble working with gstreamer1.0.
gst-launch-1.0 filesrc location=test.mp3 ! mad ! autoaudiosink
ERROR: pipeline could not be constructed: no element "filesrc".
This is what gst-inspect gives
$gst-inspect-1.0
staticelements: bin: Generic bin
staticelements: pipeline: Pipeline object
Total count: 1 plugin, 2 features
I tried reinstalling with following command
sudo apt-get install --reinstall gstreamer1.0-alsa gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0
but it dint help..
What am I missing...

Related

React: max_user_watches is set to 524288, still showing ENOSPC: System limit for number of file watchers reached

I have cloned the project and trying to run it for the first time in my system (Ubuntu 18.04.3 LTS) with npm serve, but I am getting the following error:
events.js:174
throw er; // Unhandled 'error' event
^
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/bs-094/Dev/FPN/fpn-frontend/public'
at FSWatcher.start (internal/fs/watchers.js:165:26)
at Object.watch (fs.js:1258:11)
at createFsWatchInstance (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:38:15)
at setFsWatchListener (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:81:15)
at FSWatcher.NodeFsHandler._watchWithNodeFs (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:233:14)
at FSWatcher.NodeFsHandler._handleDir (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:429:19)
at FSWatcher.<anonymous> (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:477:19)
at FSWatcher.<anonymous> (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:482:16)
at FSReqWrap.oncomplete (fs.js:154:5)
Emitted 'error' event at:
at FSWatcher._handleError (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/index.js:260:10)
at createFsWatchInstance (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:40:5)
at setFsWatchListener (/home/bs-094/Dev/FPN/fpn-frontend/node_modules/chokidar/lib/nodefs-handler.js:81:15)
[... lines matching original stack trace ...]
at FSReqWrap.oncomplete (fs.js:154:5)
I have looked up the solution here & here, but my /etc/sysctl.conf has already fs.inotify.max_user_watches=524288 added in its last line. I have read that 524,288 is the maximum number of files that can be watched. So I am completely clueless on how to listen to my files i.e run my project.
How can I run this?
This worked for me! First,
$ echo 'fs.inotify.max_user_watches=524288' | sudo tee -a /etc/sysctl.conf
The new value can then be loaded/sourced by running:
$ sudo sysctl -p
As increasing the limit didn't work for me, I tried a different approach. I didn't add my node_modules files to the watcher.
From my experience the best fix would be to expose the watcher configuration where one could define to ignore any folders or files of their choosing, not just node_modules.

GStreamer 1.0 autovideosink Could not initialise Xv output

I have my C code which uses GStreamer.I have just installed gst-launch-1.0 on my Ubuntu 14.04.5 LTS,after that i verified that i have a working installation by command
gst-inspect-1.0 fakesrc
which print out a bunch of information about this.Also checked with
gst-launch-1.0 -v fakesrc silent=false num-buffers=3 ! fakesink
silent=false
command it produces output.But when i try to test video displayed by running
gst-launch-1.0 videotestsrc ! videoconvert ! autovideosink
it is giving me below logs
Setting pipeline to PAUSED ...
libEGL warning: DRI2: xcb_connect failed
libEGL warning: DRI2: xcb_connect failed
libEGL warning: GLX: failed to load GLX
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstXvImageSink:autovideosink0-actual-sink-xvimage: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1765): gst_xvimagesink_open (): /GstXvImageSink:autovideosink0-actual-sink-xvimage:
Could not open display (null)
Setting pipeline to NULL ...
Freeing pipeline ...
please HELP.

want to set the time to capture the video using GSTREAMER

gst-launch-1.0 -e v4l2src ! x264enc ! h264parse ! mp4mux !
splitmuxsink max-size-time=30000000000 location=test1.mp4
This is my pipeline when I'm executing this it gives error like this
WARNING: erroneous pipeline: no element "splitmuxsink"
any solution for this WARNING. I installed every plugins and I am beginner to gstreamer.
Give me some idea to set time of capturing the video.
splitmuxsink sink was added in gstreamer version 1.6, make sure you have 1.6/+ (gst-launch-1.0 --version should tell you which version is installed), also its part of gst-plugins-good make sure you have installed it. Adding a link for your reference to install gstreamer on linux machines.
gst-launch-1.0 -e v4l2src ! x264enc ! h264parse ! mp4mux !
splitmuxsink max-size-time=30000000000 location=test1.mp4
Also your above pipeline is wrong it should something like below,
gst-launch-1.0 -e v4l2src num-buffers=500 !
video/x-raw,width=320,height=240 ! videoconvert ! queue ! timeoverlay
! x264enc key-int-max=10 ! h264parse ! splitmuxsink
location=video%02d.mov max-size-time=10000000000
max-size-bytes=1000000
Refer splitmuxsink, it adds the muxer for you.

(gvim 8271) IBUS-WARNING

I was calling a function multiple times using a single thread, and i was locking the resource inside the function and I was creating some file and dint unlock it while returning from the function, and I found the below problem when tried to open the created file, what does this mean ? can somebody explain
>output:
>(gvim:8271): IBUS-WARNING **: The owner of /home/user/.config/ibus/bus is not root
i ran "sudo apt-get purge ibus", then installed fcitx.
when i ran gvim and closed it, the same warning output.
Fixed:
rm -rf /home/user/.config/ibus/bus
everything ok!

How to play the port audio in basic raw

How can i do raw send and raw receive ? This is not working, i cant play what i sended:
Send: $ gst-launch -v autoaudiosrc ! udpsink host=127.0.0.1 auto-multicast=true port=4444
Recv/play:
[root#example ~]# gst-launch udpsrc multicast-group=127.0.0.1 port=4444 ! autoaudiosink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse: The stream is in the wrong format.
Additional debug info:
gstbaseaudiosink.c(866): gst_base_audio_sink_preroll (): /GstPipeline:pipeline0/GstAutoAudioSink:autoaudiosink0/GstPulseSink:autoaudiosink0-actual-sink-pulse:
sink not negotiated.
Execution ended after 16110169 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
[root#example ~]#
You need to specify capabilities for source. This is what actually ERROR: from element /GstPipeline:pipeline0/GstAudioConvert:audioconvert0: not negotiated means.
(Use -v flag on gst-launch to see more details on errors).
So, the solution is:
$ gst-launch -v udpsrc multicast-group=127.0.0.1 port=4444 \
! audio/x-raw-int, endianness=1234, signed=true, width=16, depth=16, rate=44100, channels=2 \
! autoaudiosink
Actually, I just copied capabilities from the verbose output of the sending gst-launch.

Resources