[Live-devel] MP3 streaming problem

Ignacio Barreto ignacio at radixcast.com
Fri Apr 15 13:06:00 PDT 2016


Hi Ross,
I've tested what you suggested: I played the MP3 generated file in VLC
and then streamed this file using “testOnDemandRTSPServer” and
established a network connection in VLC to reproduce the stream.
Both approaches worked fine.
So that I think that the FFMpeg encoding it's correct and I guess that
the error is in "live source" streaming.
Remember that I have the stream from memory and not from a file.

I tried some other things:
1 - In the method createNewStreamSource return my FramedSource
subclass instead of MPEG1or2AudioStreamFramer::createNew (I think that
hears better but with errors)

2 - I tried to set OutPacketBuffer::maxSize = 100000;
This is inside the method createNewRTPSink of my
onDemandServerMediaSubsession subclass

3 - I tried to change fMaxSize in order to not truncate bytes in my
implementation of deliverFrame

In order to find the error, what would you suggest to investigate,
improve. Using another codec? AAC, MP2 for example
What do you think?

As you see I tried different approaches and I'm pretty sure that my
error is in how I generate the stream to live555.
Perhaps is in how live555 handle mp3 streams.
In order to stream h264 video frames I have to truncate a header that
comes in each frame. Maybe MP3 has some similar thing.

I guess that my error is in deliverFrame method, or my
OnDemandServerMediaSubsession class in the method
createNewStreamSource or createNewRTPSink


Thanks

2016-04-15 6:26 GMT-03:00 Ross Finlayson <finlayson at live555.com>:
>> We based our streamer server using testOnDemandRTSPServer.
>> We subclassed FramedSource (AudioFramedSource) and
>> OnDemandServerMediaSubsession (AudioServerMediaSubsession)
>>
>> In this AudioServerMediaSubsession class we return
>> MPEG1or2AudioStreamFramer in createNewStreamSource method and
>> MPEG1or2AudioRTPSink in createNewRTPSink method
>
> This looks good - but are you sure that your MP3 audio source is OK?  I.e., I suggest that you first output your MP3 audio source (from your encoder) to a file, and make sure that you can play that file OK (e.g., using VLC).  Then, I suggest making sure that you can stream this file (using “testOnDemandRTSPServer” and/or the “LIVE555 Media Server”).
>
>
>> Is there some example of how to use MP3ADU from memory live source?
>
> There’s code in “MP3AudioFileServerMediaSubsession.cpp” that should help you here.  Be aware, however, that very few RTSP clients will implement the MP3ADU RTP payload format; VLC is the only one that I know of.
>
>
> 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