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.

How to capture and display video on the DM816x evm board?

 I was an embedded novice being developed dm816x, but I can not find the video capture and display routines, can anyone tell me how to find related routines or the development of the manual?I am very gratefulIn addition, to add that I use EVM type of dm816x

  • it would be better to told us your application because there're different software for different application such as "thin client","dvr",or something else.

  • Jack1234 ,I am very grateful to your answers, I use software EZSDK! Expect your answer.

  • Hello,


    Regarding EZSDK, you could use OMX or gstreamer:

    EZSDK contain  capture_encode demo.

    You could check here for more information:

    http://processors.wiki.ti.com/index.php/OMX_EZSDK_Examples#Capture_Encode

    Best regards,

    Margarita

  • Hello,

    You could check:

    /ti-ezsdk_dm816x-evm_5_05_02_00/component-sources/omx_05_02_00_48

    OMX_05_02_00_48_UserGuide.pdf

    If you want to use v4l2:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide

    Best Regards,

    Margarita


  • Margarita,thank you very much Replies!

  • Hi margarita,

    I have been trying to use the gst pipeline on the DM8148 EVM board through hyperterminal you can see that in the attached document.

    I am confused when I run the same command on my PC this runs fine and an avi file is generated, but gives some error saying MODE SET IS 0.

    Can you please help me.

    Regards,

    Baz

    1104.Screen_shot.doc

  • Hello,

    basavaraju Gandla said:
    I am confused when I run the same command on my PC this runs fine and an avi file is generated, but gives some error saying MODE SET IS 0.

    Are you using the saLoopBack demo or you are running the gstreamer?

    What is your use case?

    What is your video source and how is connected to the board?

    What is the ezsdk version that you are using here?

    Are you using EVM or custom board?

    Could you post me the console log?

    Best Regards,

    Margarita

  • Hi Margarita,

    I am not using saLoopBack, I am running gstreamer.

    The video source is USB webcam, Logitech c100.

    The ezsdk version is 5_05_02_00.

    I am using EVM board.

    Regards,

    Baz

  • Hello,

    EZSDK demos does not support capturing from USB camera. You need to use other linux apps(mplayer/ffmpeg) over uvcVideo host driver, to capture video from USB camera.

    EZSDK demos support capture through component input. Here is some useful links:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_VIDEO_CAPTURE_Driver_User_Guide

    http://processors.wiki.ti.com/index.php/DM81xx_AM38xx_Adding_External_Decoders_to_V4L2_Capture_Driver

    Best Regards,

    Margarita

  • Hi Margarita,

    Can you please guide me in compiling the capture_ encode application which is in

    component-sources/omx_05_02_00_48/examples/ti/omx/demos.

    If I make any changes in this file do I need to compile it as

    make omx

    or

    do we have any other alternative to compile this application separately just for it self.

    I have been trying to compile it using

    make -C /usr/local/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode CORE=a8host

    But, did not get success.  I get the following error :-

    make: Entering directory `/usr/local/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode'
    makefile:62: /makerules/common.mk: No such file or directory
    make: *** No rule to make target `/makerules/common.mk'.  Stop.
    make: Leaving directory `/usr/local/ezsdk/component-sources/omx_05_02_00_48/examples/ti/omx/demos/capture_encode'

    The makerules/common.mk file is attached please check it.

    Regards,

    Baz

    # Filename: common.mk
    #
    # Common make file - This file has common rules and definitions that are common
    #                    across platforms/cores/ISAs/SoCs
    #
    # This file needs to change when:
    #     1. common rule/define has to be added or modified
    #
    
    #
    # Include make paths and options for all supported targets/platforms
    #
    
    include $(ROOTDIR)/makerules/build_config.mk
    include $(ROOTDIR)/makerules/env.mk
    include $(ROOTDIR)/makerules/platform.mk
    
    #.DEFAULT_GOAL := all
    
    .PHONY : all clean gendirs m3video m3vpss c6xdsp host
    
    all : $(CORE)
    
    # Define directories that are going to be created as a part of build process
    ifdef MODULE_NAME
      ifeq ($($(MODULE_NAME)_PLATFORM_DEPENDENCY),yes)
        ifeq ($($(MODULE_NAME)_CORE_DEPENDENCY),yes)
          DEPENDENCY_SUB_PATH = $(PLATFORM)/$(CORE)
        else
          DEPENDENCY_SUB_PATH = $(PLATFORM)/$(ISA)
        endif
      else
        ifeq ($($(MODULE_NAME)_CORE_DEPENDENCY),yes)
          DEPENDENCY_SUB_PATH = $(CORE)
        else
          DEPENDENCY_SUB_PATH = $(ISA)
        endif
      endif
    endif
    
    ifeq ($(DEST_ROOT),)
     ifdef MODULE_NAME
      OBJDIR = obj/$(DEPENDENCY_SUB_PATH)/$(PROFILE_$(CORE))
      LIBDIR = lib/$(DEPENDENCY_SUB_PATH)/$(PROFILE_$(CORE))
     else
      OBJDIR = obj/$(PLATFORM)/$(CORE)/$(PROFILE_$(CORE))
      BINDIR = bin/$(PLATFORM)
     endif
    else
      ifdef MODULE_NAME
        OBJDIR = $(DEST_ROOT)/$($(MODULE_NAME)_RELPATH)/obj/$(DEPENDENCY_SUB_PATH)/$(PROFILE_$(CORE))
        LIBDIR = $(DEST_ROOT)/$($(MODULE_NAME)_RELPATH)/lib/$(DEPENDENCY_SUB_PATH)/$(PROFILE_$(CORE))
      else
        OBJDIR = $(DEST_ROOT)/$(APP_NAME)/obj/$(PLATFORM)/$(CORE)/$(PROFILE_$(CORE))
        BINDIR = $(DEST_ROOT)/$(APP_NAME)/bin/$(PLATFORM)
      endif
    endif
    
    CONFIGURO_DIRNAME = $(APP_NAME)_configuro
    ifeq ($(XDC_CFG_DIR),)
     CONFIGURO_DIR = $(OBJDIR)/$(CONFIGURO_DIRNAME)
     XDC_CFG_FILE_NAME = $(XDC_CFG_FILE_$(CORE))
    else
     CONFIGURO_DIR = $(XDC_CFG_DIR)/configuro/$(PLATFORM)/$(CORE)/$(PROFILE_$(CORE))/$(CONFIGURO_DIRNAME)
    # XDC_CFG_FILE_NAME = $(XDC_CFG_DIR)/$(XDC_CFG_FILE_$(CORE))
     XDC_CFG_FILE_NAME = $(XDC_CFG_FILE_$(CORE))
    endif
    
    DEPDIR = $(OBJDIR)/.deps
    DEPFILE = $(DEPDIR)/$(*F)
    
    # Create directories
    $(OBJDIR) :
    	$(MKDIR) -p $(OBJDIR)
    
    $(DEPDIR) :
    	$(MKDIR) -p $(DEPDIR)
    
    $(LIBDIR) :
    	$(MKDIR) -p $(LIBDIR)
    	$(MKDIR) -p $(DEST_ROOT)/$(PROFILE_$(CORE))
    
     
    $(BINDIR) :
    	$(MKDIR) -p $(BINDIR)
    
    $(CONFIGURO_DIR) :
    	$(MKDIR) -p $(OBJDIR)
    	$(MKDIR) -p $(DEPDIR)
    	$(MKDIR) -p $(CONFIGURO_DIR)
    
    #
    # Common variables
    #
    
    # Assemble list of source file names
    SRCS = $(SRCS_COMMON) $(SRCS_$(CORE)) $(SRCS_$(SOC)) $(SRCS_$(PLATFORM))
    
    # Define search paths
    VPATH = $(SRCDIR)
    
    # Following 'if...' block is for an application.
    ifndef MODULE_NAME
      # Derive list of all packages from each of the components needed by the app
      PKG_LIST = $(foreach COMP,$(COMP_LIST_$(CORE)),$($(COMP)_PKG_LIST))
    
      # For each of the packages (or modules), get a list of source files that are
      # marked to be compiled in app stage of the build (or in the context in the app)
      SRCS_APPSTG_FILES = $(foreach PKG, $(PKG_LIST), $($(PKG)_APP_STAGE_FILES))
      # The app has to compile package cfg source files in its context. The name 
      # of the file assumed is <MOD>_cfg.c under the top-level directory - i.e. 
      # specified by <MOD>_PATH variable
      #SRCS_CFG = $(addsuffix _cfg.c,$(PKG_LIST))
      SRCS += $(SRCS_APPSTG_FILES)
      PKG_PATHS = $(foreach PKG,$(PKG_LIST),$($(PKG)_PATH))
      VPATH += $(PKG_PATHS)
    endif
    
    # Change the extension from C to $(OBJEXT) and also add path 
    OBJ_PATHS = $(patsubst %.c, $(OBJDIR)/%.$(OBJEXT), $(SRCS))
    
    # Assemble include paths here
    INCLUDE_EXTERNAL = $(foreach INCL,$(INCLUDE_EXERNAL_INTERFACES),$($(INCL)_INCLUDE))
    INCLUDE_ALL = $(CODEGEN_INCLUDE) $(INCDIR) $(INCLUDE_EXTERNAL)
    
    # Add prefix "-I" to each of the include paths in INCLUDE_ALL
    INCLUDES = $(addprefix -I,$(INCLUDE_ALL))
    
    # Create rule to "make" all packages
    .PHONY : $(PKG_LIST)
    $(PKG_LIST) : 
    	$(ECHO) \# Making $(PLATFORM):$(CORE):$(PROFILE_$(CORE)):$@...
    	$(MAKE) -C $($@_PATH)
     
    # Get libraries for all the packages
    # LIBS = $(foreach LIB,$(PKG_LIST),$(LIB).$(LIBEXT))
    define GET_COMP_DEPENDENCY_SUB_PATH
      ifeq ($$($(1)_PLATFORM_DEPENDENCY),yes)
        ifeq ($$($(1)_CORE_DEPENDENCY),yes)
          $(1)_DEPSUBPATH = $(PLATFORM)/$(CORE)
        else
          $(1)_DEPSUBPATH = $(PLATFORM)/$(ISA)
        endif
       else
        ifeq ($$($(1)_CORE_DEPENDENCY),yes)
          $(1)_DEPSUBPATH = $(CORE)
        else
          $(1)_DEPSUBPATH = $(ISA)
        endif
      endif
    endef
    
    $(foreach LIB,$(PKG_LIST),$(eval $(call GET_COMP_DEPENDENCY_SUB_PATH,$(LIB))))
    
    ifeq ($(DEST_ROOT),)
    LIB_PATHS = $(foreach LIB,$(PKG_LIST),$($(LIB)_PATH)/lib/$($(LIB)_DEPSUBPATH)/$(PROFILE_$(CORE))/$(LIB).$(LIBEXT))
    else
    LIB_PATHS = $(foreach LIB,$(PKG_LIST),$(DEST_ROOT)/$($(LIB)_RELPATH)/lib/$($(LIB)_DEPSUBPATH)/$(PROFILE_$(CORE))/$(LIB).$(LIBEXT))
    endif
    
    # XDC Specific defines
    ifneq ($(XDC_CFG_FILE_$(CORE)),)
      ifeq ($(PROFILE_$(CORE)),debug)
    #    CFG_CFILENAMEPART_XDC =$(EXEEXT)
        CFG_CFILENAMEPART_XDC =p$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
      endif
      ifeq ($(PROFILE_$(CORE)),whole_program_debug)
        CFG_CFILENAMEPART_XDC =p$(FORMAT_EXT)$(ISA)$(ENDIAN_EXT)
        CFG_LNKFILENAMEPART_XDC=_x
      endif
      CFG_CFILE_XDC =$(patsubst %.cfg,%_$(CFG_CFILENAMEPART_XDC).c,$(XDC_CFG_FILE_$(CORE)))
      CFG_C_XDC = $(addprefix $(CONFIGURO_DIR)/package/cfg/,$(CFG_CFILE_XDC))
      XDCLNKCMD_FILE =$(patsubst %.c, %$(CFG_LNKFILENAMEPART_XDC).xdl, $(CFG_C_XDC))
      CFG_COBJ_XDC = $(patsubst %.c,%.$(OBJEXT),$(CFG_CFILE_XDC))
    #  OBJ_PATHS += $(CFG_COBJ_XDC)
      LNKCMD_FILE = $(CONFIGURO_DIR)/linker_mod.cmd
      SPACE := 
      SPACE += 
    #  XDC_GREP_STRING = $(CONFIGURO_DIRNAME)
      XDC_GREP_STRING = $(CFG_COBJ_XDC)
    #  XDC_GREP_STRING = $(subst $(SPACE),\|,$(COMP_LIST_$(CORE)))
    #  XDC_GREP_STRING += \|$(CONFIGURO_DIRNAME)
    endif
    
    # Include make rules for ISA that is built in this iteration
    #   eg: rules_m3.mk
    include $(ROOTDIR)/makerules/rules_$(ISA).mk
    
    ifdef MODULE_NAME
    # Rules for module; this iteration is for a module
    
    # Clean Object and Library (archive) directories
    clean :
    	$(RM) -f $(OBJDIR)/* $(DEPDIR)/* $(LIBDIR)/*
    
    # Create dependencies list to ultimately create module archive library file
    $(CORE) : $(OBJDIR) $(DEPDIR) $(LIBDIR) $(LIBDIR)/$(MODULE_NAME).$(LIBEXT)
    
    else
    # Rules for application; this iteration is for an app
    
    # Clean Object, Binary and Configuro generated directories
    clean :
    	$(RM) -rf $(CONFIGURO_DIR)
    	$(RM) -f $(OBJDIR)/* $(DEPDIR)/*
    
    # Create dependencies list to ultimately create application executable binary
    $(CORE) : $(OBJDIR) $(BINDIR) $(DEPDIR) $(CONFIGURO_DIR) $(PKG_LIST) $(BINDIR)/$(APP_NAME)_$(CORE)_$(PROFILE_$(CORE)).$(EXEEXT)
    
    endif
    
    # Nothing beyond this point
    
    

  • Hi,

    I want to modify the capture_encode example by masking the capture code. Instead of reading frames from  camera source, Can I read a stored raw YUV file, encode and save it.

    I want to try this as my camera source is not yet ready. So with the capture_encode application I want take a stored raw video file (YUV) -> encode(h264) -> save it. 

     Is this possible ?

    If yes, what sort of changes do I have to make in the code.

    Regards,

    Baz