[libav-api] Packaging Raw H264/AAC frames into FLV/RTMP Stream

Mischa Spiegelmock mischa at int80.biz
Sat Oct 1 21:48:47 CEST 2011


I've been working on this same setup. I had a lot of luck using
crtmpserver. You simply stream MPEG TS to it via TCP (FLV doesn't like
dropped frames) and specify the stream name in the metadata.
Something along the lines of:
  -metadata streamName=stream1 -f mpegts -o tcp://localhost:6666.

Then you can use a simple flash player (like
https://github.com/revmischa/simplestream) to play it on the browser
end.


On Sat, Oct 1, 2011 at 5:08 AM, Evgeny Yakimov <john.yakimov at gmail.com> wrote:
> Hello
> I am currently trying to package raw h264 and AAC frames into a flv
> container and intend to push it over an RTMP stream (for example to a Wowza
> Server).
> The raw frames I am using for my testing have been generated by x264 and
> libfaac (RAW not ADTS), but I am working under the assumption that these raw
> frames would be provided from other h264/AAC encoders. Let me mention in
> advance that within my scenario it would not be feasible to do the encoding
> via libavcodec, or for that matter to use libav to decode and re-encode the
> frames. The objective for me is to take the raw pre-encoded frames and
> simply package then into an flv which is capable for RTMP live streaming.
> The video frame rate will be 30 FPS and the audio will come in raw packets
> of 2048 encoded samples per packet from a 48000 sample rate (stereo).
> So far I've managed to create an FLV that vlc will play fine however
> whenever I try to push it over RTMP and play it in a flash player, It fails.
> I've uploaded a general outline of my code here:
> http://pastebin.com/B90WTnUc
> Unfortunately I havnt been able to find much information about this so any
> advice would be strongly appreciated, I especially have little to no idea
> about the timebases and the pts/dts/duration fields.
> Regards,
> Evgeny
> _______________________________________________
> libav-api mailing list
> libav-api at libav.org
> https://lists.libav.org/mailman/listinfo/libav-api
>
>


More information about the libav-api mailing list