Hi Ross,
On 01/17/2013 04:50 PM, Ross Finlayson wrote:
I'm trying to stream live H.264 video
and live G.711 audio, using
testMPEG1or2AudioVideoStreamer.cpp as an example.
I'm not sure how much of an 'example' the
"testMPEG1or2AudioVideoStreamer" code can be, given that it
streams from a file source, and uses completely different codecs
(and thus uses completely different "RTPSink" subclasses). But
anyway...
Well, that's the only example I've found that streams both video and
audio.
I was also looking at testWavAudioStreamer and
testH264VideoStreamer.
Both video
and audio come from hardware encoders. As soon as encoded
buffer
is available, live555 code is notified via event trigger
associated
with media source. I'm using VLC to play the stream.
The problem is that video freezes almost immediately.
If only video is streamed, there's no problem.
I suspect that audio can starve video since audio frame size
produced
by encoder is 160 bytes and some find of aggregation is
required.
Does this sound right ?
That's a possibility. However a more likely cause of problems
like this is that you are setting "fPresentationTime"
incorrectly for one or both of your audio and video substreams -
so they end up being non-synchronized at the receiver (VLC) end.
For each frame delivered by your input source,
"fPresentationTime" must be set properly, and must be aligned
with 'wall clock' time - i.e., the time that you'd get by
calling "gettimeofday()".
I do set fPresentationTime using gettimeofday() in my implementation
of DeviceSource. It's the same class for both video and audio.
Felix.
|
_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel