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.

Encode video in to MPEG-2 format

Hi All

I am already install DVSDK_DM368_evm_4_02_00_06 for DM368.I want to encode video in to MPEG-2 format & store in temp buffer then transfer MPEG-2 format data from target board to host pc through USB.Let me know any application available in DVSDK _dm368_evm_4_02_00_06.if available where is in SDK and what type of video input required for encoding.

Thanks & Regards,

Anil

  • I dont think you have the exact application in DVSDK. Encode demo uses video port as input and stores the same in file (file system over nfs). To tranfer it over USB, you may need to modify the app. USB drivers are part of the DVSDK.

    I will move this to Linux forum if anyone wants to add more.

    regards

    Yashwant

  • Hi Yashwant ,

    Thanks for reply.

    I seen  DVSDK 4.2 has demo(Encode and Decode Application) and DMI based Application. let me know which Application more suitable to my requirement (Composite/s-video as a input and encode this input in MPEG-2 format).

    Thanks & Regards,

    Anil Verma

  • Anil,

           You can use gstreamer pipeline or the DVTB to do encode in MPEG2 format & store in file. Refer Software Developers Guide where steps to do these are documented.

    Best Regards,

    Velan

  • Hi Velan,

    Thanks for reply.

    But I am not understand why use DVTB becouse all ready number of application available in DVSDK.

    1.  codecs-dm365_4_02_00_00/packages/ti/sdo/codecs/mpeg2enc

    2. dvsdk-demos_4_02_00_01/dm365/encode

    3. /home/dmai_2_20_00_15/packages/ti/sdo/dmai/apps/video_encode_io1

    And DVTB only execute command but i need to write source code for my project (Encode video input in MPEG-2 format).

    Please give your suggestion..

    Regards,

    Anil Verma

                   

  • Anil,

           That is right, i meant to say you can refer any of them to write your own application. As DVTB also can encode MPEG2 format & the source is part of the DVSDK you can refer this also.

           I feel the first thing to start for you would be to use encode in DVSDK demos (dvsdk-demos_4_02_00_01/dm365/encode).      

    Best Regards,

    Velan

  • Hi Velan,

    Thanks for reply.

    My Application: capture video from input (composite / s-video) and encode it in MPEG-2 format

    I have some query as below:

    1. Can need any saprate application for capture video ?

      please refer : http://processors.wiki.ti.com/index.php/Writing_V4L2_Media_Controller_Applications_on_Dm36x_Video_Capture

    2. What is input format for Encoder (eg. YUV) ?

    3. What is actual flow for my application ?

    Thanks & Regards,

    Anil Verma

  • Anil,

           The link you provided is for writing applications on newer linux kernel (which supports Media Controller framework for capture applications, which is a new framework instead of V4L2 based),

           But the DVSDK you are using 4.02.00.06 uses kernel 2.6.32, which does not have this framework. Please stick to sample applications provided in DVSDK 4.02.00.06.

           Input format is configurable in both capture side as well as in codec encoder side, please refer to sample application.

           If i can think of your application below is the usecase.

           1. Decide your frame rate, format of data from capture device & to encoder, encode bit rate,

           2. Capture the data from V4L2 at the decided rate.

           3. Pass each captured frame/buffer to encoder.

           4. Get each encoded data from encoder, and write each frame/buffer to a file/buffer (Ensure that media where you write encoded content supports encode frame rate)

           5. At the end of encode app completion, Transfer the encoded file to PC, if it is buffer transfer the content of buffer to a file first.

           Please refer encode sample application provided in DVSDK, which has lot of these information for you to decide first.

    Best Regards

    Velan

  • Hi Velan

    Thanks for reply

    Regards,

    Anil

  • Hi Velan,

    I want to set V4L2 driver control options (Brightness, Contrast etc..) in real time.some people suggest control value set in real time using multiple opens.

    Let me know v4l2 driver support multiple opens ? if yes  then  what is relation between multiple opens & controls and how to set control value of v4l2

    driver in real time.

    Thanks & Regards,

    Anil Verma