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.

FFplay error when playback avi file in DM365 IPNC

Hello everyone,

I want to playback AVI file in DM365 IPNC. Someone let me use ffmpeg.

When I used the ffplay playback in DM365 IPNC, I got some error message as follow:

Could not initialize SDL - No available video device

When I saw the code about SDL_init, I couldn't find the SDL video driver about DM365.

Must I to write a SDL dirver to suppot DM365 ?

I note that there are /dev/video2 and /dev/video3 in the DM365. Could I make these devies as SDL video device?

 

Thanks,

Yanbin Yue

  • Hi Yanbin,

    I don't think using  just  ffmpeg for playing avi on DM365 is the best idea,
    because it uses only arm part of the processor, so it could decode only very small resolutions/framerates.
    You better use ffmeg (libavformat library) only for reading encoded frames from avi file,
    after that you don't need ffmpeg anymore, use DM365 specific codecs and render modules (which use video coprocessors) to decode  and render, like e.g.  DVSDK "decode" demo sample.
    You can look at IPNC Appro_avi_save.c program how  ffmeg, particulary libavformat, is used for saving previously encoded frames.
    So, for example you can add ffmpeg support to the "decode" DVSDK demo,
    and there just implement the loader.c as ffmpeg reading the avi file.
    Besides that you should add missing audio codecs to DVSDK.

    Regards,
    Marko.

  • Hi Marko,

    When I run the decode demo, I get a error:

    [Display] Failed to open fb device /dev/fb/2 (No such file or directory)

    So I think the dvsdk doesn't support IPNC as well as EVM.

    But I will try to change the kernel config, and let it support the fb then test decode demo again.

     

    Thanks,

    Yanbin Yue

  • Hi Marko,

    When I used the kernel image which can support fb, some terrible errors happened:

    # ./decode -v ./dxg.264
    Decode demo started.
    CMEMK Error: Failed to find a pool which fits 529920
    @0x00071d60:[T:0x4001f950] ti.sdCMEMK Error: Failed to find a pool which fits 1024
    o.dmai - [BufTab] Allocating BufTab for 1 buffers
    @0x00072085:[T:0x4001f950] ti.sdo.dmai - [Buffer] Set user pointer 0x403ca000 (physical 0x83900000)
    @0x00072587:[T:0x4001f950] ti.sdo.dmai - [Display] Display buffer 0 mapped to 0x403ca000 has physical address 0x83900000
    @0x0007a6f0:[T:0x40bf6490] ti.sdo.dmai - [BufTab] Allocating BufTab for 4 buffers
    CMEM Error: getPool: Failed to get a pool fitting a size 529920
    Failed to allocate memory.
    @0x0007bc7a:[T:0x40bf6490] ti.sdo.dmai - [BufTab] Failed to allocate buffer 0 for BufTab
    Error: Failed to create buftab
    CMEM Error: getPool: Failed to get a pool fitting a size 1024
    @0x0007d945:[T:0x413f6490] ti.sdo.dmai - [Vdec2] Failed to open video decode algorithm
    Error: Failed to create video decoder: h264dec
    @0x0007f1fe:[T:0x4001f950] ti.sdo.dmai - [Cpu] Unknown Cpu Type!
    @0x0007f2f0:[T:0x4001f950] ti.sdo.dmai - [Cpu] Failed to get device type
    Error: Failed to create Cpu Object

     

    Thanks,

    Yanbin Yue

  • Hi Yanbin,

    Before running "decode", you must run loadmodules.sh, script, which loads cmem module.
    You also have to set correct CMEM pool sizes in loadmodules.sh, and maybe decrease the Linux memory size in uBoot arguments.
    There is a lot issues on that subject in this forum,
    type loadmodules.sh  in the search box of this forum and you will get a lot of explanations on how to do that.
    You can also look at :  http://processors.wiki.ti.com/index.php?title=Changing_the_DVEVM_memory_map 
    If the first eroor is : "CMEMK Error: Failed to find a pool which fits 529920",
    then try to set a few buffers of that size in loadmodules.sh.

    Marko.

  • Hi Marko,

    Now the CMEMK error has been solved. And other errors exisis however.

    # ./decode -v ./davincieffect.264
    Decode demo started.
    DavinciDisplay DavinciDisplay.1: Before finishing with S_FMT:
    layer.pix_fmt.bytesperline = 736,
     layer.pix_fmt.width = 720,
     layer.pix_fmt.height = 480,
     layer.pix_fmt.sizeimage =529920
    DavinciDisplay DavinciDisplay.1: pixfmt->width = 720,
     layer->layer_info.config.line_length= 736
    DavinciDisplay DavinciDisplay.1: Streaming is started
    Error: Failed to create display device
    Error: Failed to decode video buffer

     

    Now I doubt that if the dvsdk demos can be run in the DM365 IPNC. The attchment is the log when I set CE_DEBUE=2.

    The boot args is: 'console=ttyS1,115200n8 ip=192.168.1.224:192.168.1.221:192.168.1.1:255.255.255.0:::off eth=41:15:16:11:10:20 noinitrd rw root=/dev/nfs nfsroot=192.168.1.221:/root/workarea/ipnc_org/target/filesys,nolock mem=60M video=davincifb:vid0=OFF:vid1=OFF:osd0=720x576x16,4050K'

    And I add the framebuffer support in the kernel config.

     

    Thanks,

    Yanbin

  • Hi Marko,

    It seems I got a new error,

    # ./decode -v ./davincieffect.264
    Decode demo started.
    DavinciDisplay DavinciDisplay.1: Before finishing with S_FMT:
    layer.pix_fmt.bytesperline = 736,
     layer.pix_fmt.width = 720,
     layer.pix_fmt.height = 480,
     layer.pix_fmt.sizeimage =529920
    DavinciDisplay DavinciDisplay.1: pixfmt->width = 720,
     layer->layer_info.config.line_length= 736
    Error: Failed to decode video buffer

    It seem' s decode error.

    I'll see what's wrong has happened.

     

    Regards,

    Yanbin

  • Hi Yanbin,

    Try to decode a stream that is encoded with encode demo if possible (or IPNC).
    At least first frame must have SPS+PPS at the beggining.
    I can decode h264 (or mpeg4)  sources that are encoded with encode demo or IPNC (TI DM365 encoder),
    but i haven't tried sources that have been encoded with other h264 encoders.

    Marko.

  • Hi Marko,

    My test data is downloaded from http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/dvsdk/DVSDK_2_10/latest/index_FDS.html.

    And my DVSDK version is 2.10.1.18, so I think the test video data should be correct.

    Thanks,

    Yanbin

  • Hi Yanbin,
    I think those sources are 1280x720.

    Marko.