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.

DM355: Streaming encoded video

Hello,
I am using the DM355 evaluation module to compress video and transmit it. Right now the encode codec creates a file and this file is transmitted. So this is a two step process and the video is not transmitted in real time. However my goal is to make this a real time process. We are using the live555 to do the transmitting. What are the steps to change the encode source code and the live555 code to make this a real time process? Any help would be greatly appreciated.
 
Thank You,
Kushal

  • I am not too familiar with Live555, but have compiled it for DM6446 in the past.  Since this is a tool for streaming data, I would imagine you may need to change encode demo to make sure buffers are managed correctly and data is not starved or dropped and call on live555 to stream the data.  As I understand it live555 is a library, so I would not imagine you need to change its source code.

  • I also thought that the encode demo has to be changed. From looking at all the source files, I believe that the file that has be changed is the video1.c inside the while loop "while (!gblGetQuit())". Am I right? Also if there other programs/libraries that can be used stream live video, I am willing to consider it.

     

  • video1.c is probably the correct file, the buffer returned from VIDENC1_process is the encoded video data that is written to a file; in your case, instead of writing to a file, you would stream it. 

    I believe live555 is better from streaming, but you may want to consider gstreamer as well; gstreamer also has streaming capabilities and is a bit more popular than live555 within the DaVinci community.  There is an App Note that was written for DM644X that should be mostly applicable to DM355 as well.

    http://focus.ti.com/lit/an/spraaq9/spraaq9.pdf

     

  • Hi, Streaming on real time requires you add an streaming container like mpeg4 with sdp files. Live555 doesn't offer really good support for this and I think you will be better off taking a look at the code in the mpeg4ip project and their mp4live application. Gstreamer is a good solution too (and our company provides Gstreamer plugins for DM355 codecs), but it doesn't provide a rtsp solution at this point, only the rtp streaming capabilities, so you will be needing to write your own rtsp server implementation on existing libraries. Regards, Diego
  • Diego,

    Does your company have a streamer solution to create a .avi container file directly from the DM355?

  • I have trying the mp4live to stream mpeg4 videos from DM355 (have already try live555 too but it doesn't support mpeg4 format,only m4e) but mp4live have an user interface and i can´t open it on DM355,it tells me that can not open the display. Somebody knows about other solution to do real time streming of mpeg4 video or a way to use live555 to do that??Thanks

  • We've been successful in integrating Live555 into the DM6446/DM355/DM357 for our streaming needs. It is an easy to use library that you statically link to your base application - we went down the route as well of modifying the encode demo, instantiating a thread for the streaming thread and buffer management to ensure liveMedia is satisfied.

    With this approach, we've been able to stream H.264, MPEG4, MJPEG with complete SDP support as well as confirmed playback in VLC, Quicktime and MPlayer.

    I'd recommend going with Live555 first as it has a built in RTSP server (i think GStreamer doesn't have an RTSP Stack on board, but does stream standard RTP streams without connection setups). It is easy to cross-compile and to link in to the application. The provided test programs can help you with instantiation instructions.

     

    Jerry Johns
    Design Engineer
    Nuvation Research Incorporated - Canada

  • I streram encoded data directly to socket. On PC I catch it with netcat and play with ffmpeg. It much more simplier than gstreamer.

  • Jerry,thanks for the answer...

    I see that you can use live555 integrated with DM355. unfortunately i can´t understand how you do it...Could you be more specific and explain me  what the steps i need to do to achieve that?what files i have to edit and what changes i need to do?My goal is real time streaming from DM355 to a client PC with VLC. I would appreciate your help...Thanks

  • Hi, Johns. Will you please give me some hints on how to stream ream-time capturing?  compress to a temp file or some other way.  Thanks in advance.

  • The basic gist of it is to cross-compile LiveMedia and link it in statically (or dynamically) into the encode demo application - you can run it on a separate thread (see the test programs on how to use livemedia)

    From there, you'll need to make a class within LiveMedia that can receive data between threads using fifos or something other mechanism. Combine that with an H.264 framer or MPEG4 Elementary framer, and you've got real-time streeaming :)

  • What version of the Montavista Tool Chain are you all using?

     

    I cannot get the live555 library to do anything useful with MVL 5.0.0 as the first c++ exception that live555 throws causes the application to abort. 

     

    What version of live555 is this?

  • [RESOLVED] As MVL 5.0.0 ships on the CDs for arm_v5t_le, the c++ exceptions don't work. However, there is a patch available from Montvista for GCC and Libstdc++ and Libgcc which fix the issue

  • Jeffery, does that patch require a support contract or is it availabel to everyone?

  • I believe it requires support.

  • Jeffery, I have the same problem of getting the patch.

    We paid the Montavista for support, but I do not know what is the name of the patchs. there are hundreds of patches on Montavista website.

    Would you please be more specfic about the infor of the patch?

    Thanks a lot.

  • You don't actually have to use the montavista site.

    If you have MVL5 installed on a Linux machine properly.... then you can use the mvl-apt-get tool to upgrade your MVL5 packages.

    Directions for those mvl tools can be found in the man pages or on the montavista website.

    I believe the relevant packages were (close to):

    host-gcc

    host-libc

    host-libgcc

    target-libgcc

     

  • Jerry,

    Thanks for your comments before. I am looking at LiveMedia library about H264 streaming.

    One thing I am not sure is how to process H264 frames before puting them into RTP packet. I stored h264 stream coming from DM365 encoder into a file. The files shows each H264 frame starts with code "0x00000001". Should  this code be removed before puting into RTP packet?

    If yes, will H264VideoRTPSource add the start code back?

    Thanks a lot.

    Tao

     

  • Jerry,

    Would you please give some hints about what is the parameter setup of sprop_parameter_sets in SDP descriptions?

    are the sps and pps just the first 2 frames excepting for the start code '00000001'? or there is a special format (structure) requirement?

    Thank you.

    Tao

     

  • hi there,

    I am a undergraduate student doing a live streaming of h,264 on dm6446. So far i have managed to

    stream encoded file over the network. I used live555 for my streaming needs. I was wondering how to

    remove the file and do live streaming, I read that jerry had managed to accomplish this before. I read his post but

    i am still unclear. How do i change the encode demo code and the live555 code to achieve this. I need to sort this out pretty quick

    as my deadline is coming near. It also be very useful if i can get some reference code in order for me to achieve this. Thanks for ur help

    My personal email is ansary858@hotmail.com .

    Regards

    Ansary