Network streaming of TV connection using Win XP

About encoding, codec settings, muxers and filter usage
Kegrik

Network streaming of TV connection using Win XP

Postby Kegrik » 26 Mar 2005 03:11

Greetings,

After purchasing a Tablet PC recently, I decided I wanted to be able to accomplish my dream of viewing real-time TV on a portable system. Looking for software to accomplish this particular trick, I came across the web site for VideoLAN - upon first glance, it seemed to be exactly what I was looking for. Unfortunately, closer examination seemed to indicate that the type of video streaming I was looking for wasn't currently possible outside of any operating system other than GNU/Linux. Let me list out the details and perhaps someone could help me to find out whether this is actually the case or not.

I'm currently running an ATI Radeon All-In-Wonder graphics card, with a cable TV connection, on a PC with more than enough power to handle excellent video - I have no problem watching TV locally like this. My goal would be to stream that video over a wireless 108 Mbps network to my tablet pc, which also has more than enough power, memory, and storage to process high quality video - in addition, it is using Windows XP Tablet PC Edition 2005. Beyond any bandwidth and/or speed questions, is this currently possible using the latest version of VLC? If not, is this kind of video sharing planned for the future? And if so, could someone provide some basic instructions as to how I could get the setup up and running? I've looked over the VLC program on my own and have had some initial success, but some of the options, particularly relating to how you want to stream the video, are rather confusing.

In any case, my main source of information in this matter has been the documentation provided on the VideoLAN site itself, http://www.videolan.org. Under the Documentation page, I consulted the VLC-Streaming Howto page, which, along with the information provided on the pages showing the current capabilities of VLC, seemed to indicate that using a general capture card to stream video isn't currently possible on a windows platform. Obviously, I am hoping that this isn't the case :)

Thank you very much for any help.

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 26 Mar 2005 04:44

No big deal, if the Radeon can be viewed locally on the big PC using VLC.

First, make sure you have the latest DirectX from MS, and video card drivers, for both the big PC and your tablet.

What you do is transcode the audio and video, then stream it out over the WiFi. A 1 Mbps mp4v-encoded video, 96K mp4a-encoded audio, UDP stream should do nicely.

Launch VLC on the big PC.
Do a File -- Open Capture Device.
Refresh next to Video device, then pick the ATI for your video source.
Repeat for Audio device.
Select Tuner Properties., then OK.
This should open the tuner app with the ATI, so you can pick a channel, at the end of which you should see the video locally on the big PC. If this doesn't happen, go back in and pick the Device properties checkbox too -- you may have to select which of the ATI inputs are being used.
Once you have iterated this, can see the TV locally on VLC, you are ready to stream.

Go back into the Open page.
Select the "Stream Output" checkbox, then press Settings.

This opens a Stream Output window.
Click the UDP checkbox.
Decide if you want to do multicast (available to everyone) UDP or addressed. For starters, do addressed -- plug in the IP address of your tablet in the space provided.
Down in Transcoding, just click on the video and audio checkboxes -- the default selections are OK. (I'd use 96K for audio, but the 192K default is fine)

Click OK to close the Stream Output page, and OK again to close the Open page.

VLC should now be running -- the arrow will have turned into a square.

On your tablet, launch VLC.
Select File -- Open Network Stream.
Click the top box -- UDP, then OK.

Also, take a look at:
http://download.videolan.org/doc/misc/V ... eaming.pdf

(a stunning document, replete with screen shots :)

UDP streaming generally works best. If the client shows some glitches, definitely try dropping the bitrate next to Audio codec back to 96K.

The whole thing can also be done via command line (device selection, tuning, picking the transcoding options and starting the stream) -- check the vlc documentation page, the general Streaming guide that's there.

I'm not positive, but you may be able to control the big PC from the tablet via VLC's http interface, for channel changing kinds of stuff. Otherwise use a copy of RealVNC remote desktop app to do that.

Good luck!

Kegrik

Postby Kegrik » 26 Mar 2005 06:12

Thank you very much for the quick reply.. As soon as I found your message, I went ahead and configured both of my computers the way that you mentioned. Unfortunately, although it seems to be close, I'm still hitting some bugs. For one, although there are no problems starting the stream on my desktop, when I attempt to open it my tablet pc, all I get is a second or so worth of video and audio and then the image gets garbled and freezes - it doesn't do anything after that and if I want to be able to get it to respond, I need to restart the whole process on both computers.. Which, of course, results in the same thing happening again.

Additionally, I'm not sure if I am doing something wrong or if this is a "feature," but is it normal for you to lose all of your settings each time you close VLC? On my desktop, I've noticed that each time I have closed VLC and re-opened it, all of my previous settings have been wiped, right down to having to auto-search all of the channels on the tuner again. I looked, but there doesn't appear to be any sort of "save configuration" option that I am missing.

I'm most certainly not discouraged though - it appears as though I am very close to getting this working correctly, so I'm sure I will be able to get it working eventually.. And, of course, any more help you can provide would be greatly appreciated.

P.S. I forgot to mention it previously, but just so you know, I'm using the latest version of VLC available to download on both systems - 0.8.1, I believe it is.

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 26 Mar 2005 13:14

I actually work from the developer version -- do a forum search for the phrase "nightly build" and you'll find the link.

To hjave things that are persistent, you go to Settings -- Preferences.

Look under Modules -- Access, for Dshow. Click the Advanced Options button so you can see things.

In dshow you will see selectors for video device and audio device -- do a Refresh, then select your ATI sources. You can also type in your desired default video size (depends on what output sizes the card supports -- 320x240 or 640x480 are likely).


In the newer nightly build there are spaces in Dshow preferences for you to preset:
Tuner TV Channel
Tuner country code
Tuner input type
You can preset these, then select Save, for the changes to become persistent, your default/startup settings.

(You can also do a command-line launch of VLC, setting these things on the command line.)

(I'd suggest going for the nightly build, latest functionality and bug fixes.)

Now, back to your difficulty. If you get the video and sound for even a second or two you should be pretty close. Couple of things to try:

Client -- when you do the File -- Open Network Stream, try selecting the "Caching" checkbox and plugging in a bigger value, maybe 1000.

Server -- try setting the video CODEC bitrate down one notch, to 756K, and the audio bitrate to 96.

Server -- take a look under Task Manager, see what CPU use you have while running it as a server. You want to keep CPU under about 50%. If it is running over 50%, try either cutting your dshow input video size one level (from say 640x480 to 320x240), else try launching vlc with --sout-transcode-fps 20 (or even 15) -- this will cut the frames per second being processed, which directly reduces CPU load.

Alternately, try using an mmsh connection instead of UDP. How wireless works seems to vary a bit for the different transports. To do this:

On the server, instead of checking "UDP", click the "mmsh" box, and type 127.0.0.1 in the address box.

For Encapsulation Method, pick ASF

For Audio CODEC, switch from the default to mp3.

For starters, try the lower bitrates -- video at 384K, audio at 96K.

At the client, you launch with vlc mmsh://server_IP_address:1234 To do this via the GUI, do a File -- Open Network Stream, click the http/ftp/mms box, and type in mmsh://server_IP_address:1234 in the address area.

Kegrik

Postby Kegrik » 27 Mar 2005 05:13

Thanks to your incredibly helpful advice thus far, I have been able to get VLC working practically flawlessly between my desktop and tablet PC. I messed around with the UDP connection for a while longer, but although changing the data rate of the video seemed to make the picture work slightly longer on my tablet, it refused to stop freezing after a second or two.

After that, I decided to try your suggestion about using an mmsh connection - and, luckily enough, this worked perfectly. For whatever reason, the quality didn't seem quite as high as I had seen previously while using the UDP connection, but I've been able to boost the quality with the default video codec up to 3072K, with Mp3 audio running at 192K, and things looks pretty damned nice at 640 x 480 on my tablet. Barely even uses 3 or 4% of the wireless connection and almost doesn't even register on the procesor usage on the portable system, let alone on my desktop.

At this point, I find myself needing just one last thing. What information do you have about using the HTTP interface to change channels? I've looked into it myself and haven't had any trouble setting up and accessing the http interface with my tablet, but it doesn't look like any of the default buttons there work for changing the tuner's channel. I also perused the information available about altering/creating the web pages that VLC uses, but it didn't seem to have anything relating to changing the tuner's channel setting remotely. If you, or anything else reading this, know anything further about this, please let me know.

This is, of course, gravy at this point - I'm ecstatic that the whole setup is working perfectly now and even being able to watch one channel remotely is nice. I am aware of the possibilities of Windows XP's Remote Desktop (and similar applications) and, in fact, had already set one up between my tablet and desktop - unfortunately, although it works fine, there appears to be some kind of bug with it and every time I disconnect my tablet from the desktop system, the desktop loses all functionality from my wireless keyboard until I reset it. I've been looking into the problem, but thus far, haven't found anything.

Anyway, thank you very much for all of the help. I most certainly wouldn't have been able to get nearly as much done in so little time on my own! It says quite a lot about this forum that there are such helpful people around :)

markfm
Big Cone-huna
Big Cone-huna
Posts: 1536
Joined: 22 Feb 2004 17:42

Postby markfm » 27 Mar 2005 16:01

I thought the on-the-fly channel change was implemented, but in a quick look I do not see it.

I don't think it would be hard to implement, just that it might not be in place as of yet, at least it's not exposed through, for example, the rc telnet-like interface.

You might want to give that realvnc a shot. It's a different code base than the Windows remote desktop, might work better for you. My one hint on that would be that you can set it for 4-bit mode, which minimizes the amount of BW that it, too, then uses. (I have the older Nec LitePad, use realvnc to control my desktop via WiFi, and the desktop wireless mouse, at least, stays OK)

You might want to generate a new post in the Requests area, to ask if the on-the-fly dshow channel changing is available, and, if it is, can it be reached via the http interface.


Return to “VLC stream-output (sout)”

Who is online

Users browsing this forum: No registered users and 8 guests