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_encode demo on 814x produce 0 byte file

Greetings,

I just got my EVM8148 board last week and I can run all the demo application from the matrix UI. I have a basic question about video encoding.  The only one that doesn't seem to work is the video capture. I want to produce h264 encoded video output.

Since that failed I tried to do it manually. I saw some partial instructiion on how to do this one this forum for the 8168.

I read the instruction at http://processors.wiki.ti.com/index.php/OMX_EZSDK_Examples#How_to_Run_2 that says to disable Matrix GUI. The instructions seems to be for the 8168.

http://processors.wiki.ti.com/index.php/Matrix_Users_Guide#I_don.27t_want_Matrix_to_run_on_boot_up

i rename one of the S-file to a K as you can see below. ( S99matrix-gui-e -> K99matrix-gui-e)

root@dm814x-evm:/etc/rc5.d# ls -lart
lrwxrwxrwx    1 root     root           16 Jan  1  2000 S02dbus-1 -> ../init.d/dbus-1
drwxr-sr-x   34 root     root         4096 Dec  9 18:22 ..
drwxr-sr-x    2 root     root         4096 Dec  9 18:26 .
lrwxrwxrwx    1 root     root           19 Feb 22  2012 S99rmnologin -> ../init.d/rmnologin
lrwxrwxrwx    1 root     root           22 Feb 22  2012 S99gplv3-notice -> ../init.d/gplv3-notice
lrwxrwxrwx    1 root     root           18 Feb 22  2012 S30pvr-init -> ../init.d/pvr-init
lrwxrwxrwx    1 root     root           16 Feb 22  2012 S20thttpd -> ../init.d/thttpd
lrwxrwxrwx    1 root     root           16 Feb 22  2012 S20syslog -> ../init.d/syslog
lrwxrwxrwx    1 root     root           17 Feb 22  2012 S10telnetd -> ../init.d/telnetd
lrwxrwxrwx    1 root     root           29 Feb 22  2012 S01load-hd-firmware.sh -> ../init.d/load-hd-firmware.sh
lrwxrwxrwx    1 root     root           22 Feb 22  2012 K99matrix-gui-e -> ../init.d/matrix-gui-e

now the matrix start anymore.

but when I ran the instruction

and i tried to load the kernel driver manually I get this type of errors.

root@dm814x-evm:/etc/rc5.d# insmod /lib/modules/2.6.37/kernel/drivers/dsp/syslink.ko
insmod: error inserting '/lib/modules/2.6.37/kernel/drivers/dsp/syslink.ko': -1 File exists

So my questions:

Ddo I need to turn off another script to prevent the .ko file from being installed ?

are these instructions been tested on the 8148 EVM ? are they suppose to work? if not is there a way to get video encode working on the 8148 EVM?

Best regards

Richard

here is the output I get:

root@dm814x-evm:/usr/share/ti/ti-omx# ./capture_encode_a8host_debug.xv5T -o samp
le.h264 -m 1080p -f 60 -b 1000000 -d 0 -n 1000                                  
output file: sample.h264                                                        
bit_rate: 1000000                                                               
frame_rate: 60                                                                  
num_frames: 1000                                                                
mode: 1080p                                                                     
display_id: 0                                                                   
 Capture-Encode example                                                         
===============================                                                 
 OMX_Init completed                                                             



these are the instruction i am trying to run below:

How to Run

As this example by default provides display on HDMI port, user should plug in a display device (TV) into base board HDMI port. Also display device should support 1080p60 display. A video source should be connected on Component input port of EIO card. Video source should provide 1080p60 on component output, otherwise EVM will not be able to detect the capture signal. On running the application user should see the video playing on connected display device, and encoded output will be produced in given file.

For running the application following steps are required (These steps assume that all the binaries are stored in same folder). Please note, SDK would autoload the binaries as part of demonstration application, which should be disabled before following the procedure below. It assumes that EVM has been booted and user has logged in as root. If init sequence in SDK is not disabled, following steps are not required, and user can proceed with Matrix GUI disabling step.

•# /prcm_config_app s

• Insert syslink module
 # insmod syslink.ko


• Load the Firware using firmware_loader utility provided in SDK. 
( By default in the init scripts of Linux, firmaware might be getting loaded, so care needs to taken)

i. #  ./firmware_load 1 dm816x_hdvicp.xem3 start
ii.#  ./firmware_load 2 dm816x_hdvpss.xem3 start

• Insert HDMI controller / FB dev driver
i.  #  insmod vpss .ko vpss_slaveloader = 0xbfb0000
ii. #  insmod ti816xxxhdmi.ko
 

If Matrix GUI is running as part of SDK initialization scripts, It needs to be turned off

# /etc/init.d/matrix-gui-e stop
# /etc/init.d/pvr-init stop


• Run the application

# ./capture_encode_a8host_debug.xv5t -o test.data -m 1080p -f 60 -b 10000000 -n 500 

If application has modified the display id to set it to HDCOMP, HDCOMP needs to be configured for 1080p-60 mode, before running the application

# echo 1080p-60 >/sys/devices/platform/vpss/display3/mode
  • Hi Richard,

    Apologies for delayed response ..

    Do you get any more output beyond 

     Capture-Encode example                                                         
    ===============================                                                 
     OMX_Init completed                                                             
    

    ?

    What is capture source in your set-up ? Is it set to produce 1080p60. Also are you running from SD card or NFS ?

    Even if you do not disable matrix and pvr, encode should happen and display would not be visible. Also Please provide output of

    /usr/share/ti/ti-uia/loggerSMDump.out 0x9e400000 0x100000 all 

    (you could telnet to EVM and run above program)

    Regards

    Vimal

  • thanks you for providing the log commands.

    I will attached complete logs.8473.capture_encode_1080P_30fps_64g.txt

    So far I have tried with 2 source a bluray player and a HD camera what can produce 1080P/30 and 60. Only the bluray player seems to work but only if HDMI output isn't connected on the bluray player.

    And by work I need i get a while with some video in it. the detection resolution is wrong.

    the "good" output look like something like this.

    4265.cap_enc_bad_HDcamera.txt

    N:VPSS  P:2 #:01057 T:00000015c1a5af79 S:Starting Video Decoder Capture Driver
    N:VPSS  P:2 #:01058 T:00000015c1a659b3 S: CAPTUREAPP: Detect video in progress for inst 0 !!!
    N:VPSS  P:2 #:01059 T:00000015c40bd409 S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:VPSS  P:2 #:01060 T:00000015c674c2af S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:VPSS  P:2 #:01061 T:00000015c8dcb0d1 S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:VPSS  P:2 #:01062 T:00000015cb45e6ed S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:VPSS  P:2 #:01063 T:00000015cdaee513 S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:VPSS  P:2 #:01064 T:00000015d01629cf S: CAPTUREAPP: Detected video at CH0 (858x525@59Hz, 0)!!!
    N:Video P:1 #:00227 T:00000015d02880c5 S:Module<OMX.TI.DUCATI.VIDENC> Entering<OMX_BASE_GetParameter> @line<664>
    N:VPSS  P:2 #:01065 T:00000015d0169635 S: CAPTUREAPP: Detect video Done !!!

    The bad output looks like this (this is coming from an hd camcorder)

    N:VPSS  P:2 #:02467 T:0000006becd022df S:Module<OMX.TI.VPSSM3.VFCC> Leaving<OMX_BASE_CmdCompleteEventHandler> @line<496> with error<0:ErrorNone>
    N:VPSS  P:2 #:02468 T:0000006becd13fb1 S:Module<OMX.TI.VPSSM3.VFCC> Entering<OMX_BASE_CmdEventHandler> @line<434>
    N:VPSS  P:2 #:02469 T:0000006becd1acf5 S:Module<OMX.TI.VPSSM3.VFCC> Leaving<OMX_BASE_CmdEventHandler> @line<466> with error<0:ErrorNone>
    N:VPSS  P:2 #:02470 T:0000006becd24dd3 S:Module<OMX.TI.VPSSM3.CTRL.TVP> Entering<OMX_BASE_CmdEventHandler> @line<434>
    N:VPSS  P:2 #:02471 T:0000006becd2d007 S:Module<OMX.TI.VPSSM3.CTRL.TVP> Entering<OMX_BASE_PROCESS_CmdEvent> @line<526>
    N:VPSS  P:2 #:02472 T:0000006becd32b99 S:Module<OMX.TI.VPSSM3.CTRL.TVP> @<OMX_BASE_PROCESS_CmdEvent> @line<538> msg<Processing OMX_CommandStateSet>
    N:VPSS  P:2 #:02473 T:0000006becd39555 S:Module<OMX.TI.VPSSM3.CTRL.TVP> Entering<_OMX_BASE_HandleStateTransition> @line<316>
    N:VPSS  P:2 #:02474 T:0000006becd3f087 S:Module<OMX.TI.VPSSM3.CTRL.TVP> @<_OMX_BASE_HandleStateTransition> @line<375> msg<Idle to Executing Transition>
    N:VPSS  P:2 #:02475 T:0000006becd468db S:Entered: _OMX_CTRLTvpDrvStart @ line 631
    N:VPSS  P:2 #:02476 T:0000006becd4aebd S:Starting Video Decoder Capture Driver
    N:VPSS  P:2 #:02477 T:0000006becd5583f S: CAPTUREAPP: Detect video in progress for inst 0 !!!
    N:VPSS  P:2 #:02478 T:0000006bef392c45 S: CAPTUREAPP: Detected video at CH0 (801x1125@29Hz, 1)!!!
    N:VPSS  P:2 #:02479 T:0000006bf1a19b5b S: CAPTUREAPP: Detected video at CH0 (801x1125@29Hz, 1)!!!
    N:VPSS  P:2 #:02480 T:0000006bf40ada05 S: CAPTUREAPP: Detected video at CH0 (801x1125@29Hz, 1)!!!
    N:VPSS  P:2 #:02481 T:0000006bf672819f S: CAPTUREAPP: Detected video at CH0 (801x1125@29Hz, 1)!!!
    N:VPSS  P:2 #:02482 T:0000006bf8dafa11 S: CAPTUREAPP: Detected video at CH0 (801x1125@29Hz, 1)!!!

    this lines keep repeating forever, it does stop if I connect the bluray player, but it give still the wrong resolutions.


    Are these known problems ? What is the work around?

    Can I use capture_encode with SD RCA input on this board?  or is there another way to capture video from the SD RCA video input?

    Regards,

    Richard



  • Richard,

    So I assume BlueRay player is working. Detected resolution could be wrong sometimes but fps it says correct. for 1080p30 have you change the parameters to to 1080p30 capture ? We do not have SD capture support with EIO card.

    Regards

    Vimal

  • i have tried 720P and 1080P and get the same bad detection.

  • Richard,

    We have seen reporting bad resolution, but it works fine. We have tesetd 720p60 with PS3 in our test setup. In your setup too, It is working with BlueRay player right ?

    Regards

    Vimal

  • My bluray player doesn't work well I do get an output in the file but the video is distorted because the input is 1080p and the detect resolution is something like 800x400 . If I connect the Bluray player to HDMI and component at the same time the detection doesnt work at all.

    I can try the PS3 player input.

    Do you have a bug system that will let me know when the bad resolution detection will get fixed?