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.

an issue of playing video clip with audio on dvm355.

Other Parts Discussed in Thread: TMS320DM355, TMS320DM6446

All,

Now i have a serious issue with playing hd video clip with audio on DM355 demo board (720P video & sample rate = 16Kbps mp3 audio). I found the hd video will stop during play after 1 hour. Music was still running and video was freezed.

I used the same thread management as demo on DVM.(video decoder thread, video display thread, audio play thread).

Please give me some help. Thanks.

 

Best Regards,

Jeff

  • Jeff,

    what are you using to play back audio and video (assuming MPEG4)?  Your modifed version of demos... Is audio also decoded ir is it just passthru?  I am pinging other internal teams on this, but as I said in my previous post, we do not find any fiiled bugs with the symtoms you described here.  If you can do minor tests for memory leaks, tha may help get us to a faster resolution. 

  • Juan,

    Thanks for your relpy. I used the demo version (dvsdk_1_30_00_40). Audio clip is mp3 format (sample rate = 16kbps). I used the mad mp3 decoder to decode audio clip. I have traced the memory usage on my DM355 EVM. I have no found any memory leak on it.

    I used the audio driver that is OSS interface. I found the EDMA can not response any interrupts of DMA transfer after running some time. Please give me some ideas. Thanks very much.

     

    Best Regards,

    Jeff

  • You previous post suggested the video stopped, as opposed to OSS audio.  Are they both stopping? 

    Does this only happen when both audio and video are plying together or have you seen this when only video is playing?

    As I said, we have not seen this issue, so if this is indeed a issue with the hardware or Linux drivers, we would need a way to reproduce this so we can look into it.  Since we do not debug proprietary customer applications, ideally if you can reproduce this using the dvsdk demos (e.g. can they run for two hours or so) this will give us something to look at.  Unfortunately I am working remotely and away from my EVM to try this myself. 

  • I played the video and audio tegether. after 1 hour video was freezed but audio was still running. I used the code of decode demo on DM355 EVM. Only added a thread to playing audio clip with mp3 format (sample rate = 16khz). I think it is related to DMA transfer. Your much help is appreciated. Thanks.

    Yes, it was happened only when both audio and video were playing together.

    Best Regards,

    Jeff

  • I found the oss audio driver exists a bug that audio stalls during reading or writing data to audio device from linux-davinci-open-source forum. My playback av(audio + video) clip issue is related to this bug?
    How to fix that audio driver stalls bug? Can I code a logic to avoid (hide) my playback issue? I want to keep the playback running still. Thanks in advance.

    Best Regards,

    Jeff

  • Jeff,

    Thank you for continuing to make progress; this certainly helps narrow down the issue.

    Where did you read about this oss bug?  Our PSP documentation list (LSP 1.20 Linux Drivers Data Manueal also known as SPRS496.pdf) lists supported driver features as well as contraints; additionally, the LSP release notes lists known issues.  I did not see an issue similar to the one you are seeing in either manual, so I am curious where you read about this bug.

    FYI, I am going to investigate if anyone has tried playing mp3 audio file for a long time (1+ hour) on our EVM.

  • Juan,

    Please check it as the following link :

    http://www.mail-archive.com/davinci-linux-open-source@linux.davincidsp.com/msg05881.html

    Could you please show me how to avoid my video freezed issue? Thanks.

    Best Regards,

    Jeff

  • Here is what I have from my investigation with our internal teams.  Apparently, there was one customer who reported a similar problem, and after many debug sessions, we reached the following conlcusions.

    1) We did not see this issue when testing LSP 1.20; however, when testing the DVSDK, the problem turned out in DVSDK system testing (after 8+ hours)

    2) The Audio driver sets a default sample rate of 48KHz during init (before the McBSP is reset). The decode demo then sets the sample rate to 8KHz in run-time, using an IOCTL. When this IOCTL is called in the driver we just change the sample rate (on-the-fly), with McBSP is active. It seems we cannot set the sample rate while McBSP is still active, from a hardware perspective.

    workaround: If we do match the sample rate settings (init and run-time), there is no hang issue. For this customer, as a temporary solution was to match the sample rate settings (default and run-time).  The actual solution should be to put the McBSP in reset, change the sample rate and then bring McBSP out-of-reset, when the IOCTL is called (similar to the init sequence)

  • Juan,

    thank for your great help. Is my video freezed issue related to this issue? If playback only video clip, it is ok. Once playback video with audio clip, the video freezed issue turned out.

    Could you please tell me if i can avoid this issue and make the playback continue running. Thanks.

     

    Best Regards,

    Jeff

  • We believe is related as this issue only happens when audio is playing.   A quick test would be to make sure the user application has the same settings as the driver (48KHz) and see if that makes the problem go away.  If so, then you can proceed to implement the reset process discussed in my previous post.

  • Juan,

    I has already changed the same settings at (default & run-time) in the audio driver(davinci-audio-aic33.c). And I have done a strong test. I still got the same issue (video was freezed).

    Your help is much appreciated. Thanks.

     

    Best Regards,

    Jeff

  • Juan,

    How about this issue? Did you have any news? Thanks very much.

     

    Best Regards,

    Jeff

  • Jeff,

    I am at the airport coming back from my vacation today; I whould be back in the office tomorrow.  In order for our development team to dig further into this, we will need to reproduce this on our EVM, hence anything you can do on your end (e.g. provide sample program) to help me reproduce this would help us resolve this quicker.  I am boarding my plane so I will be in touch tomorrow.

  • Juan,

    How about the audio stalls issue? I have been waiting for fix. Thanks.

     

    Regards,

    Jeff

  • I apologize for the delay; unfortunately, I have not been able to reproduce this yet. 

  • Juan,

    Could you please show me how to use v4l2 to display video data instead of using framebuffer? Thanks very much.

     

    Regards,

    Jeff

  • Are you aware of the V4L2 example under PSP_01_20_00_014/examples/v4l2 directory (under DVSDK installation)?  It captures and displays using V4L2.

     

  • Juan,

    Could you please tell me if TMS320DM355 216 can support the operation temperature range -40 to 100 ? Thanks very much.

    BR,

    Jeff

  • Juan,

    Another issue :

    Do you know how to make DVB-S system based on DM355 chip? I need to decode MPEG4-TS/encode MPEG4-TS stream from/to satellite broadcast on DM355. Much help is appreciated. Thanks.

    Jeff

  • YHLShareware said:

    Could you please tell me if TMS320DM355 216 can support the operation temperature range -40 to 100 ? Thanks very much.

    Yes, the 216 MHz version can support that temperature range, see product folder http://focus.ti.com/docs/prod/folders/print/tms320dm355.html

     

  • YHLShareware said:
    Do you know how to make DVB-S system based on DM355 chip? I need to decode MPEG4-TS/encode MPEG4-TS stream from/to satellite broadcast on DM355. Much help is appreciated. Thanks.

    DM355 primarily handles elementary streams; therefore, any transport stream processing to implement DVB-S system will have to be done in software.  Also, if you are dealing with satellite brodcasting to receive you compressed MPEG4 video data to be decodec in DM355, you may want to consider using DM365 instead.  It is very similar to DM355 in many ways, but most importantly, it can handle universal MPEG4 decoding.  The DM355 is limited in this respect as the MPEG-4 decoder in this part is not a universal decoder; this means it can only decode MPEG4 streams it has encoded; there are some software tools you can use to get around this limitation, but this may eat up precious CPU power you may need for other things such as stripping transport stream data from DVB-S stream.  The DM365 may help you avoid some of these extra steps.

  • Thanks for your help. TMS320DM6446 can handle universal MPEG4 decoding?  Thanks.

    Jeff

  • yes, DM6446 can also handle universal decoding (as well as OMAP35x, DM643x, DM648...)

  • Juan,

    What free software tools can use to get around the mpeg4 decoding limitation for DM355 except Arcsoft tool? ffmpeg can do it? Thanks.

    BR,

    Jeff

  • The tool we promote is ArcSoft's MediaConverter, although I have seen at least one customer claim he did it with ffmpeg.  The ArcSoft tool produces an AVI file, so you would still need to do further processing to get the elementary stream which our codecs work with.  I have seen customers trying to use gstreamer to get around AVI file, and this is a good approach especially if you need other features supported by gstreamer; however, if all you need gstreamer for is to get around AVI container, it may be easier (and probrably offer better performance) to learn enough about AVI format to strip out the container data yourself by writing your own program to do this...  

  • Juan,

    I want to make a tool to get arount the DM355 decoding limitation working on PC using FFMPEG, could you please tell me how to do it? Thanks.

    BR,

    Jeff

  • Jeff,

    I wish I could spend the time helping you on this noble mission.  Unfortunately, I am not familiar with FFMPEG and my focus at the moment is to keep learning TI software (FFMPEG is open source and not developed by TI) so that I can better support our customers with TI specific questions.  I can certainly try to help offer advice as I know a bit about video standards and such,... but at the moment I just do not have the bandwidth to learn FFMPEG.  Thank you for your understanding

    Since FFMPEG is open source, I would probrably try to find if there is an online community for this software that you can go to for basic questions.  Often having some of the community experts point you in the right direction can save you lots of head-aches and precious time.