I have this pipeline for the Elgato Camlink 4K USB3 Stöpsel:
DEBUG=2
VIDEO_DEVICE=0
FORMAT=NV12
WIDTH=3840
HEIGHT=2160
FRAMERATE=25
TARGET=a.mp4
BITRATE=12000000
echo ""
export GST_DEBUG=$DEBUG
record() {
gst-launch-1.0 -v -e \
v4l2src device=/dev/video${VIDEO_DEVICE} num-buffers=1000 \
! video/x-raw, format=${FORMAT}, width=${WIDTH}, height=${HEIGHT}, framerate=${FRAMERATE}/1 \
! nvvidconv \
! 'video/x-raw(memory:NVMM)', format=NV12 \
! nvv4l2h264enc bitrate=${BITRATE} maxperf-enable=1 \
! h264parse \
! qtmux \
! filesink location=${TARGET}
}
That works for some seconds. A file will be written - but the pipeline breaks after a random duration between one and 30 seconds.
NvMMLiteBlockCreate : Block : BlockType = 4
0:00:00.183627244 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:962:gst_v4l2_buffer_pool_start:<nvv4l2h264enc0:pool:src> Uncertain or not enough buffers, enabling copy threshold
/GstPipeline:pipeline0/nvv4l2h264enc:nvv4l2h264enc0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, interlace-mode=(string)progressive, format=(string)NV12
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)3840, height=(int)2160, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:6:5:1, interlace-mode=(string)progressive
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)3840, height=(int)2160, framerate=(fraction)25/1, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)2:6:5:1, interlace-mode=(string)progressive
0:00:00.203892006 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:790:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
H264: Profile = 66, Level = 0
0:00:00.788079568 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.788132173 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.788291707 10186 0x5560a47c50 WARN v4l2src gstv4l2src.c:976:gst_v4l2src_create:<v4l2src0> lost frames detected: count = 1 - ts: 0:00:00.577089787
0:00:00.810397952 10186 0x7f8c0032d0 WARN v4l2bufferpool gstv4l2bufferpool.c:1538:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:src> Driver should never set v4l2_buffer.field to ANY
/GstPipeline:pipeline0/GstH264Parse:h264parse0.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, level=(string)5.1, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt2020, chroma-site=(string)mpeg2, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01424033ffe1000b67424033965401e0021f2001000468ce3c80
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstQTMuxPad:video_0: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, profile=(string)constrained-baseline, level=(string)5.1, width=(int)3840, height=(int)2160, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)25/1, interlace-mode=(string)progressive, colorimetry=(string)bt2020, chroma-site=(string)mpeg2, chroma-format=(string)4:2:0, bit-depth-luma=(uint)8, bit-depth-chroma=(uint)8, parsed=(boolean)true, codec_data=(buffer)01424033ffe1000b67424033965401e0021f2001000468ce3c80
/GstPipeline:pipeline0/GstQTMux:qtmux0.GstPad:src: caps = video/quicktime, variant=(string)apple
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)apple
0:00:00.835555855 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.835614970 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.849919232 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.850005535 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.867397548 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.867446351 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
0:00:00.886069110 10186 0x5560a47c50 WARN v4l2bufferpool gstv4l2bufferpool.c:1483:gst_v4l2_buffer_pool_dqbuf:<nvv4l2h264enc0:pool:sink> V4L2 provided buffer has bytesused 0 which is too small to include data_offset 0
… then the last error row firing rapitily until it breaks…
Any Idea? I tested the num-buffers
between 100
to 2000
- nothing. same.