Playing RTP stream in flex - apache-flex

I am trying to play the RTP playload in flex but no success. Can some enlighten me how to achieve this without using RTMP Server as middle ware.

You can't do that without using an RTMP server. The NetConnection class you find in Flex can send and receive RTMP streams, and those streams can have the same payload you find in RTP packets. Although, to unpack RTP packets and create RTMP packets you need an RTMP server like Wowza Media Server, or something alike.

There are several open source media servers you can use:
Red5
Wowza
RTMPD
Any of these would suit your purpose. Flex makes the client side pretty trivial too.

Related

How to convert udp mpeg ts stream to http stream?

I'm trying to stream a live video on a website and I already have a udp mpeg-ts. I cannot show this stream on html so I wanna convert this stream to http on server then send it to clients. how can I do that using ffmpeg?
any other solution accepted too.
thank you
The key question is - do you need a low latency live streaming or 15-30 seconds latency is OK for you. If you don't need low latency, use ffmpeg to ingest your udp mpeg-ts and output HLS.
For low latency live streaming to web browsers, you will have to install a media server software, such as Wowza / Unreal Media Server / Red5 or similar.
The media server will ingest your udp mpeg-ts and will convert it to WebRTC streams playable by web browsers.

How Can I Convert a live stream from a H.264 Encoder to a streaming service like Wowza?

hoping to get some input on a streaming issue im having.
I have a H.264 hardware encoder where you connect an HDMI source (dvd player, computer etc) and then you can set up that encoder to work over WAN by opening up a port in your router and setting a port forwading rule (in my case the ip of the device is 172.16.16.121 and port using 3124)
I have set this up an am able to view the stream from the encoder using VLC > open network stream > and type in my public IP url rtsp://xxx.xxx.xxx.xxx:3124/live.sdp
but when I try giving this URL into a streaming service like Wowza, Streamedian or FlashPhoner it does not work at all.
Any ideas or suggestions on what I might be doing wrong?
Responses from Wowza
First Response: Looking at the server logs you have provided, it seems that Wowza is trying to connect to the RTSP source, but the connection is timing out.
Second Response: It is possible that the RTSP source is not able to establish the connection over TCP, which is being used by default by Wowza. It is possible to have Wowza use UDP to connect to the RTSP live source by specifying the "rtpTransportMode" parameter and setting it to "udp". Here is an article describing how to do this:
https://www.wowza.com/docs/How-to-specify-per-stream-settings-in-stream-files#rtspstreams
Third & Latest Response: In the server logs I can still see that Wowza has problems connecting to this IP camera stream.
I will check with our engineering team and have them take a look as to why this stream cannot be ingested. I will let you knwo as soon as I have any new information available.
Responses from Streamedian
We tested your stream. There mpeg2ts goes on rtp. The player does not support it in this form.
Therefore, your stream is not shown. To support it we need about 2 weeks.
Unfortunately we are working for another projects now. We will back to new version of player some latter.
In order for RTP/RTSP/RTCP to work correctly - don't be behind a firewall, your RTP source must have a valid public IP address - any NATed address won't work.

RTMP uses TCP (by default) so how suitable is it for live streaming?

I'm investigating RTMP, because I'm going to implement the option to broadcast a live stream from an Android device to an RTMP server. I found out that RTMP uses TCP by default and TCP guarantees delivery of packets, by retrying if they fail. Doesn't this make RTMP very unsuitable for broadcasting live streams? If the broadcaster's connection temporarily weakens, it will lead to packets that are not able to be sent in time. The stream will then fall further and further behind because of this, instead of just skipping the missed fragments.
Is this conclusion correct, or am I missing something here? I am aware btw of RMFP, which uses UDP instead of TCP. Is this what broadcasters use for live broadcasting of RTMP?
The client that is pushing the video has the option to drop a video/audio frame if it begin to fall behind.

How to force stream RTP video with vlc over tcp protocol?

I'm trying to stream a video via rtp with vlc, the default protocol is UDP, but its performance is very low (bitrate, resolution, smooth,..)
So, I want to use vlc with rtp to stream video over tcp protocol to gain higher performance.
Are there anyone can help me to force vlc streaming rtp over tcp protocol.
Please help me if you have any idea.
Thank you so much!
If you're using the command-line client then add the --rtsp-tcp options:
vlc --rtsp-tcp rtsp://path/to/stream
This article may be useful:
https://web.archive.org/web/20151117041313/http://www.wowza.com/forums/content.php?64-How-to-configure-VLC-media-player-for-RTSP-RTP-playback-(RTSP-RTP-interleaved-and-tuning)
This article explains how to configure the VideoLAN VLC media player to stream live or on demand streams through RTSP/RTP over TCP (RTSP/RTP interleaved). While HTTP streaming is a newer standard offering more features, RTSP/RTP streaming may work better when streaming through a firewall/router, which doesn't have UDP streaming open.

What would be the best strategy to take a RTP stream and send it to an RTMP server?

I'm receiving a RTP/UDP from a hardware encoder, I have tried ffmpeg, so it takes this input and outputs the stream as FLV (it's being sent to NGINX, nginx-rtmp-module). However I'm not able to play the stream smoothly once it's received by nginx, some frames are broken or lost, etc.
I think that my CPU is too slow for this format change (FLV) and/or ffmpeg is missing a lot of RTP packets. Any ideas?

Resources