This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

gst-launch fail to load jpegenc codec

Other Parts Discussed in Thread: OMAP-L138, OMAPL138

Hi,

I have OMAP-L138 and I use DVSDK 04.03.00.06.

I have to convert yuv422p files into jpeg, so I run this command:

# gst-launch filesrc location=./capt_frame.yuv ! TIImgenc1 resolution=720x576 iColorSpace=YUV422P oColorSpace=YUV420P qValue=75 ! filesink location=./output.jpg -v --gst-debug-level=1
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
ERROR: from element /GstPipeline:pipeline0/GstTIImgenc1:tiimgenc10: failed to create image encoder: jpegenc

Additional debug info:
gsttiimgenc1.c(1537): gst_tiimgenc1_codec_start (): /GstPipeline:pipeline0/GstTIImgenc1:tiimgenc10
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
Freeing pipeline ...

why it cannot create jpegenc? where am I wrong?

In the <home>/ti-dvsdk_omapl138-evm_04_03_00_06/codecs-omapl138_4_02_00_00/packages/ti/sdo/server/cs/package/info/bin/cs.x674.DataSheet.html (generated at build time) is reported also jpegenc:

best regards

Max

  • More debug info is needed to determine your issue.  I'm not very familiar with gstreamer, but there is more debug info available with a higher gst-debug-level, which you currently have set to 1.  You can set it to a value as high as 5, and the higher the number the more debug info is printed.

    It's possible that setting a higher gstreamer debug level will just indicate that a Codec Engine call failed, perhaps the call to IMGENC1_create().  If this is the case, you can get more detailed information about he Codec Engine failure by setting the environment variable CE_DEBUG:
        $ CE_DEBUG=2 gst-launch ...
    CE_DEBUG can be set from 1-3, with 3 being the most information (but perhaps too much, although one could argue there's never too much debug info).

    Regards,

    - Rob

     

  • OK,

    now I run:

    # CE_DEBUG=3 gst-launch filesrc location=./Minicontrol/capt_frame.yuv ! TIImgenc1 resolution=720x576 iColorSpace=YUV422P oColorSpace=YUV420P qValue=75 ! filesink location=./output.jpg -v --gst-debug-level=2

    I thought that gst-debug-level=2 should be sufficent.

    the output is

    [...]

    [DSP] @0,086,276tk: [+0 T:0xc3415b6c S:0xc3419984] CV - VISA_create(0x0, 'jpegenc', 0xc3506cc0, 0x460, 'ti.sdo.ce.image1.IIMGENC1')
    [DSP] @0,086,335tk: [+0 T:0xc3415b6c S:0xc3419864] CV - VISA_create2(0x0, 'jpegenc', 0xc3506cc0, 0x18, 0x460, 'ti.sdo.ce.image1.IIMGENC1')
    [DSP] @0,086,406tk: [+0 T:0xc3415b6c S:0xc341980c] CE - Engine_open> Enter('local', 0xc341985c, 0x0)
    [DSP] @0,086,454tk: [+0 T:0xc3415b6c S:0xc34197ec] OM - Memory_alloc> Enter(size=0x34)
    [DSP] @0,086,492tk: [+0 T:0xc3415b6c S:0xc34197ec] OM - Memory_alloc> return (0xc341a6b8)
    [DSP] @0,086,546tk: [+4 T:0xc3415b6c S:0xc341980c] CE - Engine_open> engine->server = 0x0
    [DSP] @0,086,586tk: [+0 T:0xc3415b6c S:0xc341980c] CE - Engine_open> return(-1019107656)
    [DSP] @0,086,660tk: [+0 T:0xc3415b6c S:0xc3419844] OM - Memory_alloc> Enter(size=0x34)
    [DSP] @0,086,700tk: [+0 T:0xc3415b6c S:0xc3419844] OM - Memory_alloc> return (0xc341a6f0)
    [DSP] @0,086,745tk: [+0 T:0xc3415b6c S:0xc341981c] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0xc3472a0c, idma3Fxns=0x0, iresFxns=0x0, params=0xc3506cc0, attrs=0xc3419968)
    [DSP] @0,086,819tk: [+0 T:0xc3415b6c S:0xc34197fc] OM - Memory_alloc> Enter(size=0x10)
    [DSP] @0,086,858tk: [+0 T:0xc3415b6c S:0xc34197fc] OM - Memory_alloc> return (0xc341a728)
    [DSP] @0,087,191tk: [+0 T:0xc3415b6c S:0xc341981c] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0xc341a728)
    [DSP] @0,087,244tk: [+5 T:0xc3415b6c S:0xc3419864] CV - VISA_create> local codec created (name='jpegenc', handle=0xc341a728)
    [DSP] @0,087,296tk: [+0 T:0xc3415b6c S:0xc34199bc] ti.sdo.ce.image1.IMGENC1 - IMGENC_create> return (0xc341a6f0)
    [DSP] @0,087,346tk: [+4 T:0xc3415b6c S:0xc341997c] OT - Thread_create > name: "jpegenc#0", pri:  -1, stack size:  17192, stack seg: 0
    [DSP] @0,088,921tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - processRmsCmd(0xc3506ca8, 4056): cmd = 1
    [DSP] @0,090,981tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - processRmsCmd(0xc3506ca8, 4056): cmd = 5
    [DSP] @0,091,027tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - remote time = 0x0, trace buffer size = 4032
    @0,745,132us: [+0 T:0x420e7470 S:0x420e697c] CE - Engine_fwriteTrace> returning count [3097]
    @0,745,291us: [+2 T:0x420e7470 S:0x420e69e4] CE - Engine_createNode> Returning 0x897e0
    @0,745,463us: [+5 T:0x420e7470 S:0x420e6a5c] CV - VISA_create> remote codec created (name='jpegenc', localQueueID=0x10001, remoteQueueID=0x0002)
    @0,745,634us: [+0 T:0x420e7470 S:0x420e6b94] ti.sdo.ce.image1.IMGENC1 - IMGENC_create> return (0xa0fb8)
    @0,745,782us: [+0 T:0x420e7470 S:0x420e6b4c] ti.sdo.ce.image1.IMGENC1 - IMGENC1_control> Enter (handle=0xa0fb8, id=1, dynParams=0x4e180 (size=0x20), status=0x420e6c14 (size=0xa0)
    @0,745,960us: [+4 T:0x420e7470 S:0x420e6b0c] CV - VISA_getMaxMsgSize(0xa0fb8): returning 0x1000
    @0,746,114us: [+5 T:0x420e7470 S:0x420e6b14] CV - VISA_allocMsg> Allocating message for messageId=0x000248ab
    @0,746,257us: [+0 T:0x420e7470 S:0x420e6af4] CV - VISA_call(visa=0xa0fb8, msg=0x4186ac80): messageId=0x000248ab, command=0x1
    @0,746,401us: [+0 T:0x420e7470 S:0x420e6abc] OC - Comm_put> Enter(queue=0x2, msg=0x4186ac80)
    @0,746,612us: [+0 T:0x420e7470 S:0x420e6abc] OC - Comm_put> return (0)
    @0,746,775us: [+0 T:0x420e7470 S:0x420e6ab4] OC - Comm_get> Enter(queue=0x10001, msg=0x420e6b64, timeout=-1)
    @0,747,173us: [+0 T:0x420e7470 S:0x420e6ab4] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @0,747,392us: [+0 T:0x420e7470 S:0x420e6a44] OC - Comm_put> Enter(queue=0x0, msg=0x41869c80)
    @0,747,608us: [+0 T:0x420e7470 S:0x420e6a44] OC - Comm_put> return (0)
    @0,747,842us: [+0 T:0x420e7470 S:0x420e6a3c] OC - Comm_get> Enter(queue=0x10000, msg=0x420e6adc, timeout=-1)
    @0,748,169us: [+0 T:0x420e7470 S:0x420e6a3c] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    [DSP] @0,100,725tk: [+5 T:0xc341ab6c S:0xc341ee5c] CN - NODE> 0xc341a628(jpegenc#0) call(algHandle=0xc341a6f0, msg=0xc3507c80); messageId=0x000248ab
    [DSP] @0,100,801tk: [+0 T:0xc341ab6c S:0xc341ec2c] ti.sdo.ce.image1.IMGENC1 - IMGENC1_control> Enter (handle=0xc341a6f0, id=1, dynParams=0xc3507cb4 (size=0x20), status=0xc3507cd4 (size=0xa0)
    [DSP] @0,100,888tk: [+5 T:0xc341ab6c S:0xc341ec0c] CV - VISA_enter(visa=0xc341a6f0): algHandle = 0xc341a728
    [DSP] @0,100,944tk: [+0 T:0xc341ab6c S:0xc341ebec] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Enter(alg=0xc341a728)
    [DSP] @0,100,997tk: [+0 T:0xc341ab6c S:0xc341ebec] ti.sdo.ce.alg.Algorithm - Algorithm_activate> Exit
    [DSP] @0,101,062tk: [+5 T:0xc341ab6c S:0xc341ec0c] CV - VISA_exit(visa=0xc341a6f0): algHandle = 0xc341a728
    [DSP] @0,101,112tk: [+0 T:0xc341ab6c S:0xc341ebec] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Enter(alg=0xc341a728)
    [DSP] @0,101,165tk: [+0 T:0xc341ab6c S:0xc341ebec] ti.sdo.ce.alg.Algorithm - Algorithm_deactivate> Exit
    [DSP] @0,101,211tk: [+0 T:0xc341ab6c S:0xc341ec2c] ti.sdo.ce.image1.IMGENC1 - IMGENC1_control> Exit (handle=0xc341a6f0, retVal=0xffffffff)
    [DSP] @0,101,273tk: [+5 T:0xc341ab6c S:0xc341ee5c] CN - NODE> returned from call(algHandle=0xc341a6f0, msg=0xc3507c80); messageId=0x000248ab
    [DSP] @0,102,501tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - processRmsCmd(0xc3506ca8, 4056): cmd = 5
    [DSP] @0,102,547tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - remote time = 0x0, trace buffer size = 4032
    @0,749,741us: [+0 T:0x420e7470 S:0x420e6a74] CE - Engine_fwriteTrace> returning count [1478]
    @0,749,897us: [+0 T:0x420e7470 S:0x420e6af4] CV - VISA_call Completed: messageId=0x000248ab, command=0x1, return(status=-1)
    @0,750,060us: [+5 T:0x420e7470 S:0x420e6afc] CV - VISA_freeMsg(0xa0fb8, 0x4186ac80): Freeing message with messageId=0x000248ab
    @0,750,209us: [+0 T:0x420e7470 S:0x420e6b4c] ti.sdo.ce.image1.IMGENC1 - IMGENC1_control> Exit (handle=0xa0fb8, retVal=0xffffffff)
    @0,750,349us: [+7 T:0x420e7470 S:0x420e6bbc] ti.sdo.dmai - [Ienc1] XDM_SETPARAMS failed, status=-1
    @0,750,486us: [+0 T:0x420e7470 S:0x420e6bac] ti.sdo.ce.image1.IMGENC1 - IMGENC1_delete> Enter (handle=0xa0fb8)
    @0,750,619us: [+0 T:0x420e7470 S:0x420e6b84] CV - VISA_delete(0xa0fb8)
    @0,750,743us: [+5 T:0x420e7470 S:0x420e6b84] CV - VISA_delete> deleting codec (localQueue=0x10001, remoteQueue=0x2)
    @0,750,882us: [+0 T:0x420e7470 S:0x420e6b5c] CE - Engine_ctrlNode(0x897e0, 0xa0ff0, 0x0)
    @0,751,020us: [+0 T:0x420e7470 S:0x420e6b3c] OC - Comm_put> Enter(queue=0x2, msg=0x4186ac80)
    @0,751,224us: [+0 T:0x420e7470 S:0x420e6b3c] OC - Comm_put> return (0)
    @0,751,574us: [+0 T:0x420e7470 S:0x420e6b34] OC - Comm_get> Enter(queue=0x10001, msg=0xa0ff0, timeout=-1)
    @0,751,944us: [+0 T:0x420e7470 S:0x420e6b34] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @0,752,142us: [+0 T:0x420e7470 S:0x420e6b5c] CE - Engine_ctrlNode> Returning 0x0
    @0,752,313us: [+0 T:0x420e7470 S:0x420e6b3c] CE - Engine_deleteNode(0x897e0)
    @0,752,459us: [+0 T:0x420e7470 S:0x420e6b1c] OC - Comm_put> Enter(queue=0x0, msg=0x41869c80)
    @0,752,672us: [+0 T:0x420e7470 S:0x420e6b1c] OC - Comm_put> return (0)
    @0,752,829us: [+0 T:0x420e7470 S:0x420e6b14] OC - Comm_get> Enter(queue=0x10000, msg=0x420e6b94, timeout=-1)
    @0,753,770us: [+0 T:0x420e7470 S:0x420e6b14] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    @0,754,008us: [+5 T:0x420e7470 S:0x420e6b3c] CE - Engine_deleteNode(0x897e0): algName = jpegenc, algHandle = 0xc341a6f0, stack size = 17192, stack used = 871(6%)
    @0,754,192us: [+0 T:0x420e7470 S:0x420e6b14] OC - Comm_delete> Enter (comm=0x89748)
    @0,755,064us: [+0 T:0x420e7470 S:0x420e6af4] OM - Memory_free> Enter(0x89748, 0x4)
    @0,755,305us: [+0 T:0x420e7470 S:0x420e6af4] OM - Memory_free> return (0x1)
    @0,755,459us: [+0 T:0x420e7470 S:0x420e6b34] OC - Comm_delete> return
    @0,755,597us: [+0 T:0x420e7470 S:0x420e6b1c] OM - Memory_free> Enter(0x897e0, 0x20)
    @0,755,738us: [+0 T:0x420e7470 S:0x420e6b1c] OM - Memory_free> return (0x1)
    @0,755,872us: [+0 T:0x420e7470 S:0x420e6b74] OC - Comm_free> Enter (msg=0x4186ac80)
    @0,756,056us: [+0 T:0x420e7470 S:0x420e6b74] OC - Comm_free> return (0)
    @0,756,210us: [+0 T:0x420e7470 S:0x420e6b64] OM - Memory_free> Enter(0xa0ff0, 0x4)
    @0,756,352us: [+0 T:0x420e7470 S:0x420e6b64] OM - Memory_free> return (0x1)
    @0,756,485us: [+0 T:0x420e7470 S:0x420e6b64] OM - Memory_free> Enter(0xa0fb8, 0x34)
    @0,756,624us: [+0 T:0x420e7470 S:0x420e6b64] OM - Memory_free> return (0x1)
    @0,756,755us: [+0 T:0x420e7470 S:0x420e6bbc] ti.sdo.ce.image1.IMGENC1 - IMGENC1_delete> return
    0:00:01.202933525   998    0x9dd80 WARN               TIImgenc1 gsttiimgenc1.c:1537:gst_tiimgenc1_codec_start:<tiimgenc10> error: failed to create image encoder: jpegenc
    0:00:01.204664049   998    0x9dd80 WARN               TIImgenc1 gsttiimgenc1.c:1636:gst_tiimgenc1_encode_thread:<tiimgenc10> error: failed to start codec
    ERROR: from element /GstPipeline:pipeline0/GstTIImgenc1:tiimgenc10: failed to create image encoder: jpegenc
    0:00:01.207663716   998    0x3df50 WARN               TIImgenc1 gsttiimgenc1.c:1359:gst_tiimgenc1_init_image:<tiimgenc10> error: encode thread failed to create circbuf or display buffer handles
    0:00:01.208940608   998    0x3df50 WARN               TIImgenc1 gsttiimgenc1.c:953:gst_tiimgenc1_chain:<tiimgenc10> error: unable to initialize image
    Additional debug info:
    gsttiimgenc1.c(1537): gst_tiimgenc1_codec_start (): /GstPipeline:pipeline0/GstTIImgenc1:tiimgenc10
    ERROR: pipeline doesn't want to preroll.
    Setting pipeline to NULL ...
    @0,768,319us: [+0 T:0x420e7470 S:0x420e6c54] CE - Engine_close(0x4dcc8)
    @0,768,555us: [+0 T:0x420e7470 S:0x420e6bbc] OC - Comm_put> Enter(queue=0x0, msg=0x41869c80)
    @0,768,790us: [+0 T:0x420e7470 S:0x420e6bbc] OC - Comm_put> return (0)
    @0,769,039us: [+0 T:0x420e7470 S:0x420e6bb4] OC - Comm_get> Enter(queue=0x10000, msg=0x420e6c54, timeout=-1)
    @0,769,393us: [+0 T:0x420e7470 S:0x420e6bb4] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
    [DSP] @0,108,977tk: [+0 T:0xc341ab6c S:0xc341ee5c] CN - NODE_EXECFXN(0xc341a628): jpegenc#0 exiting per request ...
    [DSP] @0,111,521tk: [+0 T:0xc3415b6c S:0xc3419b2c] CR - processRmsCmd(0xc3506ca8, 4056): cmd = 2
    [DSP] @0,112,041tk: [+0 T:0xc3415b6c S:0xc3419aec] CN - NODE_delete(0xc341a628): jpegenc#0
    [DSP] @0,112,098tk: [+0 T:0xc3415b6c S:0xc3419acc] ti.sdo.ce.image1.IMGENC1 - IMGENC1_delete> Enter (handle=0xc341a6f0)
    [DSP] @0,112,149tk: [+0 T:0xc3415b6c S:0xc3419a9c] CV - VISA_delete(0xc341a6f0)
    [DSP] @0,112,188tk: [+5 T:0xc3415b6c S:0xc3419a9c] CV - VISA_delete> deleting codec (localQueue=0xffff, remoteQueue=0xffff)
    [DSP] @0,112,239tk: [+5 T:0xc3415b6c S:0xc3419a9c] CV - VISA_delete> deleting codec 0xc341a728
    [DSP] @0,112,287tk: [+0 T:0xc3415b6c S:0xc3419a7c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Enter(alg=0xc341a728)
    [DSP] @0,112,364tk: [+0 T:0xc3415b6c S:0xc3419a4c] OM - Memory_free> Enter(addr=0xc341a728, size=16)
    [DSP] @0,112,412tk: [+0 T:0xc3415b6c S:0xc3419a4c] OM - Memory_free> return (0x1)
    [DSP] @0,112,449tk: [+0 T:0xc3415b6c S:0xc3419a7c] ti.sdo.ce.alg.Algorithm - Algorithm_delete> Exit
    [DSP] @0,112,492tk: [+0 T:0xc3415b6c S:0xc3419a6c] OM - Memory_free> Enter(addr=0xc341a6f0, size=52)
    [DSP] @0,112,538tk: [+0 T:0xc3415b6c S:0xc3419a6c] OM - Memory_free> return (0x1)
    [DSP] @0,112,576tk: [+0 T:0xc3415b6c S:0xc3419acc] ti.sdo.ce.image1.IMGENC1 - IMGENC1_delete> return
    [DSP] @0,112,620tk: [+0 T:0xc3415b6c S:0xc3419ab4] OM - Memory_free> Enter(addr=0xc341a648, size=36)
    [DSP] @0,112,668tk: [+0 T:0xc3415b6c S:0xc3419ab4] OM - Memory_free> return (0x1)
    [DSP] @0,112,704tk: [+0 T:0xc3415b6c S:0xc3419abc] OM - Memory_free> Enter(addr=0xc341a628, size=32)
    [DSP] @0,112,750tk: [+0 T:0xc3415b6c S:0xc3419abc] OM - Memory_free> return (0x1)
    [DSP] @0,112,787tk: [+0 T:0xc3415b6c S:0xc3419ae4] OM - Memory_free> Enter(addr=0xc341a618, size=10)
    [DSP] @0,112,841tk: [+0 T:0xc3415b6c S:0xc3419ae4] OM - Memory_free> return (0x1)
    [DSP] @0,112,878tk: [+0 T:0xc3415b6c S:0xc3419ae4] OM - Memory_free> Enter(addr=0xc341a600, size=24)
    [DSP] @0,112,924tk: [+0 T:0xc3415b6c S:0xc3419ae4] OM - Memory_free> return (0x1)

    [...]

    I attach a file containing whole trace messages

    I hope this can help

    best regards

    Max

  • I tried do run /usr/share/ti/ti-dmai-apps/image_encode_io1_omapl138.x470MV in two different ways:

    /usr/share/ti/ti-dmai-apps# ./image_encode_io1_omapl138.x470MV -c jpegenc -e encode -i ./capt_frame.yuv422p -o output.jpg -r 720x576 --iColorSpace 1 --oColorSpace 1
    Starting application...
    Using output color format YUV422P
    Using input color format YUV422P
    Reading input...
    Read 422P frame size 829440 (720x576) from file
    Encoding image...
    Encode done
    Wrote encoded image of size 73881 to file
    End of application.
    /usr/share/ti/ti-dmai-apps# ./image_encode_io1_omapl138.x470MV -c jpegenc -e encode -i ./capt_frame.yuv422p -o output.jpg -r 720x576 --iColorSpace 1 --oColorSpace 2
    Starting application...
    Using output color format YUV420P
    Using input color format YUV422P
    Failed to create image encoder: jpegenc
    End of application.

    the input file is a yuv422p, and I try to produce a jpeg yuv422p and yuv420p, and only yuv422p works!

    Conversely tring to generate yuv420p the error is the same given by gst-launch.

    I have also another file that is yuv422i (I think uyvy format?), I tried to output some formats and I can summarize the results in a table

    input
    yuv422p yuv422i
    output yuv422p OK OK
    yuv420p NO OK
    yuv422i (uyvy) NO NO
    yuv444p NO NO
    gray OK OK

    It seems that depends on input and output formats.

    but in the jpegenc datasheet there is no table that describes the compatibility with other input files types.

    maybe this post should be moved in "Multimedia Software Codecs forum"

    best regards

    Max

  • I agree, feels like a codec question at this point.  I'll move this to the Codec forum.

    Chris

  • The support for input and o/p color format would be written in the userguide.

     

    regards

    yashwant