order of rtmp streaming and connecting client

209 views
Skip to first unread message

Eckhart H.

unread,
Oct 31, 2012, 6:29:11 AM10/31/12
to myproje...@googlegroups.com
Hello,
I have some problems streaming live video using ffmpeg and rtmplite to a JW Player client.
Everything works great if I follow this order:

1. python rtmp.py -d
2. open JW Player (pointing to rtmp://localhost/live/sample) in webbrowser
3. ffmpeg ... -f flv "rtmp://localhost/live/sample"

However, typically I would start the live streaming, and later clients connect. But in this order, the client only shows the loading symbol for half a minute and then a black background:

1. python rtmp.py -d
2. ffmpeg ... -f flv "rtmp://localhost/live/sample"
3. open JW Player (pointing to rtmp://localhost/live/sample) in webbrowser

Can somebody explain this behaviour? Is it expected?
Why can I not connect the client to an already running stream?

Thanks
Eckhart

Intencity Team

unread,
Nov 1, 2012, 7:01:08 PM11/1/12
to myproje...@googlegroups.com, Eckhart H.
Hi Eckhart,

I suspect one of the two problems.

1) You are streaming H264/AAC and the configuration packet was sent
only once at the beginning of the stream by ffmpeg. The rtmplite
failed to store the configuration correctly to resent to future
clients. If you are not using H264, then what is the rate of your
I-frames? Are you using H.264?

2) The timestamp got incorrectly mapped in rtmplite because of some
anomaly in ffmpeg's output. If the stream starts from the begining,
then Flash Player is able to adjust (work around), but if the stream
starts in the middle then it cannot. Is it possible to print out the
timestamp values in rtmplite and let me know?

Other things you can do to break down the problem:

1) Try replacing JW Player playout with VideoIO. You can open
http://myprojectguide.org/p/flash-videoio/test.html and then enter
"src" as rtmp://localhost/live?play=sample to achieve the same effect
I think. (In particular, play= determines the stream name).

2) Try replacing ffmpeg publish with VideoIO. Again, you can try
setting "src" to rtmp://localhost/live?publish=sample to publish the
live stream from camera.

Let me know which of these work, if at all.

Hope this helps!
> --
> You received this message because you are subscribed to the Google
> Groups "myprojectguide" group.
> To post to this group, send email to myproje...@googlegroups.com
> To unsubscribe from this group, send email to
> myprojectguid...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/myprojectguide?hl=en



--
The Intencity Team http://theintencity.com

Eckhart H.

unread,
Nov 6, 2012, 9:24:49 AM11/6/12
to myproje...@googlegroups.com, Eckhart H.
Dear Intencity Cloud Technologies staff,
thank you for your reply and please find more details below:


Am Freitag, 2. November 2012 00:01:08 UTC+1 schrieb Intencity Cloud Technologies:
Hi Eckhart,

I suspect one of the two problems.

1) You are streaming H264/AAC and the configuration packet was sent
only once at the beginning of the stream by ffmpeg. The rtmplite
failed to store the configuration correctly to resent to future
clients. If you are not using H264, then what is the rate of your
I-frames? Are you using H.264?

Yes, I am using H.264. Which alternative do I have except for H.264? Why is especially H.264 problematic and what can I do to get the configuration right?

These are the full details of my ffmpeg command:
ffmpeg -r 30 -f x11grab -i :0.0 -vcodec libx264 -tune zerolatency -pix_fmt yuv420p -an -f flv rtmp://localhost/live/sample

2) The timestamp got incorrectly mapped in rtmplite because of some
anomaly in ffmpeg's output. If the stream starts from the begining,
then Flash Player is able to adjust (work around), but if the stream
starts in the middle then it cannot. Is it possible to print out the
timestamp values in rtmplite and let me know?

How do I print the timestamp values? "python rtmp.py --help" doesn't show such option.
 

Other things you can do to break down the problem:

1) Try replacing JW Player playout with VideoIO.

Can I use VideoIO for streaming other sources than a camera? I will try to get started with VideoIO if I'd know how it relates to ffmpeg. At the moment I'd like to continue with ffmpeg, because it was difficult enough to get it "half" working.
Can you point me to some information about how to stream screen contents using VideoIO similarly to the dshow/x11grab source in ffmpeg?

Thank you very much
Eckhart

Eckhart H.

unread,
Nov 6, 2012, 5:58:09 PM11/6/12
to myproje...@googlegroups.com, Eckhart H.

I suspect one of the two problems.

1) You are streaming H264/AAC and the configuration packet was sent
only once at the beginning of the stream by ffmpeg. The rtmplite
failed to store the configuration correctly to resent to future
clients. If you are not using H264, then what is the rate of your
I-frames? Are you using H.264?


You were right. After choosing "-vcodec flv1" instead of "-vcodec libx264" the problem is solved, and I can connect the client to the previously started server.

However, the x264 codec seems to provide a much better compression. Therefore, I'd appreciate an answer to my previous question, how to get the configuration correctly transmitted using the x264 codec.

Thanks
Eckhart

Felix Hellmann

unread,
May 1, 2013, 3:18:19 PM5/1/13
to myproje...@googlegroups.com, Eckhart H.
Hello,

I have the same question.
I want to use the rtmp server for colaborational game streaming. My partner wants to use xsplit which aparently only does x264.

Is there a way to archive this?

John Cein

unread,
Sep 13, 2013, 10:32:16 AM9/13/13
to myproje...@googlegroups.com
i can not connect rtmp server with jw player.. how to connect it?

Intencity Team

unread,
Oct 8, 2013, 12:36:05 PM10/8/13
to myproje...@googlegroups.com, john...@gmail.com
Hi John,

If the issue is still unresolved, can you please tell what all have
you tried already? You can enable the logs in rtmplite (using -d
option), create a bug (issue) in rtmplite project, and attach the logs
and description of your problem and steps.

Regards

On Fri, Sep 13, 2013 at 7:32 AM, John Cein <john...@gmail.com> wrote:
> i can not connect rtmp server with jw player.. how to connect it?
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "myprojectguide" group.
> To post to this group, send email to myproje...@googlegroups.com
> To unsubscribe from this group, send email to
> myprojectguid...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/myprojectguide?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups
> "myprojectguide" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to myprojectguid...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages