Xuggle now has librtmp support


First the bad news; The FFmpeg team has asked me to remove our FAAC-based AAC audio encoder from the binaries we build of Xuggle.  They believe the FAAC encoder is not redistributable as a binary form and, while they don’t actually have anything to do with the FAAC license, have put Xuggle on notice.  So, in an attempt to get off notice, we no longer auto-build FAAC.  Sorry.  That said, if you build Xuggle from source yourself and have already built and installed FAAC on your machine, we’ll link against it if you ask us to.

Now the somewhat inconvenient news; Xuggle now requires libssl, libcrypto and libz to build.  If you’re on ubuntu you probably have those already but to be sure:

apt-get install libssl-dev

This further complicates our windows builds, which remain broken for now.  In fact, we recommend people build from scratch to get the latest version as we’re unlikely to bundle up a formal release soon.

But finally, the GREAT news.  If you install libssl and build Xuggler from source, we now ship Xuggle with the excellent librtmp library.  That’s right… ‘rtmpdump‘ is now bundled with Xuggle, but there’s much more.  The FFmpeg we ship with also uses librtmp for RTMP support.  And the Xuggle Java API uses it too.  In other words, the tip of tree Xuggle now has RTMP, RTMPE, RTMPT, and RTMPS support and much better debugging.  It ships with rtmpdump and other tools.  It allows you to separate application name from path name.  It can intuit your personal desires and make your dreams come true.  It allows you to embed arbitrary AMF in requests (so may work with other CDNs like Akamai and others for their custom security crap).  It supports secure-token.  It supports buffering (like the flash player).  It can make excellent soufflé.  It can “lie” about the webpage you came from.    It is way better than a smart phone*.

Unfortunately it means a slight change in user interface for using FFmpeg with our streams.  Here’s what a new broadcast of a live stream looks like:

ffmpeg -re -i ~/Work/xuggle-xuggler-main/test/fixtures/ucl_h264_aac.mp4 \
 -acodec copy -vcodec copy -f flv "rtmp://10.10.1.134/appname  playpath=test live=true"

The quotes for the URL are very important.  You can now pass any parameter RTMPDump supports on the URL provided it is separated via a non-URL-encoded space from the actual URL.

Here’s recording a file from a RTMP server:

ffmpeg -f flv -i "rtmp://10.10.1.134/appname playpath=stream1" \
  -acodec  copy -vcodec copy -y recording.flv

And if you’d like a blow-by-blow formatted packet dump to watch while doing that:

ffmpeg -debug 50 -level 50 -f flv -i "rtmp://10.10.1.134/appname  playpath=stream1" \
 -acodec copy -vcodec copy -y recording.flv

Finally, thanks to the kind folks at ConnectSolutions who continue to sponsor this work!

- Art

* way better than an iphone

About these ads

4 Responses to Xuggle now has librtmp support

  1. hyc says:

    For Windows we really recommend using PolarSSL, it makes the build a lot easier.

  2. Kerry Gould says:

    I didnt know where I should send this (didnt look too hard for an email) but after checking out from tips and setting up env vars, etc; upon building it would fail with libavcodec/libspeexenc.c:120: error: implicit declaration of function ‘speex_encode_stereo’. the fix was to add #include in libspeexenc.c

  3. Kerry Gould says:

    sorry that was #include<speex/speex_stereo.h> forgot about html filters

  4. jben says:

    librtmp support seems to be disabled by default in tip of tree. (when launching ./ffmpeg in xuggle bin folder after a build I don’t see –enable-librtmp). Is there a way to enable it ?

    Anyway, librtmp support is major breakthrough, congrats!

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: