I using RTSP for transmitting video from server to client.
At some points during the transmission I need the server to "send" metadata to the client (some information that something was changed).
I need the sessions to be fully "standard" (VLC should be able to display the video).
I thought of sending DESCRIBE to the server at some interval from the client and using the SDP data to contain the relevant information.
Is it a "standard" approach? shouldn't the DESCRIBE be used for initialization purposes only?
Thanks.
According to the RTSP standard the DESCRIBE method simply describes the URL in the request and should only be used for that purpose. Try using GET_PARAMETER method or use extensibility features of RTSP.
RTSP Draft 2.0 has support for PLAY_NOTIFY although I am not 100% sure that is what you need, you may just need to be able to have a server which is capable of sending an Announce from the Client to Server when the media changes... or that may be encompassed by just using dynamic as the payload types and specifying an additional payload type in the SDP...
My media server implementation should handle this easily and contains a RtspClient which may help also!
http://net7mma.codeplex.com
Related
I've been reading on packets a lot today. I was confused for sometime because smtp, http, or ftp, for example, are all called protocols. But that they also somehow utilize transport protocols like TCP. I couldn't locate them on the packet 4 layers. Until I just discovered they're simply part of the application layer.
I want to know what exactly these "protocols" offer. I'm guessing a specific format for the data which applications on the client side know how to handle? If so, does this mean that realistically, I might have to create my own "protocols" if I created an application with a unique functionality?
A protocol, in this case, is just a structured way of communicating between two or multiple parties.
If you write, for example, a PHP-App and offer an API, you created a protocol to interact with your program. It defines how others interact with it and what response they can expect while doing so. Your self-created protocol depends on others, like the HTTP and TCP.
I suggest watching following video of LiveOverflow, explaining exactly this:
https://www.youtube.com/watch?v=d-zn-wv4Di8&ab_channel=LiveOverflow
I want to know what exactly these "protocols" offer.
You can read the definition of each protocol, if you really want to
Streaming services such as Twitch or Youtube allow you to stream videos using the RTMP protocol, using an url and a "stream key/name".
Usually the stream url is in this form:
rtmp://rtmp.example.com/live
And the stream key
123456789abcdefghij
but in the end, the url used by streaming softwares is actually :
rtmp://rtmp.example.com/live/123456789abcdefghij
Is it only security though obscurity ? The streamkey should be very easy to get trough network sniffing.
Is there a security layer I'm not aware of ?
Is there a security layer I'm not aware of ?
Yes, but it doesn't have a ton of use. RTMPS is RTMP over TLS. Facebook Live supports it. I don't think Twitch does. I thought YouTube did, but I cannot find a reference to it at the moment.
Without this, you're absolutely correct in that the connection can be sniffed. As #szatmary says though, these keys are generally one-time-use keys making this not really an issue.
We have deployed webrtc on wowza. However, we are getting our own voice back. Could be feedback or echo?
As far as I see, there is currently no method in wowza to battle echo. However, you can install extra layers of audio filtering - for example, this article shows how to use PBXMate for echo cancellation. In case this link becomes invalid, full requirements are following:
The Flashphoner Client is a flash based client. It could be replaced by other flash based clients.
The Wowza server is a standard streaming server.
The Flashphoner is responsible for translating the protocol of the streaming data to the standard SIP protocol.
The Elastix server is a well known unified communication server.
The PBXMate is an Elastix AddOn for audio filtering.
I am reading about TCP connections for past few days ,I came across NET as a native nodejs library and socket.io ..can anyone suggest which one will be better with pros and cons of both
socket.io is a specific message based protocol built on top of TCP.
If you want to send messages where you define a message name and send a payload for the message and the other side listens for a specific set of message names and you have a socket.io library already implemented for the other end of your connection, then socket.io will work great and will be a lot simpler to use and offer more ready-made capabilities (such as auto-reconnect).
If you intend to implement your own protocol, then you will use TCP in order to implement your own protocol. If the type of data you are sending is not really message-based (such as audio/video streaming or large file uploads as a couple examples), then you will want to either use TCP or use some other protocol that is also built on top of TCP (such as HTTP, FTP, etc...).
As with any feature in a library, define your requirements, understand the options available in your system and find the solution that best matches your requirements. Since you have said absolutely nothing about your requirements, we cannot make a specific recommendation.
Is it possible to detect new data from the server as it is sent? For example, with express.js:
res.write('Processing 14% or something');
and then display that on the page with a progress bar.
Edit:
My original question was a bit confusing so let me explain the situation. I have created a page where users can upload song files. These files are then converted (using ffmpeg) to .ogg and .mp3 files for the web. The conversion takes a long time. Is it possible to send real time data about the conversion back to the client using the same XMLHttpRequest that sent the files?
If i understand correctly you are trying to implement event based actions. Yes node.js has got some excellent web socket libraries such as socket.io and sack.js
You need to understand nodejs event driven pattern.
Websocket protocol helps maintain full duplex connection between server and client. You can notify clients when any action happens in server and similar you can notify server when any action happens in client. Libraries provide flexibility to broadcast event to all connected client or selected ones.
So it is basically emit and on that you will be using often.
Go through the documentation, it will not take much time to learn. Let me know if you need any help.