Xuggler 3.4 RTMP Publishing Issue and Solution (Patch + Windows Installer)

29 views
Skip to first unread message

Jonathan Ben

unread,
Aug 10, 2010, 1:37:19 PM8/10/10
to xuggler-users
Hello,

I've been experimenting a lot with Xuggle 3.4 's rtmp publishing along
with a red5 server and I noticed an incorrect behavior (to me) of the
way the RTMP Url is parsed before publishing.

If we use the current version of Xuggler (3.4), a RTMP URL like this
one "http://localhost/oflaDemo/1/stream" will be parsed as :

"oflaDemo" for app name, and "1/stream" for the stream name, although
it should be

"oflaDemo/1" for app name and "stream" for the stream name.

This is because of a bug in the ffmpeg version included in Xuggler
3.4.

I found a way to change this behavior and I thought it could be
interesting to share it here. The "bug" (I am not even sure this is
one) is in the rtmproto.c file in libavformat. The function strchr was
used twice and the correct function to use is strrchr. I came across
this solution on this page : https://roundup.ffmpeg.org/issue1874.

I made a patch for Xuggle 3.4 captive version of FFmpeg, which is
available here : http://dl.dropbox.com/u/985460/rtmproto.correctPath.txt.

I was able to recompile Xuggler 3.4 on windows, which is really
painful, and regenerate an installer with correct URL parsing. If
anyone is interested, I made it available here :
http://dl.dropbox.com/u/985460/xuggle-xuggler.3.4.0-win32-setup.exe.
It should be easy to recompile on Linux and Mac OS with the change.

I know that this won't be an issue in Xuggle 4.0 because rtmp
publishing will be done by librtmp (if available). However, I looked
at FFmpeg latest version and it seems that even in the latest 0.6
version the "bug" is still present, if librtmp isn't enabled. So if
you compile Xuggle latest tip of tree without librtmp, you'll have the
same issue.

Jonathan Ben

unread,
Aug 10, 2010, 5:03:03 PM8/10/10
to xuggler-users
Just realized that there is a patch for this in Xuggler 4 repository.
So I was wrong about Xuggle 4.0 having the same problem if librtmp
unavailable.

Ross Hendrickson

unread,
Aug 10, 2010, 10:02:14 PM8/10/10
to xuggle...@googlegroups.com
Jonathan,

I would love to know how you compiled the installer in windows. Did you use Msys, Cygwin, Cross-Compile in Linux? I've been tearing my hair out on this one. 

Thanks,

Ross

--
You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.


Jonathan Ben

unread,
Aug 10, 2010, 10:12:40 PM8/10/10
to xuggler-users
Hi. I used Msys + MingW. It's easy : Install NSIS, add makensis.exe to
your Windows path and run "ant dist" after "ant run-tests". The
installers (there should be 3 of them) will show up in your dist/bin
folder.

http://wiki.xuggle.com/Frequently_Asked_Questions#How_do_you_build_the_Windows_Xuggler_installer.3F

If you're able to build a Xuggler installer from latest tip of tree ,
please let me know. I am been tearing my hair out on THAT one.

On 10 août, 22:02, Ross Hendrickson <ross.hendrick...@gmail.com>
wrote:
> Jonathan,
>
> I would love to know how you compiled the installer in windows. Did you use
> Msys, Cygwin, Cross-Compile in Linux? I've been tearing my hair out on this
> one.
>
> Thanks,
>
> Ross
>
> On Tue, Aug 10, 2010 at 3:03 PM, Jonathan Ben
> <jonathan.benat...@gmail.com>wrote:
> > xuggler-user...@googlegroups.com<xuggler-users%2Bunsubscribe@goog legroups.com>
> > .

Ross Hendrickson

unread,
Aug 10, 2010, 10:15:44 PM8/10/10
to xuggle...@googlegroups.com
Jonathan,

I jumped the gun :) I'm tearing my hair out over the tip of the tree installer build :) Thanks for the pointer ;) Didn't catch the 3.4 vs 4.0 tone of your post. You got me all excited!

Ross

To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.

Jonathan Benattar

unread,
Aug 10, 2010, 10:23:13 PM8/10/10
to xuggle...@googlegroups.com

Haha. Sorry I got you all excited.

Building a Tip of tree installer is my next objective though. I have problems using the same building environment as for 3.4 because recommended version of gcc (4.2.4) for MinGW has bugs that make it impossible to build tip of tree. I'm gonna try to patch it or update it.

Sent from my Android device.

Le 10 août 2010 22:15, "Ross Hendrickson" <ross.hen...@gmail.com> a écrit :
Jonathan,

I jumped the gun :) I'm tearing my hair out over the tip of the tree installer build :) Thanks for the pointer ;) Didn't catch the 3.4 vs 4.0 tone of your post. You got me all excited!

Ross



On Tue, Aug 10, 2010 at 8:12 PM, Jonathan Ben <jonathan...@gmail.com> wrote:
>

> Hi. I used ...

--
You received this message because you are subscribed to the Google Groups "xuggler-users" group....

Taimur Mirxa

unread,
Aug 11, 2010, 8:08:14 AM8/11/10
to xuggle...@googlegroups.com
Hi Jonathan,

It appears that you have solution to what I am looking for.

I am using BroadcastStream class to publish my live stream, where I have to define my stream name.

It appears from  your comments on this thread that your stream name is picked by Red5 from http://localhost/oflaDemo/1/stream URL. which is exactly what I am looking for.

but I don't know how to publish my stream in such a way that my stream name can be passed within url of stream.

Actually I have to playback my video in HTML5 <video> tag where there is not stream name attribute but we can only play with url.

Any help?

You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.



--
Warm Regards,

Taimur Mirza

Jonathan Ben

unread,
Aug 11, 2010, 9:16:10 AM8/11/10
to xuggler-users
Taimur,

My stream URL is actually rtmp://localhost... .I'm using rtmp protocol
which is not supported by HTML5 yet I think. Sorry for the typo.

On 11 août, 08:08, Taimur Mirxa <taim...@gmail.com> wrote:
> Hi Jonathan,
>
> It appears that you have solution to what I am looking for.
>
> I am using BroadcastStream class to publish my live stream, where I have to
> define my stream name.
>
> It appears from  your comments on this thread that your stream name is
> picked by Red5 fromhttp://localhost/oflaDemo/1/streamURL. which is exactly
> what I am looking for.
>
> but I don't know how to publish my stream in such a way that my stream name
> can be passed within url of stream.
>
> Actually I have to playback my video in HTML5 <video> tag where there is not
> stream name attribute but we can only play with url.
>
> Any help?
>
> On 11 August 2010 07:23, Jonathan Benattar <jonathan.benat...@gmail.com>wrote:
>
>
>
>
>
> > Haha. Sorry I got you all excited.
>
> > Building a Tip of tree installer is my next objective though. I have
> > problems using the same building environment as for 3.4 because recommended
> > version of gcc (4.2.4) for MinGW has bugs that make it impossible to build
> > tip of tree. I'm gonna try to patch it or update it.
>
> > Sent from my Android device.
>
> > Le 10 août 2010 22:15, "Ross Hendrickson" <ross.hendrick...@gmail.com> a
> > écrit :
>
> > Jonathan,
>
> > I jumped the gun :) I'm tearing my hair out over the tip of the tree
> > installer build :) Thanks for the pointer ;) Didn't catch the 3.4 vs 4.0
> > tone of your post. You got me all excited!
>
> > Ross
>
> > On Tue, Aug 10, 2010 at 8:12 PM, Jonathan Ben <jonathan.benat...@gmail.com>
> > wrote:
>
> > > Hi. I used ...
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "xuggler-users" group....
>
> >  --
> > You received this message because you are subscribed to the Google Groups
> > "xuggler-users" group.
> > To post to this group, send email to xuggle...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > xuggler-user...@googlegroups.com<xuggler-users%2Bunsubscribe@goog legroups.com>
> > .

Jonathan Ben

unread,
Aug 11, 2010, 12:50:16 PM8/11/10
to xuggler-users
Ross, I was finally able to build it :) . Check this thread :
http://groups.google.com/group/xuggler-users/browse_thread/thread/7ca192dfb8f29d47.
Reply all
Reply to author
Forward
0 new messages