gstreamer: No such element or plugin 'v4l2sink' - gstreamer
The problem
I am trying to execute a script. Part of it needs to execute v4l2sink. I tried to execute this
gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video1 & mplayer -tv device=/dev/video1 tv://
to check part of the code and it fails. The problem is the first part, meaning:
gst-launch-1.0 videotestsrc ! v4l2sink device=/dev/video1
I get
WARNING: erroneous pipeline: no element "v4l2sink"
This line should work as it is referenced in the documentation. The following line does not work either and I think the root of the problem is the same.
gst-launch-1.0 -v videotestsrc ! navigationtest ! v4l2sink
WARNING: erroneous pipeline: no element "navigationtest"
That line has been taken from the same part of the documentation.
What I have tried
I checked that /dev/video1 existed and it does. It was created with
sudo modprobe v4l2loopback video_nr=1,10 card_label="mobile_cam","OBS Cam" exclusive_caps=1
Which I took and adapted from the v4l2loopback documentation.
I have check if the module has been blacklisted following other similar questions like this one. It is not blacklisted:
Blacklisted files:
Total count: 0 blacklisted files
Although it is not blacklisted it cannot be found:
gst-inspect-1.0 v4l2sink
No such element or plugin 'v4l2sink'
The whole list of plugins and features is the following:
gst-inspect-1.0
videotestsrc: videotestsrc: Video test source
pbtypes: GstVideoMultiviewFlagsSet (GstDynamicTypeFactory)
coretracers: latency (GstTracerFactory)
coretracers: log (GstTracerFactory)
coretracers: rusage (GstTracerFactory)
coretracers: stats (GstTracerFactory)
coretracers: leaks (GstTracerFactory)
adder: adder: Adder
audiomixer: audiomixer: AudioMixer
audiomixer: liveadder: AudioMixer
audiomixer: audiointerleave: AudioInterleave
videoconvert: videoconvert: Colorspace converter
coreelements: capsfilter: CapsFilter
coreelements: concat: Concat
coreelements: dataurisrc: data: URI source element
coreelements: downloadbuffer: DownloadBuffer
coreelements: fakesrc: Fake Source
coreelements: fakesink: Fake Sink
coreelements: fdsrc: Filedescriptor Source
coreelements: fdsink: Filedescriptor Sink
coreelements: filesrc: File Source
coreelements: funnel: Funnel pipe fitting
coreelements: identity: Identity
coreelements: input-selector: Input selector
coreelements: output-selector: Output selector
coreelements: queue: Queue
coreelements: queue2: Queue 2
coreelements: filesink: File Sink
coreelements: tee: Tee pipe fitting
coreelements: typefind: TypeFind
coreelements: multiqueue: MultiQueue
coreelements: valve: Valve element
coreelements: streamiddemux: Streamid Demux
audiotestsrc: audiotestsrc: Audio test source
audioconvert: audioconvert: Audio converter
opengl: glimagesink: GL Sink Bin
opengl: glimagesinkelement: OpenGL video sink
opengl: glupload: OpenGL uploader
opengl: gldownload: OpenGL downloader
opengl: glcolorconvert: OpenGL color converter
opengl: glcolorbalance: Video balance
opengl: glfilterbin: GL Filter Bin
opengl: glsinkbin: GL Sink Bin
opengl: glsrcbin: GL Src Bin
opengl: glfiltercube: OpenGL cube filter
opengl: gleffects: Gstreamer OpenGL Effects
opengl: gleffects_identity: Do nothing Effect
opengl: gleffects_mirror: Mirror Effect
opengl: gleffects_squeeze: Squeeze Effect
opengl: gleffects_stretch: Stretch Effect
opengl: gleffects_tunnel: Light Tunnel Effect
opengl: gleffects_fisheye: FishEye Effect
opengl: gleffects_twirl: Twirl Effect
opengl: gleffects_bulge: Bulge Effect
opengl: gleffects_square: Square Effect
opengl: gleffects_heat: Heat Signature Effect
opengl: gleffects_sepia: Sepia Toning Effect
opengl: gleffects_xpro: Cross Processing Effect
opengl: gleffects_lumaxpro: Luma Cross Processing Effect
opengl: gleffects_xray: Glowing negative effect
opengl: gleffects_sin: All Grey but Red Effect
opengl: gleffects_glow: Glow Lighting Effect
opengl: gleffects_sobel: Sobel edge detection Effect
opengl: gleffects_blur: Blur with 9x9 separable convolution Effect
opengl: gleffects_laplacian: Laplacian Convolution Demo Effect
opengl: glcolorscale: OpenGL color scale
opengl: glshader: OpenGL fragment shader filter
opengl: glfilterapp: OpenGL application filter
opengl: glviewconvert: OpenGL Multiview/3D conversion filter
opengl: glstereosplit: GLStereoSplit
opengl: gltestsrc: Video test source
opengl: gldeinterlace: OpenGL deinterlacing filter
opengl: glfilterglass: OpenGL glass filter
app: appsrc: AppSrc
app: appsink: AppSink
encoding: encodebin: Encoder Bin
ximagesink: ximagesink: Video sink
videorate: videorate: Video rate adjuster
subparse: subparse_typefind: srt, sub, mpsub, mdvd, smi, txt, dks, vtt
subparse: subparse: Subtitle parser
subparse: ssaparse: SSA Subtitle Parser
gio: giosink: GIO sink
gio: giosrc: GIO source
gio: giostreamsink: GIO stream sink
gio: giostreamsrc: GIO stream source
volume: volume: Volume
tcp: socketsrc: socket source
tcp: tcpclientsink: TCP client sink
tcp: tcpclientsrc: TCP client source
tcp: tcpserversink: TCP server sink
tcp: tcpserversrc: TCP server source
tcp: multifdsink: Multi filedescriptor sink
tcp: multisocketsink: Multi socket sink
videoscale: videoscale: Video scaler
rawparse: unalignedaudioparse: unalignedaudioparse
rawparse: unalignedvideoparse: unalignedvideoparse
rawparse: rawaudioparse: rawaudioparse
rawparse: rawvideoparse: rawvideoparse
playback: playbin: Player Bin 2
playback: playbin3: Player Bin 3
playback: playsink: Player Sink
playback: subtitleoverlay: Subtitle Overlay
playback: streamsynchronizer: Stream Synchronizer
playback: decodebin: Decoder Bin
playback: decodebin3: Decoder Bin 3
playback: uridecodebin: URI Decoder
playback: uridecodebin3: URI Decoder
playback: urisourcebin: URI reader
playback: parsebin: Parse Bin
audioresample: audioresample: Audio resampler
audiorate: audiorate: Audio rate adjuster
typefindfunctions: video/x-ms-asf: asf, wm, wma, wmv
typefindfunctions: audio/x-musepack: mpc, mpp, mp+
typefindfunctions: audio/x-au: au, snd
typefindfunctions: video/x-msvideo: avi
typefindfunctions: audio/qcelp: qcp
typefindfunctions: video/x-cdxa: dat
typefindfunctions: video/x-vcd: dat
typefindfunctions: audio/x-imelody: imy, ime, imelody
typefindfunctions: audio/midi: mid, midi
typefindfunctions: audio/riff-midi: mid, midi
typefindfunctions: audio/mobile-xmf: mxmf
typefindfunctions: video/x-fli: flc, fli
typefindfunctions: application/x-id3v2: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: application/x-id3v1: mp3, mp2, mp1, mpga, ogg, flac, tta
typefindfunctions: application/x-apetag: mp3, ape, mpc, wv
typefindfunctions: audio/x-ttafile: tta
typefindfunctions: audio/x-mod: 669, amf, ams, dbm, digi, dmf, dsm, gdm, far, imf, it, j2b, mdl, med, mod, mt2, mtm, okt, psm, ptm, sam, s3m, stm, stx, ult, umx, xm
typefindfunctions: audio/mpeg: mp3, mp2, mp1, mpga
typefindfunctions: audio/x-ac3: ac3, eac3
typefindfunctions: audio/x-dts: dts
typefindfunctions: audio/x-gsm: gsm
typefindfunctions: video/mpeg-sys: mpe, mpeg, mpg
typefindfunctions: video/mpegts: ts, mts
typefindfunctions: application/ogg: ogg, oga, ogv, ogm, ogx, spx, anx, axa, axv
typefindfunctions: video/mpeg-elementary: mpv, mpeg, mpg
typefindfunctions: video/mpeg4: m4v
typefindfunctions: video/x-h263: h263, 263
typefindfunctions: video/x-h264: h264, x264, 264
typefindfunctions: video/x-h265: h265, x265, 265
typefindfunctions: video/x-nuv: nuv
typefindfunctions: audio/x-m4a: m4a
typefindfunctions: application/x-3gp: 3gp
typefindfunctions: video/quicktime: mov, mp4
typefindfunctions: image/x-quicktime: qif, qtif, qti
typefindfunctions: image/jp2: jp2
typefindfunctions: image/x-jpc: jpc, j2k
typefindfunctions: video/mj2: mj2
typefindfunctions: text/html: htm, html
typefindfunctions: application/vnd.rn-realmedia: ra, ram, rm, rmvb
typefindfunctions: application/x-pn-realaudio: ra, ram, rm, rmvb
typefindfunctions: application/x-shockwave-flash: swf, swfl
typefindfunctions: application/dash+xml: mpd, MPD
typefindfunctions: application/vnd.ms-sstr+xml: no extensions
typefindfunctions: video/x-flv: flv
typefindfunctions: text/plain: txt
typefindfunctions: text/utf-16: txt
typefindfunctions: text/utf-32: txt
typefindfunctions: text/uri-list: ram
typefindfunctions: application/itc: itc
typefindfunctions: application/x-hls: m3u8
typefindfunctions: application/sdp: sdp
typefindfunctions: application/smil: smil
typefindfunctions: application/ttml+xml: ttml+xml
typefindfunctions: application/xml: xml
typefindfunctions: audio/x-wav: wav
typefindfunctions: audio/x-aiff: aiff, aif, aifc
typefindfunctions: audio/x-svx: iff, svx
typefindfunctions: audio/x-paris: paf
typefindfunctions: audio/x-nist: nist
typefindfunctions: audio/x-voc: voc
typefindfunctions: audio/x-sds: sds
typefindfunctions: audio/x-ircam: sf
typefindfunctions: audio/x-w64: w64
typefindfunctions: audio/x-rf64: rf64
typefindfunctions: audio/x-shorten: shn
typefindfunctions: application/x-ape: ape
typefindfunctions: image/jpeg: jpg, jpe, jpeg
typefindfunctions: image/gif: gif
typefindfunctions: image/png: png
typefindfunctions: image/bmp: bmp
typefindfunctions: image/tiff: tif, tiff
typefindfunctions: image/webp: webp
typefindfunctions: image/x-exr: exr
typefindfunctions: image/x-portable-pixmap: pnm, ppm, pgm, pbm
typefindfunctions: video/x-matroska: mkv, mka, mk3d, webm
typefindfunctions: application/mxf: mxf
typefindfunctions: video/x-mve: mve
typefindfunctions: video/x-dv: dv, dif
typefindfunctions: audio/x-amr-nb-sh: amr
typefindfunctions: audio/x-amr-wb-sh: amr
typefindfunctions: audio/iLBC-sh: ilbc
typefindfunctions: audio/x-sbc: sbc
typefindfunctions: audio/x-sid: sid
typefindfunctions: image/x-xcf: xcf
typefindfunctions: video/x-mng: mng
typefindfunctions: image/x-jng: jng
typefindfunctions: image/x-xpixmap: xpm
typefindfunctions: image/x-sun-raster: ras
typefindfunctions: application/x-bzip: bz2
typefindfunctions: application/x-gzip: gz
typefindfunctions: application/zip: zip
typefindfunctions: application/x-compress: Z
typefindfunctions: subtitle/x-kate: no extensions
typefindfunctions: application/x-subtitle-vtt: vtt
typefindfunctions: audio/x-flac: flac
typefindfunctions: audio/x-vorbis: no extensions
typefindfunctions: video/x-theora: no extensions
typefindfunctions: application/x-ogm-video: no extensions
typefindfunctions: application/x-ogm-audio: no extensions
typefindfunctions: application/x-ogm-text: no extensions
typefindfunctions: audio/x-speex: no extensions
typefindfunctions: audio/x-celt: no extensions
typefindfunctions: application/x-ogg-skeleton: no extensions
typefindfunctions: text/x-cmml: no extensions
typefindfunctions: application/x-executable: no extensions
typefindfunctions: audio/aac: aac, adts, adif, loas
typefindfunctions: audio/x-spc: spc
typefindfunctions: audio/x-wavpack: wv, wvp
typefindfunctions: audio/x-wavpack-correction: wvc
typefindfunctions: audio/x-caf: caf
typefindfunctions: application/postscript: ps
typefindfunctions: image/svg+xml: svg
typefindfunctions: application/x-rar: rar
typefindfunctions: application/x-tar: tar
typefindfunctions: application/x-ar: a
typefindfunctions: application/x-ms-dos-executable: dll, exe, ocx, sys, scr, msstyles, cpl
typefindfunctions: video/x-dirac: no extensions
typefindfunctions: multipart/x-mixed-replace: no extensions
typefindfunctions: application/x-mmsh: no extensions
typefindfunctions: video/vivo: viv
typefindfunctions: audio/x-nsf: nsf
typefindfunctions: audio/x-gym: gym
typefindfunctions: audio/x-ay: ay
typefindfunctions: audio/x-gbs: gbs
typefindfunctions: audio/x-vgm: vgm
typefindfunctions: audio/x-sap: sap
typefindfunctions: video/x-ivf: ivf
typefindfunctions: audio/x-kss: kss
typefindfunctions: application/pdf: pdf
typefindfunctions: application/msword: doc
typefindfunctions: image/vnd.adobe.photoshop: psd
typefindfunctions: image/vnd.wap.wbmp: no extensions
typefindfunctions: application/x-yuv4mpeg: no extensions
typefindfunctions: image/x-icon: no extensions
typefindfunctions: image/x-degas: no extensions
typefindfunctions: application/octet-stream: no extensions
typefindfunctions: application/x-ssa: ssa, ass
typefindfunctions: video/x-pva: pva
typefindfunctions: audio/x-xi: xi
typefindfunctions: audio/audible: aa, aax
staticelements: bin: Generic bin
staticelements: pipeline: Pipeline object
Total count: 25 plugins, 253 features
I have removed the cache by running:
rm -rf .cache/gstreamer-1
Nothing changed.
I have removed completely gstreamer and I have reinstalled it again with the following command (it is longer than need but I have reinstalled some packages that were also remove when gstreamer was removed.)
sudo apt install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio calibre evince gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0 gstreamer-qapt gstreamer1.0-alsa gstreamer1.0-doc gstreamer1.0-fluendo-mp3 gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-libav gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-pulseaudio gstreamer1.0-qt5 gstreamer1.0-tools gstreamer1.0-vaapi gstreamer1.0-x kaccounts-integration kde-runtime kdelibs5-plugins kinfocenter kio-gdrive ksysguard ktorrent kubuntu-desktop kwin kwin-addons kwin-common kwin-x11 libevview3-3 libgstreamer-gl1.0-0 libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgstreamer1.0-dev libkdewebkit5 libkf5webkit5 libplasma3 libprocessui7 libqgsttools-p1 libqt5multimedia5-plugins libqt5webkit5 libqtwebkit4 libreoffice-avmedia-backend-gstreamer libreoffice-kde libreoffice-kde4 libspice-server1 libwebkit2gtk-4.0-37 liferea oem-config oem-config-kde packagekit packagekit-tools phonon-backend-gstreamer phonon4qt5-backend-gstreamer plasma-desktop plasma-discover plasma-scriptengine-javascript plasma-widgets-addons plasma-workspace pychess python-pyqt5.qtwebkit python3-pyqt5.qtwebkit qemu-kvm qemu-system-x86 qml-module-qtmultimedia qml-module-qtwebkit qt5-assistant qttools5-dev-tools sddm-theme-breeze signon-ui-x11 ubiquity ubiquity-frontend-kde zenity
Which includes the good plugins, where the v4l2sink is contained as you can see here. No problems came out from the installation but the problem persisted.
I have double-checked that the plugins have been properly installed:
sudo apt install gstreamer1.0-plugins-good
Reading package lists... Done
Building dependency tree
Reading state information... Done
gstreamer1.0-plugins-good is already the newest version (1.14.5-0ubuntu1~18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 69 not upgraded.
I run also the following command
locate libgstvideo4linux2.so
This library contains the element v4l2sink that I was trying to use as you can see here. I got
/usr/lib/x86_64-linux-gnu/gstreamer-1.0
I have seen that LD_LIBRARY_PATH did not contain this directory so I added it by running:
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib/:/usr/lib/x86_64-linux-gnu/gstreamer-1.0
I know this only change the path in the current terminal, so I run again the same commands I listed before in that terminal and it returned the same results.
Related
How to convert yuv V210 to h264 lossless with gst-launch-1.0 on Ubunut 18.04
Is it possible to create an H264 video with profile Hi444PP from YUV v210 encoded video using gst-launch?( I'm trying to use vaapih264enc )
Process GIF using FFmpeg libraries - can't find parser at av_parser_init
I am playing with ffmpeg libs, namely libswscale and libavcodec for now. My goal is resize GIF files. From my ridiculous understanding, I think I need to decode the GIF and get an AVFrame process the frame with libswscale encode again into GIF But I am stuck at step 1. Based on official sample at https://github.com/FFmpeg/FFmpeg/blob/master/doc/examples/decode_video.c , I need to get a parser: codec = avcodec_find_decoder(AV_CODEC_ID_GIF); parser = av_parser_init(codec->id); But no parser is found. I am not touching parser in my configure call, so I take all: Enabled parsers: aac cavsvideo dvbsub h263 mpegvideo sipr xma aac_latm cook dvd_nav h264 opus tak ac3 dca dvdsub hevc png vc1 adx dirac flac mjpeg pnm vorbis av1 dnxhd g729 mlp rv30 vp3 avs2 dpx gsm mpeg4video rv40 vp8 bmp dvaudio h261 mpegaudio sbc vp9 What am I doing wrong? If this is the wrong approach, what is the correct one?
Does LAV Filter do the YUV to RGB conversion
I would like to improve decoding H.264 video stream with MPC-HC using LAV video decoder. The stream I will play back is always in format yuvj444p (Planar YCbCr 4:4:4 in TV level [0-255]), encoded with x264. I'm using MPC-HC version 1.7.10, and LAV video decoder 0.68.1 I have a nVidia Quadro K5200, and I know how to write GLSL shader to run YUV to RGB conversion. I'm wondering if someone here could give me a hint if it's worth doing such job, and possibly on where to start. Should I customize the EVR (Enhanced Video Renderer - Custom Presenter) ? Should I just write an internal shader? ...
Yes, LAV Video Decoder filter does support yuvj444p to RGB32 color conversion. In order to prove it, I have tried the following test: Create uncompressed AVI file in RGB color format (using MATLAB). Convert the AVI file to x264 compressed MKV file in yuvj444p color format (using FFMPEG). Build a filter graph in Graph Studio Next, with LAV Video Decoder (DirectShow) filter. Inspect the output pin of Decoder filter. Play the graph, and compare the output frame to original input frame. Input AVI file name: RGB_INPUT.avi MKV file name: OUTPUT.mkv I used ffmpeg with the following parameters (in command line): ffmpeg -i RGB_INPUT.avi -pix_fmt yuvj444p -vf scale=w=0:h=0:out_color_matrix=bt709 -c:v libx264 -crf 18 -x264opts colorprim=bt709:transfer=bt709:colormatrix=bt709 -an OUTPUT.mkv I took the example from here: http://forum.doom9.org/showthread.php?p=1671195 Filter Graph: Inspecting the output pin of LAV Video Decoder, shows that output color format is RGB32 (media sub-type is: MEDIASUBTYPE_RGB32): Comparing uncompressed input frame, to decoded output frame: Source frame (uncompressed image): Video Renderer output (screenshot): Absolute difference image (scaled by 10): Conclusion: LAV Video Decoder correctly convert yuvj444 to RGB32.
Decode mJPEG to a format usable by libx264
I am compressing frames coming from webcam with libx264. So far I used YUY2 raw frames and swscale to transcode the frames to I420, which is usable by x264. Anyway I would like to add support for mJPEG webcams (usually webcam provides both, but mJPEG allows higher frame rates and resolutions). What can I use to transcode mJPEG to some format, that can be used by x264?
If you already use swscale why not to use ffmpeg/libav (libavcodec) for decoding mjpeg?
How to write bitmaps as frames to H.264 with x264 in C\C++?
How to write bitmaps (RGB) as frames to H.264 with x264 in C\C++? Some Examples with source would be great!