[Live-devel] Live555 : Queries

aviad rozenhek aviadr1 at gmail.com
Thu Aug 16 13:52:37 PDT 2007


Hi Brian,

welcome to the field, I was a newbie myslef 3 months ago.
first thing - the code I wrote is client-side code. so it is less relevant
to you.

what you need to do is the following

   - read the file, one NAL at a time. use the aforementioned
   H264bitstream to do this
   - skim through RFC 3984 RTP Payload Format for H.264
Video<http://www.rfc-archive.org/getrfc.php?rfc=3984>
      - Aggregation packets (STAP) are packets designed to hold
      together many small NALs, to increase network efficiency
      - fragmentation packets (FU) are packets designed to break huge
      NALs (like IDR/key frames) into network size packets
      - you should write a framer class, that aggregates small nals
      into a an STAP packet, and breaks big  NALs into several FUs. I
don't think
      this functionality is available in live555. when you implement
it, I suggest
      you submit it to the forum.
   - an H264 encoder has some preferences or options, which it must
   convey to the decoder, otherwise the decoder can't work.
      - this information can be signalled in NALs called SPS (sequence
      parameter set) and PPS (picture parameter set)
      - a good way to give the decoder this information is by putting
      the SPS/PPS NALs before every IDR frame, this is especially true for
      streaming, when a client can start decoding in the middle of the stream
      - in RTSP settings, this information is often sent in the SDP
      from the server side to the client, in the fmtp field (again see
rfc 3984)
      and the NALs are presented as BASE64 text

I hope this helps
Aviad

On 8/16/07, Brian D'Souza <brian.vdsouza at gmail.com> wrote:

> Hi Aviad,
>
> Well I havent really executed any of the test programs; but I traced the
> flow for testMPEG4ESVideoToDarwin.cpp: This involved understanding the
> MultiFramedSink, the Framer, parser classes for MPEG4 video. etc. So I can
> say I have managed a reasonable if not extensive understanding of the same.
>
> Let me outline in more detail what I am looking to do.
>
> I have Motorola set top box which has an audio and video encoder and
> streams live content( mp4 : codec used for video: h264 and for audio: aac).
> I have to design a module which streams this content in RTP .
>
> For aac, i think live media has some code to do the streaming using ADTS.
> Not sure if that will work though.
>
> For h264; i have been scanning through some posts, but stumbled upon your
> and thought it was relevant:
>
> What i need:?
>
> Ideally take input from encoder/(video(h264) file for now: which contains
> output of an encoder(video) ..: containing NAL units). Then I need a framer
> class or something which reads frame by frame from the source, generates RTP
> packets just like how MultiFrameRTPSInk class( I have come to conclusion;
> this is the class used by all media to create RTP packets; etc and send them
> on using packet buffers etc.)
>
> These RTP packets are then fed into Darwin streaming server using
> DarwinInjector.cpp(of live media) and then my client a mobile
> phone(connects using RTSP) to the DSS. My client has support for decoding
> mp4 and support for RTP/RTSP
>
> Darwin has capabilities on waiting for relay; and Live555 has the
> functionality of basically injecting packets from RTPSink onto the server(
> it does this by creating an SDP description and using RTSP announce
> protocol.
>
> I havent looked at the H264BitStream project , but on first look at the
> code you sent me; it looks like streaming from a file. Does it actually
> create RTP Packets and send them.
>
>
> I know I am a bit vague; but the thing is I am new to this domain and a
> summer intern. So have just picked up bits and peices and trying to design
> module which packetizes elementary streams(h264,aac) and does the relaying.
>
> Sorry for the inconvenience, but would really appreciate your advice.
>
> Brian
>
> p.s: You can post my queries to the group, if you thing they might be
> useful to others.
>
>
> On 8/16/07, aviad rozenhek <aviadr1 at gmail.com> wrote:
> >
> > Hi Brian,
> >
> > I have not understood from your mail whether you are familiar with
> > live555 or not.
> > also I assume the mobile clients want to have audio in addition to
> > video, so in order to understand your problem better I would need the
> > complete scenario
> > (live source VS file audio video etc).
> >
> > basically, if you are only doing server side then your biggest challenge
> > is to understand live555 good enough to integrate it into your server.
> >
> > Let me rephrase my post on live555:
> >
> >    -  the SDP information that is received in the initial RTSP
> >    handshake has some crucial information without which it is impossible to
> >    decode h264
> >    -  this information can be used in two ways:
> >       - initialize the decoder with the information in some
> >       decoder-proprietary manner
> >       - put this information in the stream itself (increases size
> >       of stream slightly) - this is what I did and what my post describes.
> >
> > you might need to do this (add the information directly to the stream)
> > if the eventual decoder (either darwin if it does transcoding, otherwise the
> > mobile client) doesn't know the information beforehand.
> >
> > I will send you the modified source in a seperate email.
> >
> > in the interest of clarity, since you are the 2nd person to ask me on
> > that post outside of the forum, I would be happy if you would allow me to
> > post this conversation back to the mailing list for future reference.
> >
> > Cheers
> > Aviad Rozenhek
> >
> >
> > On 8/16/07, Brian D'Souza <brian.vdsouza at gmail.com > wrote:
> > >
> > > Hi Aviad,
> > >
> > > I had read one of your posts from the Live555 discussion forums. I am
> > > looking to design/re-use a module which takes input from file/encoder,
> > > reading h264 content( NAL units i think) and generating RTP packets which is
> > > then relayed to the Darwin server and then streamed by the Darwin Server to
> > > be viewed by clients on the mobile.
> > >
> > > As per a post of yours, I understood that you did something on the
> > > similar lines. Did you modify the live555 code to establish the same.
> > > I would really appreciate your guidance/advice and if you have done
> > > something on the similar lines I would be grateful if you send me the
> > > modified source
> > >
> > >
> > > Thanks in advance
> > >
> > > Regards
> > > Brian
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.live555.com/pipermail/live-devel/attachments/20070816/a7f4a5fc/attachment.html 


More information about the live-devel mailing list