converting UDP RTP to RTMP

5,299 views
Skip to first unread message

Nikolay Epifanov

unread,
Jul 19, 2011, 5:43:25 AM7/19/11
to C++ RTMP Server
Hi,

Can crtmpserver listen passively on some UDP port, receive UDP RTP
stream and convert it to RTMP stream (so client could connect and get
RTMP stream)?

If so, what should I put into configuration file to make crtmpserver
bind new stream to some name, so I could request this stream?

jeremys

unread,
Jul 20, 2011, 2:53:58 AM7/20/11
to C++ RTMP Server
I've been asking the same question, but no-one seems to care/give ANY
suggestions.
My Case is to produce RTSP TCP:554 based stream from VLC's UDP RTP
output. Video is H264 & aac audio..
I just don't know that module to use in this server..

I am able to stream files from flvlive modules to rtsp...

jay

unread,
Jul 23, 2011, 8:38:35 AM7/23/11
to C++ RTMP Server
I would like to have this feature too.

C++ RTMP Server

unread,
Jul 23, 2011, 11:22:13 AM7/23/11
to c-rtmp...@googlegroups.com
METHOD 1 WITH VLC:
1. Start VLC:
/Applications/VLC.app/Contents/MacOS/VLC -I dummy ~/work/crtmpserver-trunk/media/tbs.mp4 --sout='#rtp{dst=0.0.0.0,sdp=rtsp://0.0.0.0:2323/test.sdp}'

2. add the following external source inside crtmpserver config file
{
uri="rtsp://127.0.0.1:2323/test.sdp",
localStreamName="gigi"
},

3. Start the crtmpserver

4. You can now access the stream:
rtmp://localhost/live/gigi


METHOD 2 WITH ffmpeg:
1. Start the crtmpserver (it is already configure to listen on 6666 for inbound live FLV. Bare in mind: THIS IS NOT RTMP)

2. Start ffmpeg:
ffmpeg -i ~/work/crtmpserver-trunk/media/tbs.mp4 -acodec copy -vcodec copy -re -f flv -metadata streamName=gigi "tcp://localhost:6666"

3. You can now access the stream:
rtmp://localhost/live/gigi

Cheers,
Andrei

On Jul 23, 2011, at 3:38 PM, jay wrote:

> I would like to have this feature too.
>

> You received this message because you are subscribed to "C++ RTMP Server" mailing list.
> To post to this group, send email to c-rtmp...@googlegroups.com
> To unsubscribe from this group, send email to
> c-rtmp-serve...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/c-rtmp-server?hl=en

------
Eugen-Andrei Gavriloaie
Web: http://www.rtmpd.com

jay

unread,
Jul 24, 2011, 10:53:57 AM7/24/11
to C++ RTMP Server
I tried method 1. Works great! However, feed from VLC needs to be
started before starting CRTMP Server. if feed was stopped and started
for some reason, then the server needs to be restarted. Is there a way
for the server to recover without restarting?

jay

unread,
Jul 25, 2011, 8:05:20 AM7/25/11
to C++ RTMP Server
I was running iftop and see that incoming rate is about twice the
outgoing traffic. Does that mean RTSP uses twice the bandwidth than
RTP?

50.0Kb 100Kb 150Kb
200Kb 250Kb
└───────────────┴───────────────┴───────────────┴───────────────┴───────────────
host1.testonly.com => client ip address 103Kb 100Kb 99.4Kb
<= 200Kb
193Kb 192Kb

C++ RTMP Server

unread,
Jul 25, 2011, 8:47:11 AM7/25/11
to c-rtmp...@googlegroups.com
I have no idea how iftop works (nor I want to learn :) )

As a general rule, make sure you properly filter the traffic before measuring it. In RTSP you have either one connection (RTP over RTSP) or 2 or more connections (one TCP connection for RTSP and one UDP connection for each audio/video track inside sdp)

Also, I ***strongly*** suggest not to paste this kind of stuff here because it is badly formatted (I can't understand a thing because word wrap). Please use pastebin.com or a similar service

Cheers,
Andrei

jay

unread,
Jul 25, 2011, 7:35:50 PM7/25/11
to C++ RTMP Server
Can you please respond to the issues in thread 5. above?
Reply all
Reply to author
Forward
0 new messages