<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>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.<br></div><div dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">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.</div></blockquote><div dir="ltr"><br></div><div dir="ltr">0:00:00.499837686 15389      0x16b30a0 WARN                   nvenc gstnvbaseenc.c:1259:gst_nv_base_enc_set_format:<nvh264enc0> error: Failed to init encoder: 8<br>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<br>Caught SIGSEGV<br>#0  0x00007f5033326e19 in syscall () from /lib/x86_64-linux-gnu/libc.so.6<br>#1  0x00007f5033ca687c in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0<br>#2  0x00007f50343b36e4 in gst_object_get_parent (object=0x1636960)<br>#3  0x00007f50343b3d44 in gst_object_get_path_string (object=0x1636960)<br>#4  0x0000000000403ff3 in print_error_message (msg=msg@entry=0x1c99f30)<br>#5  0x0000000000405180 in event_loop (pipeline=0x16b4100, <br>#6  0x000000000040391d in main (argc=41, argv=0x7ffc7959fd98)<br></div><div dir="ltr"><br></div><div>In this example, the actual input mode is 12 (1080i5994) but nvh264enc seg faults before decklinkvideosrc has a chance to properly detect that.<br></div><div><br></div><div>I have tried adding parameters such as drop-no-signal-frames and skip-first-time to decklinkvideosrc, but they do not help.</div><div><br></div><div>To see if the nvh264enc cannot handle 720x486, I tried:</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">diff --git a/sys/decklink/gstdecklink.cpp b/sys/decklink/gstdecklink.cpp<br>index a366f3c..503a4e4 100644<br>--- a/sys/decklink/gstdecklink.cpp<br>+++ b/sys/decklink/gstdecklink.cpp<br>@@ -256,7 +256,8 @@ gst_decklink_audio_channels_get_type (void)<br> #define UHD 1, 1, true, "bt2020", TRUE<br> <br> static const GstDecklinkMode modes[] = {<br>-  {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},     // default is ntsc<br>+//  {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},     // default is ntsc<br>+  {bmdModeHD720p60, 1280, 720, 60, 1, false, HD},<br> <br>   {bmdModeNTSC, 720, 486, 30000, 1001, true, NTSC},<br>   {bmdModeNTSC2398, 720, 486, 24000, 1001, true, NTSC},<br>diff --git a/sys/nvenc/gstnvbaseenc.c b/sys/nvenc/gstnvbaseenc.c<br>index 42fe7ac..f0c207a 100644<br>--- a/sys/nvenc/gstnvbaseenc.c<br>+++ b/sys/nvenc/gstnvbaseenc.c<br>@@ -1158,8 +1158,8 @@ gst_nv_base_enc_set_format (GstVideoEncoder * enc, GstVide<br>     /* this sets the required buffer size and the maximum allowed size on<br>      * subsequent reconfigures */<br>     /* FIXME: propertise this */<br>-    params->maxEncodeWidth = GST_VIDEO_INFO_WIDTH (info);<br>-    params->maxEncodeHeight = GST_VIDEO_INFO_HEIGHT (info);<br>+    params->maxEncodeWidth = 3840;<br>+    params->maxEncodeHeight = 2160;<br>     gst_nv_base_enc_set_max_encode_size (nvenc, params->maxEncodeWidth,<br>         params->maxEncodeHeight);<br>   } else {<br></blockquote><br></div><div>But it still segfaults, just in a different place...</div><div><br></div><div>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?<br></div><div><br></div><div>Thanks,</div><div><br></div><div>John<br></div></div></div></div></div></div></div></div>