[Live-devel] streaming video and audio via RTSP
Mike Gilorma
mike.gilorma at apogeelabs.com
Fri Jun 13 08:07:49 PDT 2008
I've attached my test program, each stream has rtcp, and the timestamps
are being set using timeofday. The VLC says the streams are
synchronized, but I am looking into doing more debug on the client side.
It looks like the video is started streaming before the audio and that
is where the streams get out of sync. I noticed this because I was
outputting the timestamps and saw that when starting up the video
streams out data for a little bit before audio starts up.
thanks for the help,
mike
On Thu, 2008-06-12 at 22:56 -0700, Ross Finlayson wrote:
> >How do you go about streaming video and audio at the same time using
> >RTSP? I want to stream two elemental streams that I got out of a mp4
> >file to VLC and have them playback just as if I was watching the
> >original file. Using the testOnDemandRTSPServer I can open the video
> >stream in one instance of VLC and the audio stream in another instance
> >of VLC. How do you put the pieces together?
>
> Using a single "ServerMediaSession", containing two
> "ServerMediaSubsession" objects - one for video; the other for audio.
>
> Also, to ensure that the audio and video get synchronized at the
> client, you *must* give them accurate presentation times at the
> server end - and implement RTCP for each stream. Also (and this is
> important), the presentation times *must* correspond to 'wall-clock'
> time - i.e., the time that you would get by calling "gettimeofday()".
>
> If you do this, then the presentation times that come out the client
> end (after RTCP-synchronization) *will* be same as those that you
> gave the frames at the server end, and then the client will be able
> to use those to synchonize audio and video.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: elementStreamer.cpp
Type: text/x-c++src
Size: 1477 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20080613/ce4f8a8b/attachment.bin>
-------------- next part --------------
fileName = test.m4e
fileName = test.aac
creating new mpeg4 video file server media subsession
video file size = 21465361
playing dummy file
scheduling checkforauxsdpline task
checking for auxsdpline
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 284506
video timestamp: 1213369610 350506
video timestamp: 1213369610 350506
video timestamp: 1213369610 416506
video timestamp: 1213369610 416506
setting done flag for auxdspline
checking for auxsdpline
creating new stream source
creating new mpeg4 video file server media subsession
video file size = 21465361
creating new stream source
setting fTimestampBase: 1595972578
setting fTimestampBase: 2420410699
audio timestamp: 1213369610 389970
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 387410
video timestamp: 1213369610 453410
video timestamp: 1213369610 453410
audio timestamp: 1213369610 421970
audio timestamp: 1213369610 453970
video timestamp: 1213369610 519410
video timestamp: 1213369610 519410
audio timestamp: 1213369610 485970
audio timestamp: 1213369610 517970
video timestamp: 1213369610 585410
video timestamp: 1213369610 585410
audio timestamp: 1213369610 549970
audio timestamp: 1213369610 581970
video timestamp: 1213369610 651410
video timestamp: 1213369610 651410
audio timestamp: 1213369610 613970
audio timestamp: 1213369610 645970
video timestamp: 1213369610 717410
video timestamp: 1213369610 717410
audio timestamp: 1213369610 677970
audio timestamp: 1213369610 709970
video timestamp: 1213369610 783410
video timestamp: 1213369610 783410
audio timestamp: 1213369610 741970
audio timestamp: 1213369610 773970
video timestamp: 1213369610 849410
video timestamp: 1213369610 849410
audio timestamp: 1213369610 805970
audio timestamp: 1213369610 837970
video timestamp: 1213369610 915410
video timestamp: 1213369610 915410
audio timestamp: 1213369610 869970
audio timestamp: 1213369610 901970
video timestamp: 1213369610 981410
video timestamp: 1213369610 981410
audio timestamp: 1213369610 933970
audio timestamp: 1213369610 965970
video timestamp: 1213369611 47410
video timestamp: 1213369611 47410
audio timestamp: 1213369610 997970
audio timestamp: 1213369611 29970
video timestamp: 1213369611 387410
video timestamp: 1213369611 387410
video timestamp: 1213369611 387410
video timestamp: 1213369611 387410
video timestamp: 1213369611 387410
video timestamp: 1213369611 387410
audio timestamp: 1213369611 61970
audio timestamp: 1213369611 93970
audio timestamp: 1213369611 125970
audio timestamp: 1213369611 157970
audio timestamp: 1213369611 189970
audio timestamp: 1213369611 221970
audio timestamp: 1213369611 253970
audio timestamp: 1213369611 285970
audio timestamp: 1213369611 317970
audio timestamp: 1213369611 349970
audio timestamp: 1213369611 381970
video timestamp: 1213369611 453409
video timestamp: 1213369611 453409
video timestamp: 1213369611 453409
audio timestamp: 1213369611 413970
audio timestamp: 1213369611 445970
video timestamp: 1213369611 519410
video timestamp: 1213369611 519410
video timestamp: 1213369611 519410
audio timestamp: 1213369611 477970
audio timestamp: 1213369611 509970
video timestamp: 1213369612 387410
video timestamp: 1213369612 387410
video timestamp: 1213369612 387410
video timestamp: 1213369612 387410
video timestamp: 1213369612 387410
video timestamp: 1213369612 387410
audio timestamp: 1213369611 541970
audio timestamp: 1213369611 573970
audio timestamp: 1213369611 605970
audio timestamp: 1213369611 637970
audio timestamp: 1213369611 669970
audio timestamp: 1213369611 701970
audio timestamp: 1213369611 733970
audio timestamp: 1213369611 765970
audio timestamp: 1213369611 797970
audio timestamp: 1213369611 829970
audio timestamp: 1213369611 861970
audio timestamp: 1213369611 893970
audio timestamp: 1213369611 925970
audio timestamp: 1213369611 957970
audio timestamp: 1213369611 989970
audio timestamp: 1213369612 21970
audio timestamp: 1213369612 53970
audio timestamp: 1213369612 85970
audio timestamp: 1213369612 117970
audio timestamp: 1213369612 149970
audio timestamp: 1213369612 181970
audio timestamp: 1213369612 213970
audio timestamp: 1213369612 245970
audio timestamp: 1213369612 277970
audio timestamp: 1213369612 309970
audio timestamp: 1213369612 341970
audio timestamp: 1213369612 373970
video timestamp: 1213369612 453410
video timestamp: 1213369612 453410
audio timestamp: 1213369612 405970
audio timestamp: 1213369612 437970
video timestamp: 1213369612 519409
video timestamp: 1213369612 519409
audio timestamp: 1213369612 469970
audio timestamp: 1213369612 501970
video timestamp: 1213369612 585410
video timestamp: 1213369612 585410
audio timestamp: 1213369612 533970
audio timestamp: 1213369612 565970
video timestamp: 1213369612 651410
video timestamp: 1213369612 651410
audio timestamp: 1213369612 597970
audio timestamp: 1213369612 629970
video timestamp: 1213369612 717409
video timestamp: 1213369612 717409
audio timestamp: 1213369612 661970
audio timestamp: 1213369612 693970
video timestamp: 1213369612 783410
video timestamp: 1213369612 783410
audio timestamp: 1213369612 725970
audio timestamp: 1213369612 757970
video timestamp: 1213369612 849410
video timestamp: 1213369612 849410
audio timestamp: 1213369612 789970
audio timestamp: 1213369612 821970
audio timestamp: 1213369612 853970
video timestamp: 1213369612 915409
video timestamp: 1213369612 915409
audio timestamp: 1213369612 885970
audio timestamp: 1213369612 917970
video timestamp: 1213369612 981410
video timestamp: 1213369612 981410
audio timestamp: 1213369612 949970
audio timestamp: 1213369612 981970
video timestamp: 1213369613 47410
video timestamp: 1213369613 47410
audio timestamp: 1213369613 13970
audio timestamp: 1213369613 45970
video timestamp: 1213369613 113409
video timestamp: 1213369613 113409
audio timestamp: 1213369613 77970
audio timestamp: 1213369613 109970
video timestamp: 1213369613 179410
video timestamp: 1213369613 179410
audio timestamp: 1213369613 141970
audio timestamp: 1213369613 173970
video timestamp: 1213369613 245410
video timestamp: 1213369613 245410
audio timestamp: 1213369613 205970
audio timestamp: 1213369613 237970
video timestamp: 1213369613 311409
video timestamp: 1213369613 311409
audio timestamp: 1213369613 269970
audio timestamp: 1213369613 301970
video timestamp: 1213369613 377410
video timestamp: 1213369613 377410
audio timestamp: 1213369613 333970
audio timestamp: 1213369613 365970
video timestamp: 1213369613 443410
video timestamp: 1213369613 443410
audio timestamp: 1213369613 397970
audio timestamp: 1213369613 429970
video timestamp: 1213369613 509409
video timestamp: 1213369613 509409
audio timestamp: 1213369613 461970
audio timestamp: 1213369613 493970
video timestamp: 1213369613 575410
video timestamp: 1213369613 575410
audio timestamp: 1213369613 525970
audio timestamp: 1213369613 557970
video timestamp: 1213369613 641410
video timestamp: 1213369613 641410
audio timestamp: 1213369613 589970
audio timestamp: 1213369613 621970
video timestamp: 1213369613 707409
video timestamp: 1213369613 707409
audio timestamp: 1213369613 653970
audio timestamp: 1213369613 685970
video timestamp: 1213369613 773410
video timestamp: 1213369613 773410
audio timestamp: 1213369613 717970
audio timestamp: 1213369613 749970
video timestamp: 1213369613 839410
video timestamp: 1213369613 839410
audio timestamp: 1213369613 781970
audio timestamp: 1213369613 813970
video timestamp: 1213369613 905409
video timestamp: 1213369613 905409
audio timestamp: 1213369613 845970
audio timestamp: 1213369613 877970
audio timestamp: 1213369613 909970
video timestamp: 1213369613 971410
video timestamp: 1213369613 971410
audio timestamp: 1213369613 941970
audio timestamp: 1213369613 973970
video timestamp: 1213369614 37410
video timestamp: 1213369614 37410
audio timestamp: 1213369614 5970
audio timestamp: 1213369614 37970
video timestamp: 1213369614 103409
video timestamp: 1213369614 103409
audio timestamp: 1213369614 69970
audio timestamp: 1213369614 101970
video timestamp: 1213369614 169410
video timestamp: 1213369614 169410
audio timestamp: 1213369614 133970
audio timestamp: 1213369614 165970
video timestamp: 1213369614 235410
video timestamp: 1213369614 235410
audio timestamp: 1213369614 197970
audio timestamp: 1213369614 229970
video timestamp: 1213369614 301409
video timestamp: 1213369614 301409
audio timestamp: 1213369614 261970
audio timestamp: 1213369614 293970
video timestamp: 1213369614 367410
video timestamp: 1213369614 367410
audio timestamp: 1213369614 325970
audio timestamp: 1213369614 357970
video timestamp: 1213369614 433410
video timestamp: 1213369614 433410
audio timestamp: 1213369614 389970
audio timestamp: 1213369614 421970
video timestamp: 1213369614 499410
video timestamp: 1213369614 499410
audio timestamp: 1213369614 453970
audio timestamp: 1213369614 485970
video timestamp: 1213369614 565409
video timestamp: 1213369614 565409
audio timestamp: 1213369614 517970
audio timestamp: 1213369614 549970
video timestamp: 1213369614 631409
video timestamp: 1213369614 631409
audio timestamp: 1213369614 581970
audio timestamp: 1213369614 613970
video timestamp: 1213369614 697409
video timestamp: 1213369614 697409
audio timestamp: 1213369614 645970
audio timestamp: 1213369614 677970
video timestamp: 1213369614 763410
video timestamp: 1213369614 763410
audio timestamp: 1213369614 709970
audio timestamp: 1213369614 741970
video timestamp: 1213369614 829410
video timestamp: 1213369614 829410
audio timestamp: 1213369614 773970
audio timestamp: 1213369614 805970
video timestamp: 1213369614 895410
video timestamp: 1213369614 895410
audio timestamp: 1213369614 837970
audio timestamp: 1213369614 869970
video timestamp: 1213369614 961409
video timestamp: 1213369614 961409
audio timestamp: 1213369614 901970
audio timestamp: 1213369614 933970
audio timestamp: 1213369614 965970
video timestamp: 1213369615 27409
video timestamp: 1213369615 27409
audio timestamp: 1213369614 997970
audio timestamp: 1213369615 29970
video timestamp: 1213369615 93409
video timestamp: 1213369615 93409
audio timestamp: 1213369615 61970
audio timestamp: 1213369615 93970
video timestamp: 1213369615 159410
video timestamp: 1213369615 159410
audio timestamp: 1213369615 125970
audio timestamp: 1213369615 157970
video timestamp: 1213369615 225410
video timestamp: 1213369615 225410
audio timestamp: 1213369615 189970
More information about the live-devel
mailing list