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

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Jan 05, 2018 11:41 am

RaoulSerio wrote:
Fri Jan 05, 2018 11:24 am
I was thinking the same.. it's probably a recompilation problem.
I followed the script (entirely) for recompilation and I used the gst-omx branch 1.10 sources from the main source, modifying the script in the gst-omx section adding "git checkout -t origin/$BRANCH || true" that was missing.

Now I will try to use rpi source of gst-pmx
Should be no different. I had built and tested everything from the 1.10 branches, but needed to test the Raspbian version to ensure that my patch was sensible to push into the repos.

Minor niggle in that the colleague I spoke to earlier about merging patches appears to now be off on holiday until the 22nd :(
He hadn't quite disappeared yet, so I have some packages to test....
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

RaoulSerio
Posts: 10
Joined: Tue Dec 19, 2017 9:12 am

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Jan 05, 2018 4:19 pm

At this point I can try only to clean and recompile all from scratch.
I'm in trouble :(

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

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Jan 05, 2018 5:02 pm

I'm in the middle of something else at the moment. My friendly Raspbian maintainer has built the modules at https://drive.google.com/file/d/14hpi7R ... sp=sharing for testing. When I stuck them on an image it resulted in gst-inspect-1.0 and gst-launch throwing wobblers over something being very wrong, but you're welcome to try them. Use "dpkg -i *.deb" to install them. It may be worth installing gstreamer1.0-omx-rpi via apt-get first to get the dependencies sorted, and PLEASE don't use an important system (I can't get mine back to gst-omx being recognised at all).
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Sun Jan 07, 2018 9:57 am

6by9 wrote:
Fri Jan 05, 2018 5:02 pm
I'm in the middle of something else at the moment. My friendly Raspbian maintainer has built the modules at https://drive.google.com/file/d/14hpi7R ... sp=sharing for testing. When I stuck them on an image it resulted in gst-inspect-1.0 and gst-launch throwing wobblers over something being very wrong, but you're welcome to try them. Use "dpkg -i *.deb" to install them. It may be worth installing gstreamer1.0-omx-rpi via apt-get first to get the dependencies sorted, and PLEASE don't use an important system (I can't get mine back to gst-omx being recognised at all).
gstreamer1.0-omx-rpi_1.10.4-1+rpt3_armhf.deb did not work for me (the functions of the module were not found). I noticed, that the required config file in /etc/xdg was missing. Then I tried to install gstreamer1.0-omx-rpi-config_1.10.4-1+rpt3_armhf.deb hoping to get the config file, but this package threw an error.

I created a Debian package from my working version which I have compiled from source using checkinstall. This version is based on gst-omx 1.10.5 and includes the patch from 6by9 and two more upstream patches. The package is available from
gstreamer1.0-omx-rpi_1.10.5-1+rpi+patches_armhf.deb
The modified source files can be downloaded from
gst-omx-modified-sources.tar.gz

Before you install the package, remove all gstreamer1.0-omx packages you have installed before and remove all gst-omx config files (they may have different names!) from /etc/xdg.

For installation I recommend using gdebi (install gdebi-core), because it will also install all dependencies.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Tue Jan 16, 2018 1:46 am

6by9 wrote:
Tue Jan 02, 2018 2:16 pm
Hmm, that seemed to fall out more easily than expected. Try this patch for combining any fragmented buffers into one output GST buffer

Code: Select all

diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index bfad2f3..ad02461 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -585,16 +585,42 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
 
     GST_DEBUG_OBJECT (self, "Handling output data");
 
-    if (buf->omx_buf->nFilledLen > 0) {
-      outbuf = gst_buffer_new_and_alloc (buf->omx_buf->nFilledLen);
-
-      gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
-      memcpy (map.data,
-          buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
-          buf->omx_buf->nFilledLen);
-      gst_buffer_unmap (outbuf, &map);
+    if (!frame->output_buffer) {
+      if (buf->omx_buf->nFilledLen > 0) {
+        outbuf = gst_buffer_new_and_alloc (buf->omx_buf->nFilledLen);
+
+        gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+        memcpy (map.data,
+            buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
+            buf->omx_buf->nFilledLen);
+        gst_buffer_unmap (outbuf, &map);
+      } else {
+        outbuf = gst_buffer_new ();
+      }
     } else {
-      outbuf = gst_buffer_new ();
+      if (buf->omx_buf->nFilledLen > 0) {
+        GstMapInfo map_fragment = GST_MAP_INFO_INIT;
+
+        outbuf = gst_buffer_new_and_alloc (gst_buffer_get_size(frame->output_buffer) + buf->omx_buf->nFilledLen);
+
+        gst_buffer_map (outbuf, &map, GST_MAP_WRITE);
+
+        gst_buffer_map (frame->output_buffer, &map_fragment, GST_MAP_READ);
+        memcpy(map.data,
+            map_fragment.data,
+            gst_buffer_get_size(frame->output_buffer));
+        gst_buffer_unmap (frame->output_buffer, &map_fragment);
+
+        memcpy (map.data + gst_buffer_get_size(frame->output_buffer),
+            buf->omx_buf->pBuffer + buf->omx_buf->nOffset,
+            buf->omx_buf->nFilledLen);
+        gst_buffer_unmap (outbuf, &map);
+
+        gst_buffer_unref(frame->output_buffer);
+        frame->output_buffer = NULL;
+      } else {
+        outbuf = frame->output_buffer;
+      }
     }
 
     GST_BUFFER_TIMESTAMP (outbuf) =
@@ -620,8 +646,13 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
 
     if (frame) {
       frame->output_buffer = outbuf;
-      flow_ret =
-          gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (self), frame);
+      if (buf->omx_buf->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {
+        GST_INFO_OBJECT(self, "Passing buffer as frame complete - nFlags %04X, size %d",
+            buf->omx_buf->nFlags,
+            gst_buffer_get_size(frame->output_buffer));
+        flow_ret =
+            gst_video_encoder_finish_frame (GST_VIDEO_ENCODER (self), frame);
+      } else {
+        GST_ERROR_OBJECT(self, "NOT passing buffer as it is a fragment - nFlags %04X, now size %d",
+            buf->omx_buf->nFlags,
+            gst_buffer_get_size(frame->output_buffer));
+      }
     } else {
       GST_ERROR_OBJECT (self, "No corresponding frame found");
       flow_ret = gst_pad_push (GST_VIDEO_ENCODER_SRC_PAD (self), outbuf);
Yes there's extra logging in there which isn't necessary, but it does mean it screams as and when this happens.
I've just seen in the logs

Code: Select all

0:00:13.626942325  2168 0x71d02c30 ERROR            omxvideoenc gstomxvideoenc.c:658:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
0:00:13.627881326  2168 0x71d02c30 INFO             omxvideoenc gstomxvideoenc.c:652:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> Passing buffer as frame complete - nFlags 0530, size 78358
...
0:00:16.890567810  2168 0x71d02c30 ERROR            omxvideoenc gstomxvideoenc.c:658:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536
0:00:16.891761862  2168 0x71d02c30 ERROR            omxvideoenc gstomxvideoenc.c:658:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0520, now size 131072
0:00:16.892754509  2168 0x71d02c30 INFO             omxvideoenc gstomxvideoenc.c:652:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> Passing buffer as frame complete - nFlags 0530, size 142618
and using "avprobe -show_packets output.h264 | grep size"

Code: Select all

size=78386
...
size=142646
which fairly nicely match up. The 28 byte difference sounds like the header bytes to me.
Unfortunately you seem to have introduced a memory leak. One of my beta tester reported it and I ran some tests on Stretch using GST_DEBUG.

Each time I get an error message like the following:

0:10:06.502894473 3666 0x782ec0 ERROR omxvideoenc gstomxvideoenc.c:675:gst_omx_video_enc_handle_output_frame:<omxh264enc-omxh264enc0> NOT passing buffer as it is a fragment - nFlags 0420, now size 65536

memory increases. Sometimes I get a burst of multiple such messages and memory increases a lot more. My beta tester managed to fill up the whole RAM within an hour or so. High bitrates result in more fragmented buffers and the memory is growing much faster.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: GStreamer and omx encoding from live source.. a naive problem

Wed Jan 17, 2018 10:46 am

Please don't PM pings - I'm not here just to support your project.

30 seconds looking at the upstream bugtracker before would have identified the original issue - it's number 2 on their list when sorted in chronological order. https://bugzilla.gnome.org/show_bug.cgi?id=736829 - last changed 2015-03-24.
That sort of shows their priority on this, but also explains why things are misbehaving.
If they're after a generic solution, then probably finding nFilledLen == nAllocLen would be a fair indication that this is going to be a fragment and therefore worth looking at the flags. (There was a case where that failed previously, but that changed Dec 2016).

Looking at their partial solution, I think I'm missing a gst_video_codec_frame_unref (frame), so you could give

Code: Select all

diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 266aa56..c2d2fa5 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -622,6 +622,10 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
       } else {
         outbuf = frame->output_buffer;
       }
+      // We didn't release the frame for the last partial fragment as
+      // it was still required, but we'll have gained a further reference
+      // with this call, so release it.
+      gst_video_codec_frame_unref (frame);
     }
 
     GST_BUFFER_TIMESTAMP (outbuf) =
a try.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Wed Jan 17, 2018 12:22 pm

6by9 wrote:
Wed Jan 17, 2018 10:46 am
Please don't PM pings - I'm not here just to support your project.

30 seconds looking at the upstream bugtracker before would have identified the original issue - it's number 2 on their list when sorted in chronological order. https://bugzilla.gnome.org/show_bug.cgi?id=736829 - last changed 2015-03-24.
That sort of shows their priority on this, but also explains why things are misbehaving.
If they're after a generic solution, then probably finding nFilledLen == nAllocLen would be a fair indication that this is going to be a fragment and therefore worth looking at the flags. (There was a case where that failed previously, but that changed Dec 2016).

Looking at their partial solution, I think I'm missing a gst_video_codec_frame_unref (frame), so you could give

Code: Select all

diff --git a/omx/gstomxvideoenc.c b/omx/gstomxvideoenc.c
index 266aa56..c2d2fa5 100644
--- a/omx/gstomxvideoenc.c
+++ b/omx/gstomxvideoenc.c
@@ -622,6 +622,10 @@ gst_omx_video_enc_handle_output_frame (GstOMXVideoEnc * self, GstOMXPort * port,
       } else {
         outbuf = frame->output_buffer;
       }
+      // We didn't release the frame for the last partial fragment as
+      // it was still required, but we'll have gained a further reference
+      // with this call, so release it.
+      gst_video_codec_frame_unref (frame);
     }
 
     GST_BUFFER_TIMESTAMP (outbuf) =
a try.
Thanks and sorry for the PM; I won't do it again, if you don't like it.

I'll test the modification in the afternoon and will report back here, if it solves the memory leak problem.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Wed Jan 17, 2018 3:30 pm

Problem solved. I let it run for about 90 minutes and memory usage didn't grow any more.

Thank you, 6by9!

An updated package for testing is available from gstreamer1.0-omx-rpi_1.10.5-2+rpi+patches_armhf.deb
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

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

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 01, 2018 5:01 pm

Thanks to ShiftPlusOne for doing the legwork, the Raspbian gstreamer1.0-omx-rpi package should be updated to include the fixes discussed above.
I've just had

Code: Select all

GST_DEBUG=*:3 gst-launch-1.0 -vvv filesrc location=bbb_sunflower_1080p_30fps_normal.mp4 ! qtdemux ! h264parse ! video/x-h264,alignment=au ! omxh264dec ! videoscale ! video/x-raw,pixelformat=I420,width=1280,height=720 ! omxh264enc control-rate=variable target-bitrate=5000000 ! filesink location=output1.h264
run through to completition without error or significant increase in memory usage, so hopefully it's all good.
Do shout if you still see issues with it.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 01, 2018 5:08 pm

If you run into the issue where omx components aren't found, please post the output of "realpath /etc/xdg/gstomx.conf /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstomx.so"

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 01, 2018 5:49 pm

@ShiftPlusOne

Do you think that you could add the same patch to gstreamer1.0-omx for Jessie (this part of code is exactly the same)? I tried to do it myself using the src package from the Foundation repository and the usual Debian tools but after compilation it just crashes (even without any changes to the source code).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 01, 2018 8:00 pm

In general, we don't touch oldstable packages, but I'll take a quick look tomorrow.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 9:17 am

Give this a go (on jessie)
<snip>
Last edited by ShiftPlusOne on Fri Feb 02, 2018 6:05 pm, edited 1 time in total.
Reason: removed link

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 10:53 am

ShiftPlusOne wrote:
Fri Feb 02, 2018 9:17 am
Give this a go (on jessie)
Throws an error:
(gst-plugin-scanner:28722): GStreamer-WARNING **: Failed to load plugin '/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstomx.so': /opt/vc/lib/libEGL.so: undefined symbol: glDiscardFramebufferEXT
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 11:24 am

I guess it links against the mesa lib instead of brcm one. No sure how collabora had their build system set up, but it it doesn't look like the package builds properly in a normal environment.

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 11:44 am

ShiftPlusOne wrote:
Fri Feb 02, 2018 11:24 am
I guess it links against the mesa lib instead of brcm one. No sure how collabora had their build system set up, but it it doesn't look like the package builds properly in a normal environment.
That seems to be exactly the same problem I ran into when trying to rebuild the package from the source package (from the Foundation repository).
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 11:53 am

Try this one <snip>
(same url)
Last edited by ShiftPlusOne on Fri Feb 02, 2018 6:04 pm, edited 1 time in total.
Reason: Removed link

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 12:09 pm

ShiftPlusOne wrote:
Fri Feb 02, 2018 11:53 am
Try this one
(same url)
Now the pipeline crashes after a short while. Using GST_DEBUG I get the following errors:

0:00:00.101932816 30097 0x171d9c0 ERROR GST_PIPELINE ./grammar.y:690:priv_gst_parse_yyparse: no element "omxh264dec"
0:00:00.102081253 30097 0x171d9c0 ERROR GST_PIPELINE ./grammar.y:775:priv_gst_parse_yyparse: link has no sink [[email protected]]
0:00:00.102151826 30097 0x171d9c0 ERROR GST_PIPELINE ./grammar.y:690:priv_gst_parse_yyparse: no element "omxh264enc"
0:00:00.102201618 30097 0x171d9c0 ERROR GST_PIPELINE ./grammar.y:775:priv_gst_parse_yyparse: link has no source [[email protected](nil)]
0:00:00.102392972 30097 0x171d9c0 ERROR GST_PIPELINE ./grammar.y:775:priv_gst_parse_yyparse: link has no source [[email protected]]

/etc/xdg/gstomx.conf does exist.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 12:48 pm

Then I give up.

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 1:08 pm

ShiftPlusOne wrote:
Fri Feb 02, 2018 12:48 pm
Then I give up.
Thanks for your effort, anyway.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

edtguy
Posts: 2
Joined: Fri Feb 02, 2018 3:13 pm

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 4:01 pm

ShiftPlusOne wrote:
Thu Feb 01, 2018 5:08 pm
If you run into the issue where omx components aren't found, please post the output of "realpath /etc/xdg/gstomx.conf /usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstomx.so"
Output:
/etc/xdg/gstomx-rpi.conf
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstomx-rpi.so

I installed a PiCapture HD1 to the CSI-2 camera interface and plugged the hdmi output from another computer into the hdmi in on the PiCapture. It works with raspivid, but not with the <video> tag in html5. I read that to work with html5, the input needs to be encapsulated, https://random-notes-of-a-sysadmin.blog ... coded.html, which requires gstreamer.

I've been trying to install gstreamer-1.0 with this command: sudo apt-get install gstreamer1.0
After failing to install, I tried sudo apt-get update, sudo apt-get upgrade and sudo rpi-update. After shutting down and restarting, the current result from sudo apt-get install gstreamer1.0 is listed below.
I'm a noob, so I'm not sure if I've done something wrong, or I just need to wait for an updated package.
Cheers,
Ed

Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'gstreamer1.0-videosink' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-alsa' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-ugly-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-ugly-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-base-apps' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-rtsp-dbg' for regex 'gstreamer1.0'
Note, selecting 'libgstreamer1.0-dev' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-tools' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-good' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-qapt' for regex 'gstreamer1.0'
Note, selecting 'libgstreamer1.0-0-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-espeak' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-nice' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-rpi-dbgsym' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-rpi' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-rpi-config' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-videosource' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-crystalhd' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-fluendo-mp3' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-rtsp' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-bad' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-base' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-audiosource' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-gnonlin-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-gnonlin-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-really-bad' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-clutter' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-pulseaudio' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-pocketsphinx' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-bad-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-bad-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-visualization' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-generic' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-lame' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-x' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-generic-dbgsym' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-gnonlin' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-vaapi-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-generic-config' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-libav' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-base-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-good-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-base-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-good-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-dvswitch' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-clutter-3.0' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-vaapi' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-libav-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-packagekit' for regex 'gstreamer1.0'
Note, selecting 'libgstreamer1.0-0' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-dbg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-omx-bellagio-config' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-ffmpeg' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-plugins-ugly' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-doc' for regex 'gstreamer1.0'
Note, selecting 'gstreamer1.0-audiosink' for regex 'gstreamer1.0'
gstreamer1.0-alsa is already the newest version (1.10.4-1).
gstreamer1.0-libav is already the newest version (1.10.4-1).
gstreamer1.0-plugins-bad is already the newest version (1.10.4-1).
gstreamer1.0-plugins-base is already the newest version (1.10.4-1).
gstreamer1.0-plugins-good is already the newest version (1.10.4-1).
gstreamer1.0-x is already the newest version (1.10.4-1).
libgstreamer1.0-0 is already the newest version (1.10.4-1).
libgstreamer1.0-0 set to manually installed.
gstreamer1.0-omx is already the newest version (1.10.4-1+rpt3).
gstreamer1.0-omx-rpi is already the newest version (1.10.4-1+rpt3).
gstreamer1.0-omx-rpi set to manually installed.
gstreamer1.0-omx-rpi-config is already the newest version (1.10.4-1+rpt3).
gstreamer1.0-omx-rpi-config set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
gstreamer1.0-omx-dbg : Depends: gstreamer1.0-omx (= 1.0.0.1-0+rpi12+jessiepmg) but 1.10.4-1+rpt3 is to be installed
E: Unable to correct problems, you have held broken packages.

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Fri Feb 02, 2018 6:04 pm

edtguy wrote:
Fri Feb 02, 2018 4:01 pm
Output:
/etc/xdg/gstomx-rpi.conf
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstomx-rpi.so
And the output of 'apt-cache policy'?

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 08, 2018 11:43 am

I tried to install latest version of gstreamer1.0-omx-rpi, but trying to install gstreamer1.0-omx-rpi-config threw an error:

E: Internal Error, No file name for gstreamer1.0-omx-rpi-config:armhf
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5308
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 08, 2018 1:01 pm

Haven't seen that one before. Starting from the latest raspbian or raspbian lite image, how do I reproduce the problem?

gkreidl
Posts: 5713
Joined: Thu Jan 26, 2012 1:07 pm
Location: Germany

Re: GStreamer and omx encoding from live source.. a naive problem

Thu Feb 08, 2018 5:47 pm

ShiftPlusOne wrote:
Thu Feb 08, 2018 1:01 pm
Haven't seen that one before. Starting from the latest raspbian or raspbian lite image, how do I reproduce the problem?
I used synaptic for installation ( tried it multiple times).
I'll try again tomorrow using apt-get.
Minimal Kiosk Browser (kweb)
Slim, fast webkit browser with support for audio+video+playlists+youtube+pdf+download
Optional fullscreen kiosk mode and command interface for embedded applications
Includes omxplayerGUI, an X front end for omxplayer

Return to “Advanced users”

Who is online

Users browsing this forum: No registered users and 9 guests