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.

capture video of camera and encode to H.264

Other Parts Discussed in Thread: OMAP3530, TVP5146M2, TVP5146, DM3730

hello!

I had a problem, I am trying to have lowered the camera collected image, encoded H.264 format

DVSDK Versions:DVSDK_OMAP3530-EVM_4_00_00_22

camera : TVP5146PFP

kernel: psp in the DVSDK linux-2.6.32-psp03.00.01.06

Firstly, I run the ./loadmoubules.sh and it show as flowing:

root@omap3evm:/usr/share/ti/dvsdk-demos# ./loadmodules.sh                      
CMEMK module: built on Feb 16 2011 at 12:51:59                                 
  Reference Linux version 2.6.32                                               
  File /omap3530/dvsdk/linuxutils_2_25_05_11/packages/ti/sdo/linuxutils/cmem/src
allocated heap buffer 0xc8000000 of size 0x17000                               
cmemk initialized                                                              
DSPLINK Module (1.65.00.02) created on Date: Oct 14 2010 Time: 16:42:45        
SDMAK module: built on Oct 14 2010 at 16:41:55                                 
  Reference Linux version 2.6.32                                               
  File /sdk/build/DVSDK_4_00/4_00_00_22/arago-install/arago-tmp/work/omap3evm-nc

then I want to encode, and it show as flowing:

root@omap3evm:/usr/share/ti/dvsdk-demos# ./encode -v test.264 -t 10            
Encode demo started.                                                           
args.osd OK                                                                    
CERuntime OK                                                                   
Dmai_init OK!                                                                  
Create the user interface OK                                                   
Get configuration from QT interface if necessary OK                            
Validate arguments ...........OK                                               
tvp514x 2-005d: tvp5146m2 found at 0xba (OMAP I2C adapter)

(waiting at here forever!!)


then I try the decode ,but unfortunately I got a e error

root@omap3evm:/usr/share/ti/dvsdk-demos# ./decode -v ../data/video/davincieffect_480p30.m4v                                                                  
Decode demo started.                                                            
Error: Check if  video file contains encoded content 


when I config the kernel when I run make menuconfig I have chosed

 <*> Multimedia support --->

          [*] Video capture adapters --->

                 Encoders/decoders and other helper chips --->

                        <*> Texas Instruments TVP514x video decoder

what is the wrong ?  what can I do for it ?

  • Hi,

    I am not DVSDK expert, so may not be able to help you in encode/decode thing. But from PSP perspective your kernel configuration looks OK to me, the device node (/dev/video0) is being created, the call is going down the line to TVP5146 decoder driver. To check whether capture port is working or not, I would suggest you to use plain vanilla sample application and try.

    If you have access to release package, there you should be having sample application saMmapLoopback.c and saUserPtrLoopback.c file.

     

    Thanks,

    Vaibhav

     

  • thank you

         The device node (/dev/video0) have been created, at the same time the capture port work well (I have tryed). I compile the saMapLoopback.c but when I run it, It show as flows:

    root@omap3evm:~# saMmapLoopback                                                
    tvp514x 2-005d: tvp5146m2 found at 0xba (OMAP I2C adapter)                     
                                                                                   
    Capture: Opened Channel                                                        
    Capture: Current Input: COMPOSITE                                              
    Capture: Current standard: PAL                                                 
    Capture: Capable of streaming                                                  
    Capture: Number of requested buffers = 3                                       
    Capture: Init done successfully                                                
                                                                                   
    Cannot open = /dev/video1 device                                               
    Error in opening display device

    so I think the it is OK

  •  I am using the following kernel command line:

    setenv bootargs console=ttyS2,115200n8 root=/dev/nfs video=omapfb:mode:7inch_LCD nfsroot=192.168.1.138:/nfsroot ip=192.168.1.229:192.168.1.138:192.168.1.138:255.255.255.0:devkit8000:eth0:off mem=99M

    My loadmodules script contains:

    modprobe cmemk phys_start=0x86300000 phys_end=0x87200000 pools=1x3000000,1x1429440,6x1048576,4x829440,1x327680,1x256000,7x131072,20x4096 allowOverlap=1

     

    for above I compile the saMmapLoopback only use the arm-2009q1 then run it

  • anybody help me ?

  • Dear Suyuxuan,

     

     

    I have the same problem. I am not able to get my display device to work (I have no /dev/video1 but I can access /dev/video0).. How did you get the display device to work. Did you change your bootargs? Kindly let me know.

     

    Thanks,

    Krishnan. 

  • Hi,

    Please make sure that you have following options enabled in your defconfig -

     

    CONFIG_FB_OMAP2_NUM_FBS=1

    CONFIG_VIDEO_OMAP2_VOUT=y

     

    With above options enabled you should have Video device nodes created.

    Also please refer to the PSP user guide for more details on this - http://processors.wiki.ti.com/index.php/AM35x-OMAP35x-PSP_03.00.00.05_UserGuide#Video_Display_Driver

    Thanks,

    Vaibhav

  • Hi Vaibhav,

     

    Thank you for your prompt reply. I checked my defconfig file and both the options are enabled. I have also tried various bootargs but nothing has helped. As I had mentioned, my capture device node is created (/dev/video0) but not the display device node.. When I run the saMmapLoopback app,  I get the following error..

     

    [ 3479.207000] clock: Could not find divisor for target rate 0 for clock dpll4_m5_ck parent dpll4_ck

    [ 3479.217285] omap3isp omap3isp: clk_set_rate for dpll4_m5_ck failed

    [ 3479.225036] tvp514x 3-005c: tvp5146m2 found at 0xb8 (OMAP I2C adapter)


    Capture: Opened Channel

    Capture: Current Input: COMPOSITE

    Capture: Input changed to: COMPOSITE

    Capture: Current standard: NTSC

    Capture: Capable of streaming

    Capture: Number of requested buffers = 3

    Capture: Init done successfully


    Cannot open = /dev/video1 device

    Error in opening display device

     


    So, why is that my display device node is not getting created.. Am I missing something? All the modules {dsplinkk, cmemk, lpm_omap3530,sdmak} are getting loaded successfully.  I am using a custom made image. I have attached my image file and also my bootlog.

     8054.Bootlog.rtf

    5826.omap3-console-image.txt

     

    It would be really great if you can let me know what is going wrong.. 

     

    Thanks and Regards,

    Krishnan.


  • The boot log shows that driver probe function is failing with error -

    [   24.955078] omap_vout omap_vout: probed for an unknown device

    And this will only happen if you have CONFIG_FB_OMAP2_NUM_FBS=3, please refer to the file "arch/arm/mach-omap2/devices.c" and look for "omap_vout_resource". If still this doesn't help, then please share the config file.

    Thanks,

    Vaibhav

  • Thanks Vaibhav. I am attaching both the defconfig and devices.c file.. CONFIG_FB_OMAP2_NUM_FBS is set to 1 but I could not see any "omap_vout_resource" in devices.c file. Please let me know what is happening. 

     

    6813.defconfig.txt

    7608.devices.txt

     

    Regards,

    Krishnan. 

  • Hi Krishnan,

    Sorry, I miss-typed it in last post, the files is arch/arm/plat-omap/device.c

     

    Irrespective of this,  this is confusing, as per the defconfig, it shows you are at 2.6.31-rc and not 2.6.32; somewhere in top of this post you did mention about 2.6.32. Now sure how exactly the code is integrated.

    #
    # Automatically generated make config: don't edit
    # Linux kernel version: 2.6.31-rc7-omap1
    # Wed Dec 16 15:22:07 2009
    #

    Apart from this, defconfig looks OK to me, I don't see why num_resource is coming to 0 in omap_vout->probe function.

    Thanks,
    Vaibhav
  • Hi Vaibhav,

     

    What you said was right!! I was looking at a different defconfig as you had pointed out.. Now, I changed the  CONFIG_FB_OMAP2_NUM_FBS to 1 and it is working perfectly..

    Thanks a ton. 

     

    So how does this setting work when there are multiple video inputs? I saw in one of your posts that,


    The V4L2 device nodes will get created under /dev/videox
    Where, x = 1 or 2 depending on CONFIG_FB_OMAP2_NUM_FBS.

    The equation would be,

    Num of V4l2 nodes = 3 - CONFIG_FB_OMAP2_NUM_FBS

    And CONFIG_FB_OMAP2_NUM_FBS can not be less than 0.



    Does this mean that we can have only 3 video inputs?

    Thanks again,
    Krishnan.


     

  • Hi,suyuxuan,

    I want to capture video of camera and encode to H.264 with devkit8000 too,

    maybe we can have some cooperation,

    or I can learn from you and get your help.

    Please  contact me if you want:46520368@qq.com,

    if you are a Chinese ,you can contact with QQ:46520368.

     

    Thanks.

    Best wishes!

     

  • Hi,

    We are also facing the same problem which is mentioned as solved in this thread.

    root@beagleboard-dvsdk:~# /usr/share/ti/linux-driver-examples/video/saMmapLoopback

    [   64.032897] clock: Could not find divisor for target rate 0 for clock dpll4_m5_ck parent dpll4_ck
    [   64.042572] omap3isp omap3isp: clk_set_rate for dpll4_m5_ck failed

    We are using TVP5146 decoder and DM3730 processor on a custom board with BeagleXM RevC reference software.

    PS: BeagleXM board doesn't have TVP5146 in platform so added the same from EVM

    From the comments on the post we are not sure if bootargs will make a difference.

    Our bootargs

    bootargs=console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext3 rw mem=55M@0x80000000 mem=128M@0x88000000 omap_vout.vid1_static_vrfb_alloc=y omapfb.vram=0:8M rootwait

    Please let us know if some things need to be added in X-loader/U-boot/Kernel

    we are using ti-dvsdk_dm3730-evm_4_01_00_09

    Regards

    SudhirKumar

  • I had similar issues and found that I had to make sure CONFIG_VIDEO_OMAP2_VOUT=y was set too.  This was for the 2.6.32 kernel.