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 MPEG-2

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.I had seen number of application available

in DVSDK 4.2 as below.

     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

But I am not understand which sample application more suitable for my requirement means encode video (composite/s-video) in MPEG-2 format.some people

are suggesting use gstreamer and DVTB but I need to write my own application using the DVSDK sample application.

Is it possible to write my own application for encoding video in MPEG-2 format  using DVSDK sample ? if yes, let me know which sample application is available in DVSDK 4.2.

Thanks & Regards,

Anil Verma

  • Hi Anil,

    Depending on what you are interested in doing, here are my two cents:

    - #2 is the most feature-complete example from a system standpoint in the DVSDK. The encode demo shows everything from getting the input stream from the video capture driver, to using the encoder for encoding, to previewing the stream and to writing the encoded result into a file. It also shows how to queue up buffers between application threads to reduce real-time misses which could lead to jerkiness in video. If you are interested in doing the same things this is definitely the example to look at. Based on your description it sounds like you do want to capture video frames from composite/s-video input and encode them, so my guess is that this is the one for you. You can run ./encode -h on your target board to see all the input options to the demo.

    - #1 is useful if there are specific functionality in the codec you'd like to learn about (e.g. some configuration parameter that is not being exercised in #2). It shows how to use the encoder in more detail, and is particularly useful if you are interested in learning about the encoder.

    - #3 is useful to learn more about the usage of the DMAI API. DMAI is a convenience layer that can be used for interacting with capture/display drivers, running codecs and buffer management among other things. It is used in #2 as well. The video_encode_io1 example you are referring to shows how to take a file containing raw video frames, convert them into an encoded stream and write out the results into a file.

    The Software Developers' Guide in the DVSDK contains system-level diagrams and instructions on how to run the various examples, so be sure to refer to it for more info.

    Best regards,

    Vincent

  • Hi Vincent, I'm using the encode application to capture image from the sensor MT9p031 and it seems be wash out, were you able to get a clear image using the encode application? and if you did can you share the patch for the kernel? because I been modifing 5516.dm365_def_para.zip dm365_def_para.c with no luck, it improves better from the default but still not clear.

  • Hi Vincent,

    Thanks for reply.

    Regards,

    Anil

  • Hi Vincent,

    As per your instruction,I am able to find Encode demo and understand capture video and encode video in mpag2 format.

    here some quires :

    1. How to stream encoded (mpag2) video to host using usb video class (uvc).

    2. Which uvc class API required to stabilized communication between host and board.

    3. How to send select available inputs (like composite,s-video) on board from Host PC though UVC.

    Thanks & Regards,

    Anil