[Live-devel] Adding secondary audio track to existing H264 RTP stream

Marcin marcin at speed666.info
Thu Mar 29 06:23:58 PDT 2018


Didnt want to cross post but this is a debug info from afterGettingFrame 
- microseconds delay between each calls of this function:
fDurationInMicroseconds 23219
Time diff 25142
fDurationInMicroseconds 23219
Time diff 44613
fDurationInMicroseconds 23219
Time diff 25751
fDurationInMicroseconds 23219
Time diff 24478
fDurationInMicroseconds 23219
Time diff 26883
fDurationInMicroseconds 23219
Time diff 38700
fDurationInMicroseconds 23219
Time diff 39877
fDurationInMicroseconds 23219
Time diff 44183
fDurationInMicroseconds 23219
Time diff 25986
fDurationInMicroseconds 23219
Time diff 40029
fDurationInMicroseconds 23219
Time diff 25459
fDurationInMicroseconds 23219
Time diff 24081
fDurationInMicroseconds 23219
Time diff 40059
fDurationInMicroseconds 23219
Time diff 44288

Why i have so huge gaps?
Marcin


W dniu 28.03.2018 o 22:47, Ross Finlayson pisze:
> Marcin,
>
> Reading your email once again, I realized that my first response wasn’t a proper answer to your question - because you are not transmitting the audio data (over RTP), but are instead are recording it into a Transport Stream file.  Because of this, you *do*, indeed, need to call "scheduleDelayedTask()” yourself - because our Transport Stream multiplexing code (“MPEG2TransportStreamFromESSource.cpp”) currently doesn’t do anything with the “durationInMicroseconds” parameter that it gets passed from the upstream source.  (That multiplexing code was written with the assumption that all input sources (for the Transport Stream) will be ‘live’ input sources (rather than pre-recorded data).  That’s not the case for your application.)
>
> Fortunately, there’s an easy way for you to do this - by changing the last statement (lines 169-170) of “ADTSFileSource.cpp” from
> 	nextTask() = envir().taskScheduler().scheduleDelayedTask(0, (TaskFunc*)FramedSource::afterGetting, this);
> to
> 	nextTask() = envir().taskScheduler().scheduleDelayedTask(fDurationInMicroseconds, (TaskFunc*)FramedSource::afterGetting, this);
>
> (As always, I don’t recommend changing our code ‘in place’.  Instead, you should define your own class name - e.g., “ModifiedADTSFileSource” - and just copy the code from “ADTSFileSource.cpp” as appropriate.)
>
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel



More information about the live-devel mailing list