1.16: Decklinkvideosrc mode=AUTO results in nvh264enc segfault

John P Poet jppoet at gmail.com
Sun May 12 21:21:19 UTC 2019


If I specify the input mode for decklinkvideosrc then a nvh264enc pipeline
works perfectly.  However, if I specify mode=AUTO, then nvh264enc appears
to segfault.  Both avenc_mpeg2video and x264enc work fine, so it appears to
just be a nvh264enc problem.

gst-launch-1.0 -v decklinkvideosrc device-number=0 mode=0 ! queue !
> autovideoconvert ! queue ! nvh264enc ! h264parse ! queue ! mpegtsmux
> name=mux ! queue ! filesink location=video.ts   decklinkaudiosrc
> device-number=0 ! queue ! audioconvert ! queue ! avenc_ac3 bitrate=480000 !
> ac3parse ! queue ! mux.
>

0:00:00.499837686 15389      0x16b30a0 WARN                   nvenc
gstnvbaseenc.c:1259:gst_nv_base_enc_set_format:<nvh264enc0> error: Failed
to init encoder: 8
0:00:00.499949098 15389      0x16b30a0 WARN            videoencoder
gstvideoencoder.c:685:gst_video_encoder_setcaps:<nvh264enc0> rejected caps
video/x-raw, width=(int)720, height=(int)486,
pixel-aspect-ratio=(fraction)10/11, interlace-mode=(string)interleaved,
framerate=(fraction)30000/1001, field-order=(string)bottom-field-first,
format=(string)I420
Caught SIGSEGV
#0  0x00007f5033326e19 in syscall () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007f5033ca687c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f50343b36e4 in gst_object_get_parent (object=0x1636960)
#3  0x00007f50343b3d44 in gst_object_get_path_string (object=0x1636960)
#4  0x0000000000403ff3 in print_error_message (msg=msg at entry=0x1c99f30)
#5  0x0000000000405180 in event_loop (pipeline=0x16b4100,
#6  0x000000000040391d in main (argc=41, argv=0x7ffc7959fd98)

In this example, the actual input mode is 12 (1080i5994) but nvh264enc seg
faults before decklinkvideosrc has a chance to properly detect that.

I have tried adding parameters such as drop-no-signal-frames and
skip-first-time to decklinkvideosrc, but they do not help.

To see if the nvh264enc cannot handle 720x486, I tried:

diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp
> index a366f3c..503a4e4 100644
> --- a/sys/decklink/gstdecklink.cpp
> +++ b/sys/decklink/gstdecklink.cpp
> @@ -256,7 +256,8 @@ gst_decklink_audio_channels_get_type (void)
>  #define UHD 1, 1, true, "bt2020", TRUE
>
>  static const GstDecklinkMode modes[] = {
> -  {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},     // default is ntsc
> +//  {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},     // default is
> ntsc
> +  {bmdModeHD720p60, 1280, 720, 60, 1, false, HD},
>
>    {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},
>    {bmdModeNTSC2398, 720, 486, 24000, 1001, true, NTSC},
> diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c
> index 42fe7ac..f0c207a 100644
> --- a/sys/nvenc/gstnvbaseenc.c
> +++ b/sys/nvenc/gstnvbaseenc.c
> @@ -1158,8 +1158,8 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc,
> GstVide
>      /* this sets the required buffer size and the maximum allowed size on
>       * subsequent reconfigures */
>      /* FIXME: propertise this */
> -    params->maxEncodeWidth = GST_VIDEO_INFO_WIDTH (info);
> -    params->maxEncodeHeight = GST_VIDEO_INFO_HEIGHT (info);
> +    params->maxEncodeWidth = 3840;
> +    params->maxEncodeHeight = 2160;
>      gst_nv_base_enc_set_max_encode_size (nvenc, params->maxEncodeWidth,
>          params->maxEncodeHeight);
>    } else {
>

But it still segfaults, just in a different place...

I will spend more time trying to figure this out, but I was hoping someone
with more knowledge of those components might offer up a solution?

Thanks,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20190512/185cf936/attachment.html>


More information about the gstreamer-devel mailing list