[Live-devel] MPEG4 streaming using ffmpeg as encoder
ssingh at neurosoft.in
ssingh at neurosoft.in
Fri Oct 18 14:24:41 PDT 2013
Thank you for the clarification. I will try to send this extra data as
first packet. I have another confusion. if i send this packet as first
packet when there was no client attached to it and later on client
attached to it than how will that client get this packet as it will be
lost. Right now the way I am using FrameSource is:
/****************************************************************/
void MyStreamingDeviceSource::streamPacket(AVPacket pkt)
{
m_queue.putPacket(&pkt);
envir().taskScheduler().triggerEvent(m_eventID, this);
}
/***************************************************************/
so it does not matter if a client is attached or not I keep on sending
the data to network.
Thanks,
Caduceus
On 2013-10-19 01:54, Ross Finlayson wrote:
> Your "deliverFrame()" function looks OK - provided that it gets called
> whenever a new MPEG-4 frame is available. Note that each call to
> "MyStreamingDeviceSource::doGetNextFrame()" must be followed
> (eventually) by a call to "FramedSource::afterGetting(this)".
> Therefore, if you return from "deliverFrame()" at the "if(newFrameSize
> == 0) return;" statement (because no new frame data is available), you
> must ensure that "deliverFrame()" somehow gets called again later when
> new frame data *is* available.
>
>> when i am doing that I am not getting anything in VLC and
>> testRTCPClient
>
> You should use "testRTSPClient" (sic) for testing first; only after
> that's working should you bother using VLC.
>
>> I suspect that I did not send the configuration data before sending
>> the actual data. I saw that my AVPAcket has "00000001B6" in starting
>> and I think i somehow need to send "00000001B0" to signal start of
>> data.
>>
>> I also noticed that when i encode using FFMpeg in codec->extradata I
>> have some header information that has "00000001B0" in that but i
>> dont know how to pack all this information
>
> Yes, this 'extra data' is important. You should treat it just as you
> would a video frame, and make sure that it is the first 'frame' that
> you feed to your "MyStreamingDeviceSource::deliverFrame()" is this
> 'extra data'. I suspect that this may be enough to make your code
> work.
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/ [1]
>
>
> Links:
> ------
> [1] 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