Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • gstreamer-vaapi gstreamer-vaapi
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 143
    • Issues 143
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 11
    • Merge requests 11
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GStreamer
  • gstreamer-vaapigstreamer-vaapi
  • Issues
  • #183

Closed
Open
Created Jul 17, 2019 by RohanKurane@RohanKurane

Using vaapih264enc results in Segfault in libgstvideo.so

Hello, I am new to gstreamer and struggling with it a bit. I collect video frames in RGB format. I then try to stream it in NV12 format by using a videoconverter pad below.

I have the following pipeline -

           snprintf( str_pipeline, sizeof( str_pipeline ), "appsrc name=mysource ! videoconvert ! " "video/x-raw,width=1920,height=1080,format=NV12,framerate=60/1 ! vaapih264enc ! h264parse ! rtph264pay ! " "udpsink host=%s port=5600", "xx.xx.xx.xx");

When I attempt to stream video using it, it results in a segfault in libgstvideo. Here is the segfault

    Jun 20 21:55:19 intel-aero kernel: [ 1775.776487] mysource:src[5300]: segfault at 7eff89d65010 ip 00007eff89a5be63 sp 00007eff4c885428 error 4 in libgstvideo-1.0.so.0.803.0[7eff89a47000+7c000]

And here is the stack -

   Thread 79 "mysource:src" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7efd77a3f700 (LWP 5515)]
0x00007efe455d4e63 in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
(gdb) bt
#0  0x00007efe455d4e63 in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#1  0x00007efe455dfc33 in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#2  0x00007efe455dfdba in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#3  0x00007efe455e05c4 in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#4  0x00007efe455dfdba in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#5  0x00007efe455e0d2e in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#6  0x00007efe455dfdba in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#7  0x00007efe455e005b in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#8  0x00007efe45848509 in ?? () from /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstvideoconvert.so
#9  0x00007efe455ee21e in ?? () from /usr/lib/x86_64-linux-gnu/libgstvideo-1.0.so.0
#10 0x00007efe48483ba5 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#11 0x00007efe48483446 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#12 0x00007efe496ec59f in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#13 0x00007efe496f4543 in gst_pad_push () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#14 0x00007efe4847ee55 in ?? () from /usr/lib/x86_64-linux-gnu/libgstbase-1.0.so.0
#15 0x00007efe4971ef31 in ?? () from /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0
#16 0x00007efe487235ee in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007efe48722c55 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007efe51f776ba in start_thread (arg=0x7efd77a3f700) at pthread_create.c:333
#19 0x00007efe50a2541d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Is there any GST_DEBUG I can get that may help you guys to figure the issue ?

To avoid converting video, I tried to stream in the RGB format just as the video was gotten in.

            snprintf( str_pipeline, sizeof( str_pipeline ), "appsrc name=mysource ! " "video/x-raw,width=640,height=480,format=RGB,framerate=60/1 ! vaapipostproc ! " "udpsink host=%s port=5600", "xx.xx.xx.xx");

This showed me errors in the GST_DEBUG_FILE saying the pads were not compatible sometimes. So no video appeared.

Can someone please help me here with what the correct pipeline should be if I want to collect video in RGB format and also display it in RGB format ? Also what should the app_caps be. Here is mine at the moment -

             app_caps = gst_caps_new_simple( "video/x-raw", "format", G_TYPE_STRING, "RGB", "width", G_TYPE_INT, 640, "height", G_TYPE_INT, 480, "framerate", GST_TYPE_FRACTION, 60, 1, NULL );

What kind of GST_DEBUG should I set so it would be useful to debug the error with libgstvideo (for NV12 format) as well as for the RGB format streaming ?

Thanks Rohan

Edited Jul 17, 2019 by RohanKurane
Assignee
Assign to
Time tracking