Error pipeline could not be constructed no element v4l2src

Solution 1 the v4l2src plugin belongs to the gstreamer-plugins-good package; so sudo apt-get install gstreamer1.0-plugins-good should help you out Gstreamer packages most of its plugins in separate packages; you have gst-plugins-base gst-plugins-good gst-plugins-ugly and more. They are pluggable; so just updating gstreamer won't auto-select gst-plugins-good for you... Solution 2 I had this same issue a while back, and what caused it for me was the fact that Anaconda was installed and had its base environment active. The solution was to run the command: conda deactivate And then try again. Note: In my particular case it was harder to spot because

Solution 1

the v4l2src plugin belongs to the gstreamer-plugins-good package; so

sudo apt-get install gstreamer1.0-plugins-good

should help you out

Gstreamer packages most of its plugins in separate packages; you have

  • gst-plugins-base
  • gst-plugins-good
  • gst-plugins-ugly

and more. They are pluggable; so just updating gstreamer won’t auto-select gst-plugins-good for you…

Solution 2

I had this same issue a while back, and what caused it for me was the fact that Anaconda was installed and had its base environment active. The solution was to run the command:

conda deactivate

And then try again.

Note: In my particular case it was harder to spot because I also had Oh-My-Bash installed and it removed Anaconda’s environment indicator in the terminal.

Solution 3

I’m using a gstreamer-1.0 on Raspberry and I was having the same issue. As I was running out of options I’ve tried to install also the 0.10 plugins and unexpectedly it works.

sudo apt-get install gstreamer0.10-plugins-good

my 2 cent ^_^

EDIT:
Well, actually it doen’t work yet, but at least it’s giving me a different error :)

EDIT 2:
It was a syntax error, It actually works for me :)

Solution 4

Does

gst-inspect-1.0 -b

list any blacklisted plugins? If not check the the pluging pysically exists:

locate libgstvideo4linux2.so

There should be one under e.g.

/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so

or

/usr/lib/gstreamer-1.0/libgstvideo4linux2.so

Then remove the registry cache again and run

GST_DEBUG="*:5" gst-inspect-1.0 2>debug.log

Search the log for v4l2 and check if gstreamer reports a reason why it won’t load the plugin.

Comments

  • Am using Ubuntu(14.04) and I am getting this error while trying to use gstreamer.

    gst-launch-1.0 v4l2src !  video/x-raw,width=640,height=480 !  x264enc ! h264parse ! rtph264pay !  udpsink host=127.0.0.1 port=5000
    

    I have checked the gst-inspect-1.0 v4l2src

    It say element not found «No such element or plugin ‘v4l2src'»

    What should I do ? From where can I get this element or plugin. I have tried resinstalling entire gstreamer. But am unable to do so.

Recents

PI_newbee

Posts: 182
Joined: Mon Aug 26, 2013 7:41 pm

ERROR: pipeline could not be constructed: no element «v4l2sr

Hi.
I’m running one gstreamer code as shell script.
I installed all of necessary packages but after i run the code i get the error in subject.

This is the shell script code:
gst-launch -v v4l2src ! «image/jpeg,width=320,height=240,framerate=30/1» ! multipartmux !
tcpserversink host=x.x.x.x port=5000 sync=false alsasrc device=hw:1 ! audioconvert !
audioresample ! ‘audio/x-raw-int,rate=8000,width=16,channels=1’ ! udpsink host=x.x.x.x port=5001

Any ideas ?


6by9

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13850
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ERROR: pipeline could not be constructed: no element «v4

Thu Aug 18, 2016 10:20 am

You don’t say which version of GStreamer you are using, but you’re probably missing the plugins-good package
sudo apt-get install gst-plugins-good1.0
or
sudo apt-get install gst-plugins-good0.10

Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I’m not interested in doing contracts for bespoke functionality — please don’t ask.


PI_newbee

Posts: 182
Joined: Mon Aug 26, 2013 7:41 pm

Re: ERROR: pipeline could not be constructed: no element «v4

Fri Aug 19, 2016 9:58 am

I reinstalled all the packages and it look like that the problem is solved.
But now when i run the script i get this:

./startScript.sh
—————————————-
Setting pipeline to PAUSED …
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format
Additional debug info:
gstbasesrc.c(2830): gst_base_src_start (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Check your filtered caps, if any
Setting pipeline to NULL …
Freeing pipeline …
—————————————-
Does this means that the gsteamer didnt exit correctly and the pipeline is still active / paused ?


6by9

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13850
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ERROR: pipeline could not be constructed: no element «v4

Fri Aug 19, 2016 10:25 am

PI_newbee wrote:Setting pipeline to NULL …
Freeing pipeline …
—————————————-
Does this means that the gsteamer didnt exit correctly and the pipeline is still active / paused ?

Those last 2 lines mean that GStreamer has torn everything down.

PI_newbee wrote:ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Could not negotiate format

So v4l2src couldn’t agree on the format to use.

What is your V4L2 source? The Pi camera? Have you loaded the V4L2 driver so that /dev/video0 exists?
If some other source, then does it support JPEG? «sudo apt-get install v4l-utils», «v4l2-ctl —list-formats-ext» will tell you the supported formats.

Break the pipe down into small sections and test each of those in turn. You should be able to truncate it almost anywhere and terminate it with fakesink to see if the fragment works.

Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I’m not interested in doing contracts for bespoke functionality — please don’t ask.


PI_newbee

Posts: 182
Joined: Mon Aug 26, 2013 7:41 pm

Re: ERROR: pipeline could not be constructed: no element «v4

Sat Aug 20, 2016 8:32 am

I have two USB webcams and according to LSUSB only one is recognized.
I installed the Logitech webcam ….

Bus 001 Device 006: ID 046d:0819 Logitech, Inc. Webcam C210
Bus 001 Device 005: ID 0458:7089 KYE Systems Corp. (Mouse Systems)
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.

Under /dev directory i found «video0 and video1» files and V4L directory.

This is the output of V4l2 format:
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘YUYV’
Name : YUV 4:2:2 (YUYV)
Size: Discrete 640×480
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 352×288
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 320×240
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 176×144
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)
Size: Discrete 160×120
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.040s (25.000 fps)
Interval: Discrete 0.050s (20.000 fps)
Interval: Discrete 0.067s (15.000 fps)
Interval: Discrete 0.100s (10.000 fps)
Interval: Discrete 0.200s (5.000 fps)

PIN


6by9

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13850
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ERROR: pipeline could not be constructed: no element «v4

Sat Aug 20, 2016 10:59 am

Your webcam doesn’t support jpeg directly, therefore it complains when you ask it to. You need to insert a jpeg encoder (jpegenc I think) into your pipe after the v4l2src.

Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I’m not interested in doing contracts for bespoke functionality — please don’t ask.


PI_newbee

Posts: 182
Joined: Mon Aug 26, 2013 7:41 pm

Re: ERROR: pipeline could not be constructed: no element «v4

Mon Aug 22, 2016 10:18 am

i changed the code and added jpeg encoder, but now i have some other problem.
The more i look at gstreamer and examples , i must say it’s quite powerfull framework.

Anyway this is the updated code:

Code: Select all

gst-launch -v v4l2src !
jpegenc ! "image/jpeg,width=320,height=240,framerate=30/1" !multipartmux !
tcpserversink host=192.168.101 port=5000 sync=false alsasrc device=hw:1 !
audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' !
udpsink host=x.x.x.x port=5001

Error:
WARNING: erroneous pipeline: link without sink element

PIN


6by9

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13850
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ERROR: pipeline could not be constructed: no element «v4

Mon Aug 22, 2016 4:59 pm

The fakesink component can be used to terminate any pipe, so test your pipeline bit by bit to find your error.
I can’t remember how critical spaces are -you have no space between the! and multipartmux.

Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I’m not interested in doing contracts for bespoke functionality — please don’t ask.


PI_newbee

Posts: 182
Joined: Mon Aug 26, 2013 7:41 pm

Re: ERROR: pipeline could not be constructed: no element «v4

Fri Aug 26, 2016 1:26 pm

I am sorry i could not reply sooner.
The funny part is that i use exactly the same code ( with different camera ) as on this tutorial :

http://sanjosetech.blogspot.hr/2013/05/ … o-and.html

I would understand that there is a hardware issue but error message doesn’t give any use full information, where to look… If it would be HW i guess, error message would point in this direction.
From my point of view, i guess that there must be some problem with packages…

Please be so kind and take a look at the tutorial. If there is no problem then it must be in gstreamer setup / installation.

PIN


6by9

Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 13850
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: ERROR: pipeline could not be constructed: no element «v4

Fri Aug 26, 2016 6:59 pm

The camera used in the blog reports that it supports YUYV and MJPEG. Yours supports YUYV only. There is no way that you can get the camera/v4l2src to produce JPEG data directly (MJPEG can be treated as a continuous form of JPEG).

PI_newbee wrote:I would understand that there is a hardware issue but error message doesn’t give any use full information, where to look… If it would be HW i guess, error message would point in this direction.
From my point of view, i guess that there must be some problem with packages…

I’ve already said, break your pipe down to find where you have an issue. Try each of these in turn to find where your issue is (you still hadn’t replied about the seemingly missing space in your command)

Code: Select all

gst-launch -v v4l2src ! jpegenc ! "image/jpeg,width=320,height=240,framerate=30/1" ! fakesink
gst-launch -v v4l2src ! jpegenc ! "image/jpeg,width=320,height=240,framerate=30/1" ! multipartmux ! fakesink
gst-launch -v v4l2src ! jpegenc ! "image/jpeg,width=320,height=240,framerate=30/1" ! multipartmux ! tcpserversink host=192.168.101 port=5000 sync=false 
gst-launch -v alsasrc device=hw:1 ! audioconvert ! fakesink
gst-launch -v alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! fakesink
gst-launch -v alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! udpsink host=x.x.x.x port=5001

and if ALL of those have worked,
gst-launch -v v4l2src ! jpegenc ! "image/jpeg,width=320,height=240,framerate=30/1" ! multipartmux ! tcpserversink host=192.168.101 port=5000 sync=false  
alsasrc device=hw:1 ! audioconvert ! audioresample ! 'audio/x-raw-int,rate=8000,width=16,channels=1' ! udpsink host=x.x.x.x port=5001

Software Engineer at Raspberry Pi Ltd. Views expressed are still personal views.
I’m not interested in doing contracts for bespoke functionality — please don’t ask.


Return to “General discussion”

Я пытаюсь создать очень простой конвейер Gstreamer, в котором у меня есть исходный элемент, который является моей камерой FaceTime, и элемент приемника, который является приемником udp.

Я сначала устанавливаю Gstreamer по инструкции здесь. Я без проблем запускал некоторые основные пайплайны; однако, когда я попытался использовать следующую команду

./gst-launch-0.10 v4l2src ! xviimagesink

Я получил следующую ошибку:

ERROR: pipeline could not be constructed: no element "v4l2src".

Итак, я немного покопался и оказалось, что плагин v4l2src находится в папке gst-plugins-good. Я установил эти хорошие плагины с помощью macports, используя следующую команду:

port install gst-plugins-good

Спустя очень долгое время все установилось без ошибок. Теперь gst-launch появляется в трех местах.

/Library/Frameworks/GStreamer.framework/Versions/0.10/bin/gst-launch-0.10
/opt/local/bin/gst-launch
/opt/local/bin/gst-launch-0.10

Если я попытаюсь запустить вышеупомянутый конвейер из любого из этих каталогов, я все равно получу

ERROR: pipeline could not be constructed: no element "v4l2src".

Если я наберу следующую команду из любого места, я получу еще несколько ошибок, но, похоже, она все еще не находит v4lsrc.

gst-launch v4l2src ! xviimagesink

дает:

Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
GConf Error: Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Not enough memory)
ERROR: pipeline could not be constructed: no element "v4l2src".

Итак, похоже, что у меня беспорядок с GStreamer, и я все еще не могу заставить свою камеру работать, потому что GStreamer не может найти v4l2src.

Некоторая помощь будет оценена! Заранее спасибо.

the v4l2src plugin belongs to the gstreamer-plugins-good package; плагин v4l2src относится к пакету gstreamer-plugins-good ; so так

sudo apt-get install gstreamer1.0-plugins-good

should help you out должен помочь тебе

Gstreamer packages most of its plugins in separate packages; Gstreamer упаковывает большинство своих плагинов в отдельные пакеты; you have у вас есть

  • gst-plugins-base gst-плагины-база
  • gst-plugins-good gst-плагины-хорошо
  • gst-plugins-ugly GST-плагины-уродливые

and more. и более. They are pluggable; Они подключаемые; so just updating gstreamer won’t auto-select gst-plugins-good for you… так что простое обновление gstreamer не будет автоматически выбирать gst-plugins-хорошо для вас…

en

Does Делает

gst-inspect-1.0 -b

list any blacklisted plugins? перечислить какие-либо плагины из черного списка? If not check the the pluging pysically exists: Если не проверить, что подключение физически существует:

locate libgstvideo4linux2.so

There should be one under eg Должен быть один под, например

/usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideo4linux2.so

or или же

/usr/lib/gstreamer-1.0/libgstvideo4linux2.so

Then remove the registry cache again and run Затем снова удалите кеш реестра и запустите

GST_DEBUG="*:5" gst-inspect-1.0 2>debug.log

Search the log for v4l2 and check if gstreamer reports a reason why it won’t load the plugin. Найдите в журнале v4l2 и проверьте, сообщает ли gstreamer причину, по которой он не загружает плагин.

en

I’m using a gstreamer-1.0 on Raspberry and I was having the same issue. Я использую gstreamer-1.0 на Raspberry, и у меня была такая же проблема. As I was running out of options I’ve tried to install also the 0.10 plugins and unexpectedly it works. Поскольку у меня заканчивались варианты, я попытался установить также плагины 0.10, и неожиданно это сработало.

sudo apt-get install gstreamer0.10-plugins-good

my 2 cent ^_^ мои 2 цента ^_^

EDIT: Well, actually it doen’t work yet, but at least it’s giving me a different error :) РЕДАКТИРОВАТЬ: Ну, на самом деле это еще не работает, но, по крайней мере, это дает мне другую ошибку :)

EDIT 2: It was a syntax error, It actually works for me :) РЕДАКТИРОВАТЬ 2: это была синтаксическая ошибка, она действительно работает для меня :)

en

I had this same issue a while back, and what caused it for me was the fact that Anaconda was installed and had its base environment active. У меня была такая же проблема некоторое время назад, и причиной ее для меня был тот факт, что Anaconda была установлена ​​и ее базовая среда была активной. The solution was to run the command: Решение состояло в том, чтобы запустить команду:

conda deactivate

And then try again. А затем попробуйте еще раз.

Note: In my particular case it was harder to spot because I also had Oh-My-Bash installed and it removed Anaconda’s environment indicator in the terminal. Примечание. В моем конкретном случае это было труднее обнаружить, потому что у меня также был установлен Oh-My-Bash, и он удалил индикатор среды Anaconda в терминале.

en

For my case the short answer is: Для моего случая краткий ответ:

Run export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib Выполнить export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

Long answer: Длинный ответ:

Following the steps from @ensonic, I saw that most of my libraries were blacklisted. Следуя инструкциям @ensonic, я увидел, что большинство моих библиотек занесены в черный список.

  1. Did rm -rf ~/.cache/gstreamer-1.0/ to clean the cache Делал ли rm -rf ~/.cache/gstreamer-1.0/ очистку кеша

  2. Did gst-launch-1.0 v4l2src and got many errors like this: Сделал gst-launch-1.0 v4l2src и получил много таких ошибок:

    (gst-plugin-scanner:5082): GStreamer-WARNING **: 19:41:22.907: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstttmlsubs.so': librga.so: cannot open shared object file: No such file or directory

Which showed that I didn’t have the librga.so file Что показало, что у меня нет файла librga.so

  1. I could find librga.so on my system by running locate librga.so , but it seems that it was not on my dynamic shared libraries path. Я мог найти librga.so в своей системе, запустив locate librga.so , но похоже, что это не было на моем пути динамических общих библиотек. To do that I only had to run export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib Для этого мне нужно было всего лишь запустить export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib

en

My error was due to Anaconda virtual environment and other missing plug-in. Моя ошибка была связана с виртуальной средой Anaconda и другим отсутствующим плагином. I solved by [this][1]: Я решил [это] [1]:
conda deactivate

sudo apt-get install gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libxml2 libpcap0.8 libaudit1 libnotify4

en

В Ubuntu вы можете установить только:

sudo apt-get install v4l-utils

en

Понравилась статья? Поделить с друзьями:
  • Error php для joomla
  • Error php startup unable to load dynamic library
  • Error php is not running wordpress
  • Error php home is not specified or invalid press fix to edit your project configuration
  • Error phone code invalid