Hardware setup - LeopardBoard DM365

From RidgeRun Developer Connection

(Difference between revisions)
Jump to:navigation, search
(5Mpx Camera Module - LI-5M03)
(Video HD component input board - LI-HDI365)
(14 intermediate revisions not shown)
Line 27: Line 27:
<pre>
<pre>
-
gst-launch -e v4l2src always-copy=false num-buffers=1000 ! video/x-raw-yuv,format=\(fourcc\)NV12, width=1280, height=720, framerate=\(fraction\)23/1 ! \
+
FILE_NAME=video_camera_capture.mp4
-
dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! dmaiperf ! queue ! qtmux ! filesink location=video_camera_capture.mp4
+
 
 +
gst-launch -e v4l2src always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720, framerate=(fraction)23/1' ! \
 +
dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! dmaiperf ! queue ! qtmux ! filesink location=$FILE_NAME
</pre>
</pre>
Line 37: Line 39:
[[File:LIVI365_capture_module_picture.jpeg|200px|thumb|center| Figure 3. LI-VI365 video capture module.]]
[[File:LIVI365_capture_module_picture.jpeg|200px|thumb|center| Figure 3. LI-VI365 video capture module.]]
-
In order to activate this module you need to activate the ''Texas Instruments TVP514x video decoder'' driver in the following path into the configuration window of the SDK (See figure 4):
+
In order to use this module follow the next steps:
 +
 
 +
1. In order to activate this module you need to activate the ''Texas Instruments TVP514x video decoder'' driver in the following path into the configuration window of the SDK (See figure 4):
       -> Kernel configuration                                                 
       -> Kernel configuration                                                 
Line 51: Line 55:
'''Note: in order to use the LI-VI365 module it is necessary to desactivate the MT9P031 camera sensor driver.'''
'''Note: in order to use the LI-VI365 module it is necessary to desactivate the MT9P031 camera sensor driver.'''
-
Once you have selected the driver for the module, you can save all the changes and rebuild your SDK by running the ''make'' command and finally install it into your board running the ''make install'' command.
+
2. Once you have selected the driver for the module, you can save all the changes and rebuild your SDK by running the ''make'' command.
-
In order to verify that the new module was installed correctly you can run the following GStreamer command which will capture a video from the composite input of the module and record it to a video file called ''composite_capture_module.mp4'', then you can reproduce the video file with any multimedia application such as VLC or mplayer.
+
3. Install the SDK into your board by running the ''make install'' command.
 +
 
 +
4. Start your board with the module connected.
 +
 
 +
5. In order to verify that the new module was installed correctly you can run the following GStreamer command which will capture a video from the composite input of the module and record it to a video file called ''composite_capture_module.mp4'', then you can reproduce the video file with any multimedia application such as VLC or mplayer.
<pre>
<pre>
-
gst-launch -e v4l2src input-src=composite always-copy=false ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480,pitch=736' \
+
FILE_NAME=composite_capture_module.mp4
-
! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=video_composite.jpeg
+
 
 +
gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480,pitch=736' \
 +
! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME
</pre>
</pre>
== Video HD component input board - LI-HDI365 ==
== Video HD component input board - LI-HDI365 ==
-
It is available a video component input board for the LeopardBoard DM365 which is shown in the following figure.
+
The LI-HDI365 is a TI TVP7002 based high definition video component input board for the LeopardBoard DM365/DM368 which is shown in the following figure.
[[File:LIHDI365_capture_module.jpeg|200px|thumb|center| Figure 5. LI-HDI365 video capture module.]]
[[File:LIHDI365_capture_module.jpeg|200px|thumb|center| Figure 5. LI-HDI365 video capture module.]]
-
In order to activate the driver for this module follow the next steps:
+
In order to activate the driver for this module follow the next steps using SDK configuration menu:
 +
 
 +
 
1. Ensures the drivers for the LI-5M03 camera module and the LI-VI365 video composite capture modules are disable in the configuration window.
1. Ensures the drivers for the LI-5M03 camera module and the LI-VI365 video composite capture modules are disable in the configuration window.
-
2. Select the driver by activating the ''Texas Instruments TVP5150 video decoder'' option in the following path
+
2. Configure the video output to component
 +
Architecture configurations  --->
 +
  Video Output  --->
-
      -> Kernel configuration                                                                                   
 
-
        -> Device Drivers                                                                                       
 
-
          -> Multimedia support (MEDIA_SUPPORT [=y])                                                           
 
-
            -> Video capture adapters (VIDEO_CAPTURE_DRIVERS [=y])                                             
 
-
              -> Autoselect pertinent encoders/decoders and other helper chips (VIDEO_HELPER_CHIPS_AUTO [=n])   
 
-
                -> Encoders/decoders and other helper chips
 
-
As is shown in the following figure
+
[[File:Component_selection.png|500px|thumb|center| Figure 6. Video component mode selection.]]
-
[[File:SDK_TVP7002_Driver.jpeg|500px|thumb|center| Figure 5. LI-HDI365 video capture module.]]
+
3. Set component standard and maximum video I/O
 +
Architecture configurations  --->
 +
  Component Standard (720P-60) --->
 +
  Maximum Video Output Buffer Size (720P) --->
 +
  Maximum Video Input Buffer Size (720P) --->
-
3. Save the changes and rebuild the SDK running the ''make'' command.
+
[[File:Video_Standard.png|500px|thumb|center| Figure 7. Video Standard selection.]]
-
4. Install the SDK into the board by running the ''make install'' command.
+
4. Enable TVP7002 camera sensor, disable TVP514x camera sensor and set other configurations:
 +
Kernel configuration  --->
 +
  Device Drivers  --->
 +
    <*> Multimedia support  --->
 +
      [*]  Video capture adapters  --->
 +
      < >  mt9p031 support
 +
      Encoders/decoders and other helper chips  --->
 +
        < > Texas Instruments TVP514x video decoder
 +
        <*> Texas Instruments TVP7002 video decoder
-
5. Start your board with the module connected. In order to verify it is working properly you can run the following GStreamer pipeline which will capture the composite video from the module and record it to a video file called ''component_capture_module.jpeg''. You can reproduce this file using any media player such as VLC or mplayer.
+
[[File:mt9p031.png|500px|thumb|center| Figure 8. mt9p031 driver.]]
 +
 
 +
[[File:tvp7002.png|500px|thumb|center| Figure 9. TVP7002 camera sensor.]]
 +
 
 +
 
 +
5. Enable DMAi plugins
 +
  Proprietary software  --->
 +
    [*] Texas Instruments CodecEngine for DM368
 +
    [*] Gstreamer DMAI Plugins
 +
 
 +
 
 +
[[File:DMAi_Plugins.png|500px|thumb|center| Figure 9. Dmai Plugins.]]
 +
 
 +
 
 +
6. Save the changes and rebuild the SDK running the ''make'' command.
 +
 
 +
7. Install the SDK into the board by running the ''make install'' command.
 +
 
 +
8. Start your board with the module connected. In order to verify it is working properly you can run the following GStreamer pipeline which will capture the composite video from the module and record it to a video file called ''component_capture_module.jpeg''. You can reproduce this file using any media player such as VLC or mplayer.
<pre>
<pre>
-
gst-launch -e v4l2src input-src=component always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720,framerate=(fraction)23/1' ! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=component_capture_module.jpeg
+
FILE_NAME=component_capture_module.jpeg
 +
 
 +
gst-launch -e v4l2src input-src=component always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720,framerate=(fraction)23/1' \
 +
! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME
</pre>
</pre>
= Display Modules =
= Display Modules =
 +
 +
== DVI output module - LI-DVI1 ==
 +
 +
One of the capabilities on what video displaying refers to, in dm365 leopard board, is to display by using a DVI format.
 +
 +
First of all, it is necessary to attach the LI-DVI1 module to the Parallel RGB (PRGB) port, which is numbered J7, so it is possible to have the right hardware configuration.
 +
 +
[[File:dm365_leopard_dvi_module_2.JPG|300px|thumb|center| Figure 6. LI-DVI1 DVI output module for dm365 leopard.]]
 +
 +
 +
=== Configuration ===
 +
 +
DVI configuration is achieved after three basic steps, both at RidgeRung's SDK configuration menu.
 +
 +
1) Make sure that the dm365_generic_prgb_encoder is selected to be built. This can be checked at:
 +
 +
Kernel configuration -> Device Drivers -> Multimedia support -> Video capture adapters -> Generic PRGB Encoder support
 +
 +
[[File:dvi_config_1.png|500px|thumb|center| Figure 7. Generic PRGB Encoder enabling.]]
 +
 +
2) Set the video output to work as PRGB, then choose the max resolution size that is planed to be used for this output (480P, 720P, 1080I).
 +
 +
Architecture configurations -> Video Output (PRGB)
 +
Architecture configurations -> Maximum Video Output Buffer Size   
 +
 +
[[File:dvi_config_2.png|500px|thumb|center| Figure 8. Generic PRGB output and Maximum Video Output Buffer.]]
 +
 +
3) Set the standard configuration at kernel extra arguments.
 +
 +
Kernel configuration -> Extra kernel arguments 
 +
 +
[[File:dvi_config_3.png|500px|thumb|center| Figure 9. Generic PRGB encoder data setup.]]
 +
 +
At this point it is important to notice that, for setting the standard, it is required to identify the module to which the information is going to, This is made by the instruction "dm365_generic_prgb_encoder.mode="
 +
 +
A couple examples of standards to be configured would be:
 +
 +
dm365_generic_prgb_encoder.mode=1280x720MR-16@60
 +
 +
dm365_generic_prgb_encoder.mode=720x480MR-16@30

Revision as of 18:56, 30 March 2012

This page shows the steps necessary to setup the different hardware modules available for the LeopardBoard DM365. The instructions provided are based in the SDK 2011Q2 for LeopardBoard DM365.

Contents

Capture Modules

5Mpx Camera Module - LI-5M03

Figure 1. LI-5M03 camera module.

In order to activate the camera module follow the next steps:

1. Activate the MT9P031 sensor driver. You can find this driver at the following path into the configuration window:

    -> Kernel configuration                                                
        -> Device Drivers                                                    
          -> Multimedia support (MEDIA_SUPPORT [=y])                         
            -> Video capture adapters (VIDEO_CAPTURE_DRIVERS [=y]) 

And select the option mt9p031 support as is shown in the figure 2.

Figure 2. SDK MT9P031 driver.

2. Once you have selected the driver for your camera module exit the configuration window and save the changes made.

3. Rebuild your SDK by running the make command and install it into the board running the make install command.

4. In order to test the module has been built correctly you can run the following GStreamer pipeline which will record 1000 buffers of video and store them into a video file called video_camera_capture.mp4. Once the video has been recorded it can be played using any multimedia player such as VLC or mplayer.

FILE_NAME=video_camera_capture.mp4

gst-launch -e v4l2src always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720, framerate=(fraction)23/1' ! \
dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! dmaiperf ! queue ! qtmux ! filesink location=$FILE_NAME

Video composite input board - LI-VI365

There is a video composite input board which allows to capture video from either a composite input or a S-Video input. The module is shown in the figure 3.

Figure 3. LI-VI365 video capture module.

In order to use this module follow the next steps:

1. In order to activate this module you need to activate the Texas Instruments TVP514x video decoder driver in the following path into the configuration window of the SDK (See figure 4):

     -> Kernel configuration                                                
        -> Device Drivers                                                    
          -> Multimedia support (MEDIA_SUPPORT [=y])                        
            -> Video capture adapters (VIDEO_CAPTURE_DRIVERS [=y])           
              -> Autoselect pertinent encoders/decoders and other helper     
                -> Encoders/decoders and other helper chips


Figure 4. Selecting driver for LI-VI365 video capture module.

Note: in order to use the LI-VI365 module it is necessary to desactivate the MT9P031 camera sensor driver.

2. Once you have selected the driver for the module, you can save all the changes and rebuild your SDK by running the make command.

3. Install the SDK into your board by running the make install command.

4. Start your board with the module connected.

5. In order to verify that the new module was installed correctly you can run the following GStreamer command which will capture a video from the composite input of the module and record it to a video file called composite_capture_module.mp4, then you can reproduce the video file with any multimedia application such as VLC or mplayer.

FILE_NAME=composite_capture_module.mp4

gst-launch -e v4l2src input-src=composite always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=640, height=480,pitch=736' \
! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME

Video HD component input board - LI-HDI365

The LI-HDI365 is a TI TVP7002 based high definition video component input board for the LeopardBoard DM365/DM368 which is shown in the following figure.

Figure 5. LI-HDI365 video capture module.

In order to activate the driver for this module follow the next steps using SDK configuration menu:


1. Ensures the drivers for the LI-5M03 camera module and the LI-VI365 video composite capture modules are disable in the configuration window.

2. Configure the video output to component

Architecture configurations  ---> 
 Video Output  ---> 


Figure 6. Video component mode selection.

3. Set component standard and maximum video I/O

Architecture configurations  --->
 Component Standard (720P-60) --->
 Maximum Video Output Buffer Size (720P) --->
 Maximum Video Input Buffer Size (720P) --->
Figure 7. Video Standard selection.

4. Enable TVP7002 camera sensor, disable TVP514x camera sensor and set other configurations:

Kernel configuration  --->
  Device Drivers  --->
    <*> Multimedia support  --->
     [*]   Video capture adapters  --->
      < >   mt9p031 support
      Encoders/decoders and other helper chips  --->
        < > Texas Instruments TVP514x video decoder 
        <*> Texas Instruments TVP7002 video decoder
Figure 8. mt9p031 driver.
Figure 9. TVP7002 camera sensor.


5. Enable DMAi plugins

 Proprietary software  --->
   [*] Texas Instruments CodecEngine for DM368
   [*] Gstreamer DMAI Plugins


Figure 9. Dmai Plugins.


6. Save the changes and rebuild the SDK running the make command.

7. Install the SDK into the board by running the make install command.

8. Start your board with the module connected. In order to verify it is working properly you can run the following GStreamer pipeline which will capture the composite video from the module and record it to a video file called component_capture_module.jpeg. You can reproduce this file using any media player such as VLC or mplayer.

FILE_NAME=component_capture_module.jpeg

gst-launch -e v4l2src input-src=component always-copy=false num-buffers=1000 ! 'video/x-raw-yuv,format=(fourcc)NV12, width=1280, height=720,framerate=(fraction)23/1' \
! queue ! dmaiaccel ! dmaienc_h264 encodingpreset=2 ratecontrol=4 ! qtmux ! filesink location=$FILE_NAME

Display Modules

DVI output module - LI-DVI1

One of the capabilities on what video displaying refers to, in dm365 leopard board, is to display by using a DVI format.

First of all, it is necessary to attach the LI-DVI1 module to the Parallel RGB (PRGB) port, which is numbered J7, so it is possible to have the right hardware configuration.

Figure 6. LI-DVI1 DVI output module for dm365 leopard.


Configuration

DVI configuration is achieved after three basic steps, both at RidgeRung's SDK configuration menu.

1) Make sure that the dm365_generic_prgb_encoder is selected to be built. This can be checked at:

Kernel configuration -> Device Drivers -> Multimedia support -> Video capture adapters -> Generic PRGB Encoder support 
Figure 7. Generic PRGB Encoder enabling.

2) Set the video output to work as PRGB, then choose the max resolution size that is planed to be used for this output (480P, 720P, 1080I).

Architecture configurations -> Video Output (PRGB)
Architecture configurations -> Maximum Video Output Buffer Size    
Figure 8. Generic PRGB output and Maximum Video Output Buffer.

3) Set the standard configuration at kernel extra arguments.

Kernel configuration -> Extra kernel arguments   
Figure 9. Generic PRGB encoder data setup.

At this point it is important to notice that, for setting the standard, it is required to identify the module to which the information is going to, This is made by the instruction "dm365_generic_prgb_encoder.mode="

A couple examples of standards to be configured would be:

dm365_generic_prgb_encoder.mode=1280x720MR-16@60
dm365_generic_prgb_encoder.mode=720x480MR-16@30
Navigation
Toolbox