Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

DM368 DVSDK DVR MIA. Where is the code for the DVR?

Other Parts Discussed in Thread: TMDXEVM368

We purchased the DM368 EVM and the DVSDK said that a DVR was part of the sample apps or examples.  Where do we find this code?

 

I have tried to investigate the code for the DM355 that seems to have some reference to a DVR, but have not been successful in getting it to run.  We would like to be able to test out some time-shifting or progressive playback.  So we purchased the EVM because of the note that a sample DVR application was available.

 

Please help.

 

Thank you,

Brent

  • Brent,

    The DM368 EVM does have encode and decode examples within the DVSDK. Within the Matrix launcher application there are multimedia demos including video encode and decode. What do you mean by DVR sample apps? Since the EVM does not have all the input capabilities of the DM368 DVR reference design kit, it's not going to have the full blown DVR sample app.

    If you mean DM368 DVR RDK, such as this http://www.udworks.com/home01/eg/product/sub11.php then the DVR software is aviailable from the particular third party.

    If you mean DM368 EVM, such as http://www.spectrumdigital.com/product_info.php?cPath=37_105&products_id=232&osCsid=1ade19cb103faca9f951fe410148de62 , the DVSDK contains example apps for video encode & decode.

  • I understand that the system does not necessarily meet all of the requirements of a multi-channel DVR.  But a DVR is simply a function of recording and playing back audio and video content from a least one source to at least one output.  The TMS320DM36x Evaluation Module (EVM) at  http://focus.ti.com/docs/toolsw/folders/print/tmdxevm368.html contains all of the necessary components to perform a DVR function.  But as the samples do not seem to allow for any type of concurrent capture/encoding of both audio and video it seems that I have been mistaken.   

    Apparently I have missed understood the DVSDK's contents.  I was pretty sure that I had read on the ti.com site that one of the examples within the DVSDK was a DVR. Again I can see there is some kind of DVR function in the dvtb code of the DM355 namely DVREncDec.  How does one call this function inside of the dvtb?  I read the User Guide.  And it only makes a slight suggestion.  I have tried running this code on the DM368 EVM board and it begins but it is not able to correctly use the File Pointer fp after creating the file in the main loop.  It crashes.  I will try to post the output shortly.

    Do I need to start a new thread on how one would go about developing DVR functionality on the chip?

  • Am I allowed to post debug output messages from the dvtb DVSDK sample and EVM board here in the forum?

     

    Brent

  • Yes, you may post your debug messages.

    The TMS320DM386_Software_Developers_Guide within dvsdk/docs may be of help. This explains how to run  the included example demos/aps from the command line. The source is open & provided. Alternatively you can use the Martix GUI for pre-built examples. Capture, encode, decode, playback is all supported. You can change which input to capture from within the kernel bootargs.

  • <DVTB> $  func DVREncDec -t newtest1.mp4        

                                    
    [DVTB-LOG]: linux/dvtbFuncDispatcher.c: Starting Thread for command <DVREncDec>
    [DVTB-ERROR]: ../core/linux/dvtbMain.c: Assertion Failed :fp                   
    [DVTB-LOG]: ../core/linux/dvtbUtils.c: DVREncDec [File Read]+[Encode]+[Decode]+[
    Dump] usecase started.                                                         
    PNDG: func                                                                     
                                                                                   
    <DVTB> $ [DVTB-LOG]: ../core/linux/dvtbEngine.c: Engine <encodedecode> opened. 
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Video Encoders & Decoders <TotalInstances 4>
    initialized                                                                    
    [DVTB-ERROR]: ../core/linux/dvtbUtils.c: Assertion Failed :fp                  
    [DVTB-ERROR]: linux/dvtbDVREncDec.c: Error in file read                        
    [DVTB-ERROR]: linux/dvtbDVREncDec.c: Error in Read Input For Instance # 0      
    [DVTB-LOG]: linux/dvtbDVREncDec.c: DVREncDec completed for <0> frames          
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Video EncDecInstance# 0 <mpeg4enc> <mpeg4dec>
     closed                                                                        
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Video EncDecInstance# 1 <mpeg4enc> <mpeg4dec>
     closed                                                                        
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Video EncDecInstance# 2 <mpeg4enc> <mpeg4dec>
     closed                                                                        
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Video EncDecInstance# 3 <mpeg4enc> <mpeg4dec>
     closed                                                                        
    [DVTB-LOG]: linux/dvtbDVREncDec.c: Engine <encodedecode> closed                
    [DVTB-LOG]: ../core/linux/dvtbUtils.c: DVREncDec [File Read]+[Encode]+[Decode]+[
    Dump] usecase completed with errors.                                           

     

    We tried to test as suggested in the User Guide as I mentioned before and no matter what we put as parameters we can't seem to get the dvtb to actually work.

    Brent

  • Really what we are trying for is to simply get a audio/video loopback with some buffering in between.  We want to be able to capture audio and video then play them back synchronously after buffering them for a few seconds as we analyze the video.

    We were hoping that there was a demo that would be setup for us to do this easily.  Are there any demos/examples/samples that record and plays back both audio and video?

    I am currently looking at the encodedecode example which only works with the video.

     

    Brent

  • Yes, this is defintely possible. Within the DM368 SDK, ti-dvsdk_dm368-evm_4_01_00_09/docs, the software developers guide outlines the usage of a few different examples. One possibility is using a GStreamer pipeline. The DVSDK comes with GStreamer. You can follow the guide to create your own pipeline, or use an example such as on Page 9. "This pipeline decodes a .MP4 file with H264 video and AAC audio content on 720P component output".

    Another possiblity is running the Video and Audio examples from Page 6 simulatanously. For video, you can capture and loopback 1080P from component input to output. And for audio, you can encode AAC audio from the microphone input.

  • Thank you for the information.  I have run several of the demos from day one.  I have used ./encodedecode -I 3 -y 7 -v h264 -t 50 -b 4000000 -r 720x480 and it works great for the video portion.  I have even started to modify the demo to try to incorporate the encoding.  But I was hoping that there might be a way to directly perform some type of loopback without having to create a file and then read from that file because this could cause an A/V sync issue.

    How would you run the examples simultaneously?

    I have yet to come across an example of a loopback for audio.  Is there an example of this?  I have successfully run a GStreamer loop back but I don't think that is what you meant by the example reference.

    Thank you.

    Brent

     

  • Brent,

    I agree with your concerns on reading from a file. I haven't tried this myself personally, but I meant try running the first loopback in the background (&), then execute the next one. Or place them within a script to execute simultaneously. I understand that is not the best way to go about it, and a GStreamer pipeline would be better suited.

    Looking through the SDG, I see that you're right. I dont seem to see any Audio loopbacks. Any Video+Audio examples are missing here as well: http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines#Loopback:_Audio.2BVideo. However, within that link there does appear to be an Audio loopback example for the 365. I will try to find any internal updates on these Video+Audio sections.

  • I've heard that V/A loopbacks have been written, but have not yet found an online source. Since it looks like you have the video portion taken care of - I thought I would recommend one more thing: I've seen others use the aplay/arecord to create a simple command line audio loopback. Something as simple as piping arecord to aplay. Here is the man page: http://linux.die.net/man/1/aplay

    That would be similar to just using the loopback example here: http://processors.wiki.ti.com/index.php/Example_GStreamer_Pipelines#Loopback:_Audio_4

    Then just run your first loopback in the background & immediately kick off the next.

  • That sounds like a great idea.  I am sorry for my lack of knowledge, but how do you run a loopback in the background? Like ./encodedecode -I2 -y3 &?  Is this correct and then I can run the audio function?

     

    Thank you,

    Brent

  • So after trying several functions.  I was able to get the gst-launch audio and the encodedecode functions to work together.  But the audio is dropping thousands of samples.  So I have tried to run a bunch of different configurations to fix the audio and they all seem to drop when using the gst-launcher alsasrc ! alssink sync=false. 

    I guess this would be fixed if a DVR solution were available.  Michael have you had any luck tracking down the DVR functions for the DVSDK or any other samples?

     

    Thank you,

    Brent

  •            Like ./encodedecode -I2 -y3 &? 

    Exactly. You can go one step further and put your commands within a Linux script : http://www.linfo.org/create_shell_1.html

    I actually found that this DVR functionality (A+V loopback) is one of the first programs taught in TI's DaVinci workshop. Of course this is supported by third party sw for the DVR RDK, but I have yet to find an online example for the EVM. Were you able to get the aplay/arecord function a try?

  • I tried to get the aplay and record functions to work and they didn't output any sound.  It seemed like they were running but no audio.  I have actually got audio through the gst-launcher.  But again it drops samples and does stay in sync with the video when either or both are running in the background.

    I have found some reading material that shows a solution that could work with all GStreamer  both audio and video.  So we will go through more testing on that on Monday.  I'll let you know how it went. 

     

    So this DVR RDK, is it board specific?  Could I purchase/license it to work with my system?  This is taking too long to solve AV playback and buffering.

     

    Thank you,

    Brent

  • The RDK is board specific. I'm referring to something like: http://focus.ti.com/apps/docs/mrktgenpage.tsp?appId=79&contentId=54260

    It may be beneficial to create a new thread to focus on your audio solution.

  • After much searching and testing, we were able to find a solution to a loopback for both audio and video by using the GStreamer functions on the DM368 EVM board.  We take Component in and out and audio in and out.  It appears to be in sync and works like a charm.  The problem that is left is to now actually be able to work in the stream and retrieve information for the stream as it continues on through the board.  We also need to have some buffer.

    gst-launch -v v4l2src always-copy=FALSE  !  'video/x-raw-yuv, width=720,height=480,framerate=30/1' !  TIDmaiVideoSink hideOSD=false videoStd=720P_60 videoOutput=component contiguousInputFrame=TRUE sync=false alsasrc ! audio/x-raw-int, width=16, rate=16000, channels=1 ! alsasink sync=true

    This came from several different sites and people.  Two of which I would like to thank for their postings. Todd Fischer (on designsomething about the 355 LeopardBoard) and Jason Talley (from this community - Local AV loopback w/ alsasrc & v4l2 src).  And especially Brady Larson for his efforts in testing.

    I guess I will open another thread to further discuss a DVR solution, as I think this thread diverged a bit.  As there doesn't seem to be a DVR for this board or chip.

    The tests were finally successful.

    Brent