Streaming: What code?

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
TomasCrespo
New Cone
New Cone
Posts: 6
Joined: 15 May 2008 13:38

Streaming: What code?

Postby TomasCrespo » 15 May 2008 13:42

What is the best code/bitrate for streaming a video trough a normal DSL connection???

Im now streaming without transcode, with the HTPP protocol, and its imposible to show a video. The connections drop.
Now I will try with transcode options, but, what code and bitrate to select?

Thanks

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: Streaming: What code?

Postby ph0t0n » 20 May 2008 02:31

Test your upload bandwith (there are websites for that), and customize your output stream quality to match. I assume you are only streaming to one client, in which case the calulation is easy enough. Transcoding might make it possible to use other transports (i.e. Theora/Vorbis uses the OGG container, which only supports HTTP and file access methods, not UDP or others), or if you absolutely NEED the feature set of a particular media player with limited format support, but apart from that, will only tax your CPU(s). On the client side, a stream sent over HTTP can be received using a script that includes the --http-reconnect option.

TomasCrespo
New Cone
New Cone
Posts: 6
Joined: 15 May 2008 13:38

Re: Streaming: What code?

Postby TomasCrespo » 20 May 2008 12:22

Thanks very much.
Yes, I will stream to only one client, would be best with udp?
My client will use vlc also. What transport/container would be best? OGG?
--http-reconnect: Thanks a lot !!!

My upload connection its about 15 Kbps :(

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: Streaming: What code?

Postby ph0t0n » 21 May 2008 01:27

OGG is a container for audio/video (usually Vorbis/Theora), not a transport. That would be (among others) UDP, which is an unreliable and connectionless protocol for getting data on the network fast, without waiting for packet arrival confirmation from the receiver. RTP is used over UDP to provide services which UDP do not. UDP has no --http-reconnect equivalent in VLC, obviously. Any packets lost go unnoticed. OGG cannot use HTTP transport, like I mentioned. Why? Good question. Ask the VLC developers. Now, 15kbps isn't a heck of a lot of bandwith. To stream video, you REALLY need more. Here are some examples of typical bandwidth requirements: http://en.wikipedia.org/wiki/Bit_rate

TomasCrespo
New Cone
New Cone
Posts: 6
Joined: 15 May 2008 13:38

Re: Streaming: What code?

Postby TomasCrespo » 21 May 2008 10:03

First of all, really thanks.
I 've a 3Mbps/256Kbps ADSL connection, but I say that my upload speed is 15kbps because with utorrent I never has uploaded at more speed :D

I've read the wiki link, thanks a lot. I only want to stream for security prupouse (low quality).

What relationship has bit rate and resolution??? A video at 320x200 could be streamed at 16kbps and a video of 640x480 also can be streamed at 16kbps??? I missed

UDP and HTTP: Ok UPD is best, but UDP ALWAYS is sending packets, isn't it? Always using upload bandwidth, also when nobody is viewing the streaming!!!! isn't it? HTTP only use upload bandwidht when a client ask it, isn`t it?

Thanks a lot, really

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: Streaming: What code?

Postby ph0t0n » 21 May 2008 11:16

I was kind of wondering about the 15kbps upload speed when you said you were on ADSL...however 256kbps should be adequate for video, depending on the desired quality. More than likely, your torrent client imposes the 15kbps as a limit, but this can be changed by the user. Does not affect other applications, though. When I said you would need more bandwidth for video streaming, I should have mentioned 'quality video streaming'. Encoding a video with a lower bitrate produces lesser quality results, but you can still stream it, even if you can barely make out what you are watching. UDP is continously streaming, yes. But you set up VLC to stream out to a local UDP port, and have a client connect to that one from the Internet by configuring your router for port forwarding. In this way, a client connects to your routers WAN IP address (usually a dynamic IP address assigned by your ISP through DHCP) on the desired port, and the port redirection configuration on the router forwards the request to the local (non-routable) IP of your computer. This works fine with local static IP addresses, but if they are DHCP-assigned, I believe port triggering would be the correct way of doing it. At any rate, this ensures the stream isn't hogging your upload bandwidth when no clients are connected.
Last edited by ph0t0n on 21 May 2008 13:17, edited 1 time in total.

TomasCrespo
New Cone
New Cone
Posts: 6
Joined: 15 May 2008 13:38

Re: Streaming: What code?

Postby TomasCrespo » 21 May 2008 13:09

Come see if I understand this:
But you set up VLC to stream out to a local UDP port, and have a client connect to that one from the Internet
Dou you mean that I stream out with UDP to a port WITHOUT no adresss ?????

I try UPD and works, but always with a ip address and a port.
No problem with dinamyc ip address because Im using DynDNS service for the two computers, server and client, to make tests HTTP, UDP...

And I dont understand this:
At any rate, this ensures the stream isn't hogging your upload bandwidth when no clients are connected.
What "this"? UDP to a port without address??? using local static ip addresses???

Conclusion: Is posible to make an UDP connection between two computers trought internet that only consume upload bandwidth when a client is reading the stream????

Thanks, once more

ph0t0n
Blank Cone
Blank Cone
Posts: 81
Joined: 02 Apr 2008 22:36
VLC version: 0.8.6f
Operating System: Mac OS X 10.4.11
Location: Norway

Re: Streaming: What code?

Postby ph0t0n » 21 May 2008 13:33

One occurence of 'this' was corrected in my last post. Please reread to clarify matters. Of course you need an address and a port - not just a port all by itself. I thought that was rather obvious. When I say local UDP port, I refer to a UDP port on the same computer. Every computer has a loopback IP address, which is needed for the IP stack to function properly. The loopback IP address is 127.0.0.1, but can also be reached through the DNS name localhost, as in rtsp://localhost:554/stream.sdp. Which is why I said local. OK?

There is no such thing as UDP connection, per se. Remember that the UDP protocol simply throws data onto the network without a care. A connection would entail handshaking,as well as retransmission on packet loss, etc. If you need that, TCP is what you want.

You should read the playing and streaming howto at www.videolan.org if you haven't already. Best of luck!


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 58 guests