[Live-devel] Live video and audio streaming using one RTSPServer

Daniel Yacouboff danielya at essence-grp.com
Wed Nov 4 02:56:45 PST 2015


Hello there,
I've been working on your library for a while now, in order to implement a RTSP server, streaming live audio and video.
The audio and video packets are received via TCP from another service, each type of packet (audio\video) to another socket.
What I did was creating a new sub-classes of MediaSubsession, one for PCM audio and one for H264 video, and for each one created a new framed source, similar to ByteStreamFileSource, where in their doReadFromFile() I call recv() to the relevant socket instead of fread().
In my main, I just open the TCP sockets, create an RTSP server and add the two subsessions to it.

It works fine when I play video alone, or audio alone, but when I combine them the video usually stuck after a short while (~30 seconds) and the audio keeps playing ok.
In addition, during the time both of them played ok, they are not synched.

What am I doing wrong? I've read a lot about it and it seems my presentation times are not ok, but how can I calculate them properly?
Please advise, I've been working on this forever, and I'm sure it'll be useful for others as well.

Thanks.

[cid:image001.png at 01D11700.3D6DA610]
[cid:89F8E3BA-1F79-4C4C-8A6E-85F03F7A4235]<https://www.facebook.com/essencegrp?ref=hl> [cid:7F760DA7-8206-4E09-A8F6-4CDFCDE78235] <https://twitter.com/Essence_grp>  [cid:8622F469-70CD-439D-A066-E8D9B17BC323] <https://www.youtube.com/channel/UCOdUAVC7QmDoSZGyHMOjwUg>  [cid:D211F5B7-C986-4790-B65C-1F8CB6060BF6] <http://www.linkedin.com/company/865102?trk=tyah&trkInfo=tas:essence%20g,idx:1-1-1>  [cid:E725C345-8B3D-479D-8316-D67F8293CEE1] <https://plus.google.com/u/0/107922789033407857840/posts>

Daniel Yacouboff
QA and SW Engineer

T: +972(73)2447-945 M: +972(54)6805-505<mailto:+972%2073%202447-757>
E: danielya at essence-grp.com  | www.essence-grp.com<http://www.essence-grp.com/>

Come and meet us at our next events
[cid:C4E7A1B1-AD2C-4A03-A68D-37EC473A58FF]<http://events.essence-grp.com/>
[cid:C59C7C8C-355B-4458-9F7A-9A490896466E]<mailto:info at essence-grp.com>



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 5749 bytes
Desc: image001.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image002.png
Type: image/png
Size: 1219 bytes
Desc: image002.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 1165 bytes
Desc: image003.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image004.png
Type: image/png
Size: 1129 bytes
Desc: image004.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image005.png
Type: image/png
Size: 1278 bytes
Desc: image005.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.png
Type: image/png
Size: 1473 bytes
Desc: image006.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0005.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.png
Type: image/png
Size: 35699 bytes
Desc: image007.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0006.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.png
Type: image/png
Size: 9595 bytes
Desc: image008.png
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20151104/1e9b85b8/attachment-0007.png>


More information about the live-devel mailing list