[TGL] vaapih265enc error while doing encode
ENV:
- Gstreamer: commit 20301a882008dc849abec33d5d29d86441d86cae
- gst-plugins-base: commit a171eb80d6d809e3be3cd0531e499dde3c3a3f33
- gst-plugins-good: commit 8445685a21b7c912595827646ef2900ebc84a100
- gstreamer-vaapi: commit 5fe553f4
Below error on running command TigerLake platform:
#gst-launch-1.0 filesrc location=sunflower_1080p_NV12.yuv ! videoparse width=1920 format=nv12 framerate=30 height=1080 ! vaapih265enc tune=low-power ! video/x-h265, profile=main ! h265parse ! matroskamux ! filesink location=/tmp/low_sgst_h265.mkv
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'vaapiencodeh265-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayGLX)\ vaapidisplayglx0";
Pipeline is PREROLLED ... Setting pipeline to PLAYING ... New clock: GstSystemClock **0:00:12.902268902 15942 0x7f004c0040f0 ERROR vaapiencode gstvaapiencode.c:196:gst_vaapiencode_default_alloc_buffer: invalid GstVaapiCodedBuffer size (0 bytes) ** 0:00:12.902356346 15942 0x7f004c0040f0 ERROR vaapiencode gstvaapiencode.c:303:gst_vaapiencode_push_frame: failed to allocate encoded buffer in system memory
0:00:19.332532224 15942 0x7f004c0040f0 ERROR vaapiencode gstvaapiencode.c:196:gst_vaapiencode_default_alloc_buffer: invalid GstVaapiCodedBuffer size (0 bytes)
0:00:19.332702523 15942 0x7f004c0040f0 ERROR vaapiencode gstvaapiencode.c:303:gst_vaapiencode_push_frame: failed to allocate encoded buffer in system memory
In dmesg: [58620.698034] i915 0000:00:02.0: Resetting vcs1 for preemption time out
[58620.698082] i915 0000:00:02.0: inner_rawvideop[15943] context reset due to GPU hang
[58620.700277] i915 0000:00:02.0: GPU HANG: ecode 12:10:28ffff7d, in inner_rawvideop [15943]
However, if I remove tune=low-power I see different error as below: #gst-launch-1.0 filesrc location=sunflower_1080p_NV12.yuv ! videoparse width=1920 format=nv12 framerate=30 height=1080 ! vaapih265enc ! video/x-h265, profile=main ! h265parse ! matroskamux ! filesink location=/tmp/sgst_h265.mkv
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ... Got context from element 'vaapiencodeh265-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"(GstVaapiDisplayGLX)\ vaapidisplayglx0";
** ERROR:../gst-libs/gst/vaapi/gstvaapiencoder_h265.c:2188:reset_properties: assertion failed: (ret) Aborted (core dumped)