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.

DM365 DVSDK 4 Encode Demo Error

Other Parts Discussed in Thread: TVP7002

Hello,

I have found some posts similar to my issue, but I haven't been able to resolve my issue based on the answers found in other posts.  I have the dm365 evm set up with the latest DVSDK (4.0) and I am having some issues running the encode demo.  I have a camera hooked up to the composite input and when I run the encode demo, it seems to print some messages like:


EVM: switch to tvp7002 HD video input
... [omitted]
tvp7002 1-005c: querystd, errorxxx, val =1, val1 = 1
Error: Failed to create capture device
encode: linux/Fifo.c:177: Fifo_put: Assertion 'ptr' failed.
Aborted

From the messages, it seems like the encode demo is trying to operate on the component input and not the composite input.  Is that accurate?  If so, how do I get the encode demo to run on the composite input?  Is there a different set of kernel command line parameters that I need to pass in via uboot?

As far as I know, I followed the steps in the user guide correctly and have everything set up correctly.

Any help would be greatly appreciated!

  • Hi Randy,

    Out-of-box, when launching the encode demo from the Matrix application launcher, the demo is configured to use the component input. This is why in the quick start guide that comes with DVSDK 4.0 the user is instructed to hook up the component input. 

    If you wish to use the composite input, you would need to manually launch the demo from the command line, by passing -y1 (and/or -I1 if you are using DVSDK 4.01) as command line parameter to select composite NTSC. No need to change the kernel bootargs. As described in the Software Developers' Guide, you can check out the encode.txt file to find out all the options that are available to the demo. Alternatively, if you run

    ./encode -h

    the help text that appears would also explain the different options available.

    Hope this helps!

    Vincent

     

     

  • Vincent,

    Thanks for the quick reply!  I was afraid you might say that I needed to pass -y1 into the encode application, because I've already tried that and it was unsuccessful.  Here is the output from the encode command:


    target#: ./encode -v test.mpeg4 -k -y1 -t 20

    Encode demo started.
    vpfe-capture vpfe-capture: IPIPE Chained
    vpfe-capture vpfe-capture: Resizer present
    EVM: switch to tp5416 SD video input
    Error: Failed to detect video standard, video input connected?
    Error: Failed to create video encoder: mpeg4enc

    From reading other posts, it seems like the most common error here is that the camera is hooked up improperly.  Are there any other reasons why I would get these errors?

    Thanks!

  • Hi Randy,

    The demo should have worked if the input source was connected and powered on. Do you have other composite input sources you can try (e.g. DVD player)? Also, I am assuming that the demo worked fine out-of-box for you with component input, and that you haven't changed the bootargs from what the setup.sh script has configured for you. Is this the case? If not, you might want to re-run the setup.sh script so that the right bootargs are configured for you.

    If none of the above works, could you post the dump by prepending DMAI_DEBUG=2 to the demo command line? Also post your kernel bootargs (you can get them by running cat /proc/cmdline)

    Best regards,

    Vincent

  • Hi Vincent,

    Thanks again for the quick reply.  Well, it turns out that the camera that I had hooked up was malfunctioning for some reason, and using a different camera fixed the problem.

    Thank you very much for the tips!

    -Randy

  • Hi,

    I have the same issue here, trying to use the "encode" demo.
    I have a camera (sony HDR-CX115E) as YUV source and set the video input to COMPONENT :

    ./encode -I 3 -v /home/root/output_cap_720P.264

    When launching gstreamer with v4l2src it works well, and gets the frames as YUV frames so the input is ok.
    I launched the same line with DMAI_DEBUG=2 :

    $> DMAI_DEBUG=2 ./encode -I 3 -v /home/root/output_cap_720P.264
    Encode demo started.
    @0x0009ae7a:[T:0x4001f070] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected ch
    ange to DMAI tracing behavior.
    @0x000b3118:[T:0x4001f070] ti.sdo.dmai - [Display] Found width=720 height=576, yres_virtual=576,xres_virtual=720, line_length=384
    @0x000b32bc:[T:0x4001f070] ti.sdo.dmai - [Display] Setting width=720 height=576, yres_virtual=576, xres_virtual=720
    @0x000b3390:[T:0x4001f070] ti.sdo.dmai - [Display] New width=720, height=576, yres_virtual=576,xres_virtual=720, line_length=384
    @0x000b3465:[T:0x4001f070] ti.sdo.dmai - [BufTab] Allocating BufTab for 1 buffers
    @0x000b35ce:[T:0x4001f070] ti.sdo.dmai - [Buffer] Set user pointer 0x40309000 (physical 0x81200000)
    @0x000b3a99:[T:0x4001f070] ti.sdo.dmai - [Display] Display buffer 0 mapped to 0x40309000 has physical address 0xc550
    @0x000b8556:[T:0x40b3e490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
    @0x000b873d:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40b3f000 (0x83c00000 phys)
    @0x000b892e:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40c91000 (0x83d52000 phys)
    @0x000b8b17:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40de3000 (0x83ea4000 phys)
    @0x000b8be5:[T:0x40b3e490] ti.sdo.dmai - [BufTab] Allocating BufTab for 4 buffers
    @0x000b8dc3:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x40f35000 (0x83ff6000 phys)
    @0x000b8f92:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x41087000 (0x84148000 phys)
    @0x000b9181:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x411d9000 (0x84davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:0:
    1:124
    29a000 phys)
    @0vpfe-capture vpfe-capture: IPIPE Chained
    x000b9392:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4132b000 (0x84vpfe-capture vpfe-capture: Resizer present
    3ec000 phys)
    @0Leopard: switch to tvp7002 HD video input
    x000b98f6:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Creating encoder vpfe-capture vpfe-capture: width = 1280, height = 720, bpp = 1
    h264enc for max vpfe-capture vpfe-capture: adjusted width = 1280, height = 720, bpp = 1, bytesperline = 1280, sizeimage = 1382400
    1280x720 bitratevpfe-capture vpfe-capture: width = 1280, height = 720, bpp = 1
     2000000 ratectrvpfe-capture vpfe-capture: adjusted width = 1280, height = 720, bpp = 1, bytesperline = 1280, sizeimage = 1382400
    l 4
    @0x000d206e:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Setting dynParams size 1280x720 bitrate 2000000
    @0x000d22ef:[T:0x41c7c490] ti.sdo.dmai - [Venc1] Made XDM_SETPARAMS control call
    @0x000d2a28:[T:0x40b3e490] ti.sdo.dmai - [Resize] Successfully set mode to continuous in resizer
    @0x000d42aa:[T:0x40b3e490] ti.sdo.dmai - [Resize] Resizer initialized
    @0x000d43cd:[T:0x40b3e490] ti.sdo.dmai - [Resize] Operating mode changed successfully to continuous in previewer
    @0x000d4497:[T:0x40b3e490] ti.sdo.dmai - [Resize] Previewer initialized
    @0x000d5c2e:[T:0x42ad3490] ti.sdo.dmai - [BufTab] Allocating BufTab for 10 buffers
    @0x000d5e74:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42ad4000 (0x84940000 phys)
    @0x000d6072:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42c26000 (0x84a92000 phys)
    @0x000d62b0:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42d78000 (0x84be4000 phys)
    @0x000d64d2:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x42eca000 (0x84d36000 phys)
    @0x000d66fa:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4301c000 (0x84e88000 phys)
    @0x000d691d:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x4316e000 (0x84fda000 phys)
    @0x000d6b5d:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x432c0000 (0x8512c000 phys)
    @0x000d6d7f:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x43412000 (0x8527e000 phys)
    @0x000d6fa4:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x43564000 (0x853d0000 phys)
    @0x000d71e5:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 1382400 at 0x436b6000 (0x85522000 phys)
    @0x000d8a67:[T:0x40b3e490] ti.sdo.dmai - [Capture] Component input selected
    @0x000d9af1:[T:0x40b3e490] ti.sdo.dmai - [Capture] Setting video standard to: 9
    @0x000da888:[T:0x40b3e490] ti.sdo.dmai - [Capture] Capture input set to Component:9
    @0x000da945:[T:0x40b3e490] ti.sdo.dmai - [Capture] Forcing user specified video standard
    @0x000da9ce:[T:0x40b3e490] ti.sdo.dmai - [Capture] Capture dimention is set to 1280x720
    @0x000e4143:[T:0x40b3e490] ti.sdo.dmai - [Capture] Video input connected size 1280x720 pitch 1280
    @0x000e4203:[T:0x40b3e490] ti.sdo.dmai - [Capture] Setting capture frame rate to half.
    @0x00112dff:[T:0x40b3e490] ti.sdo.dmai - [Capture] Video standard set to 00, required is 720P_60
    Error: Failed to create capture device. Is video input connected?
    @0x00119810:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42ad4000 (0x84940000 phys)
    @0x0011a3a0:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42c26000 (0x84a92000 phys)
    @0x0011aeea:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42d78000 (0x84be4000 phys)
    @0x0011ba31:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x42eca000 (0x84d36000 phys)
    @0x0011c600:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4301c000 (0x84e88000 phys)
    @0x0011d127:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4316e000 (0x84fda000 phys)
    @0x0011dc48:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x432c0000 (0x8512c000 phys)
    @0x0011e820:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x43412000 (0x8527e000 phys)
    @0x0011f33c:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x43564000 (0x853d0000 phys)
    @0x0011fe63:[T:0x42ad3490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x436b6000 (0x85522000 phys)
    @0x00120cb5:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40b3f000 (0x83c00000 phys)
    @0x001217eb:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40c91000 (0x83d52000 phys)
    @0x001222f9:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40de3000 (0x83ea4000 phys)
    @0x00122e2a:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x40f35000 (0x83ff6000 phys)
    @0x001239df:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x41087000 (0x84148000 phys)
    @0x001244e1:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x411d9000 (0x8429a000 phys)
    @0x00125010:[T:0x40b3e490] ti.sdo.dmai - [Buffer] Free Buffer of size 1382400 at 0x4132b000 (0x843ec000 phys)

    Here is my cmdline :
    console=ttyS0,115200n8 rw dm365_imp.oper_mode=0 video=davincifb:vid0=OFF:vid1=OFF:osd0=480x272x16,4050K mem=48MB davinci_capture.device_type=4 vpfe_
    capture.cont_bufsize=12582912 davinci_enc_mngr.ch0_output=LCD davinci_enc_mngr.ch0_mode=480x272 root=/dev/mmcblk0p2 rootwait ip=192.168.10.2:192.168
    .10.1::255.255.255.0:vodabox:eth0:off

    I also tried the gstreamer pipeline in order to encode a 264 file but it is not working either. But let's take one issue after the other :).


    Thanks for your help,
    JM