Error while trying to encode jpeg image in appsrc deepstream

Hello,
I’m trying to create a deepstream pipeline in order to encode a set of images into a video using nvidia hardware acceleration using nvjpegdec and nvv4l2h265enc. The pipeline I’ve built is the following one: appsrc block=true name=“pipeline_name.mkv" caps="image/jpeg,width=1152,height=648" ! nvjpegdec ! nvv4l2h265enc bitrate=2000000 ! h265parse ! matroskamux ! filesink location=“”folder/pipeline_name.mkv"".
When running it I got the following error:

0:00:00.162009920 352925 0xffff8c7b2360 ERROR              videometa gstvideometa.c:240:default_map: plane 0, no memory at offset 0
0:00:00.162020672 352925 0xffff8c7b2360 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:00.162035456 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4155:_gst_video_decoder_error:<nvjpegdec1> error: Failed to decode JPEG image
0:00:00.162042912 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4157:_gst_video_decoder_error:<nvjpegdec1> error: Buffer allocation failed, reason: ok
                                                                                                                                                                                                                  0:00:00.162144353 352925 0xffff8c7b2360 ERROR              videometa gstvideometa.c:240:default_map: plane 0, no memory at offset 0
0:00:00.162153569 352925 0xffff8c7b2360 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:00.162162497 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4155:_gst_video_decoder_error:<nvjpegdec1> error: Failed to decode JPEG image
0:00:00.162168097 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4157:_gst_video_decoder_error:<nvjpegdec1> error: Buffer allocation failed, reason: ok
                                                                                                                                                                                                                  0:00:00.162330723 352925 0xffff8c7b2360 ERROR              videometa gstvideometa.c:240:default_map: plane 0, no memory at offset 0
0:00:00.162339395 352925 0xffff8c7b2360 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:00.162347683 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4155:_gst_video_decoder_error:<nvjpegdec1> error: Failed to decode JPEG image
0:00:00.162353251 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4157:_gst_video_decoder_error:<nvjpegdec1> error: Buffer allocation failed, reason: ok
                                                                                                                                                                                                                   0:00:00.162415652 352925 0xffff8c7b2360 ERROR              videometa gstvideometa.c:240:default_map: plane 0, no memory at offset 0
0:00:00.162424612 352925 0xffff8c7b2360 ERROR                default video-frame.c:168:gst_video_frame_map_id: failed to map video frame plane 0
0:00:00.162431460 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4155:_gst_video_decoder_error:<nvjpegdec1> error: Failed to decode JPEG image
0:00:00.162437412 352925 0xffff8c7b2360 WARN            videodecoder gstvideodecoder.c:4157:_gst_video_decoder_error:<nvjpegdec1> error: Buffer allocation failed, reason: ok

Any idea about what is causing this error and eventually how to solve it?

Please provide complete information as applicable to your setup.
• Hardware Platform (Jetson / GPU)
• DeepStream Version
• JetPack Version (valid for Jetson only)
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)
• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)
• The pipeline being used

NVIDIA NVIDIA Jetson AGX Orin - AVerMedia D315
L4T 35.1.0 [ JetPack 5.0.2 ]
Ubuntu 20.04.4 LTS
Kernel Version: 5.10.104-tegra
CUDA 11.4.239
CUDA Architecture: 8.7
OpenCV version: 4.5.4
OpenCV Cuda: NO
CUDNN: 8.4.1.50
TensorRT: 8.4.1.5
Vision Works: NOT_INSTALLED
VPI: 2.1.6
Vulcan: 1.3.203
GStreamer 1.16.3

I already provided the pipeline being used with the output log

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

Can the following command line work fine ?

 gst-launch-1.0 uridecodebin uri=file://"your video path" ! nvvideoconvert ! video/x-raw"(memory:NVMM)",format=NV12 !  nvv4l2h265enc bitrate=2000000 ! h265parse ! matroskamux ! filesink location="folder/pipeline_name.mkv"

If ok, you can check the appsrc whether give the right input.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.