Hack 80. Stream a DVD

 < Day Day Up > 

You can stream a DVD to one or more people, across the Internet.

Practically anyone who's worked with digital video is familiar with streaming video, even if that familiarity is just from watching a streaming video via the Internet. For the most part, streaming video involves either a live feed [Hack #87] or a preprocessed streaming video file [Hack #83]. Using Video Lan Client (http://www.videolan.org; free, open source), also known as VLC, you can stream something somewhat unexpected: a DVD.

To stream a DVD, you will need the VLC application and a network connection. To view the stream, you will need a video player, such as QuickTime Player (http://www.apple.com/quicktime/; free), Windows Media Player (http://www.microsoft.com/windows/windowsmedia/mp10/default.aspx; free), or VLC. Of the three players mentioned, VLC will be able to view the widest range of streaming video.

7.6.1. Setting Up to Stream

Before launching VLC, place the DVD you would like to stream in your computer. Then, launch VLC and choose File Open Disc… from the applications menus. VLC should automatically locate the DVD for you. If not, you will need to select it from the menu provided. Figure 7-23 shows VLC on Windows XP ready to open a DVD.

Figure 7-23. Opening a DVD using VLC on Windows XP


Some DVDs won't stream correctly unless you enable the DVD menus option. To do this on a Macintosh, check the "Use DVD menus" checkbox. On Windows, press the DVD (menus) radio button.


Just opening a DVD won't stream it, however. In order to stream the DVD, you need to enable the Advanced output option by clicking the checkbox. Doing so enables the Settings… button, which, when clicked, enables you to configure the stream.

You will probably notice that VLC can stream from Video TS (a file prepared for a DVD, but on a hard disk), DVD, VCD, and Audio CD.


7.6.2. Configuring the Streaming Options

In the Settings window, you'll have a wide variety of choices, many which can be confusing. Figure 7-24 shows the various advanced output settings.

If you want to watch the DVD on the computer that is going to stream it, select the "Play locally" checkbox. This will play the DVD on the computer as it is being streamed. Therefore, if you want to make sure the stream is occurring in the manner you expect, you should enable the option.

If you wanted to send the DVD's audio and video to a file on your computer, you would select the File radio button and then click the Browse… button to select where you wanted the file to be placed.


For the type of stream, choose the protocol that best fits your needs. Your choice of Type will also affect the options you have for your Encapsulation Method:


HTTP

Streams the audio and video over the Hypertext Transfer Protocol, which many people are used to seeing in web addresses (i.e., http://). However, to view the stream, viewers will need a player that can translate it correctly. If you choose this option, you will have the widest range of Encapsulation Methods available: MPEG PS, MPEG TS, MPEG 1, ASF, and Raw.


MMSH

Enables viewers using Windows Media Player to view the stream. This method of streaming is not reliable, especially when not streaming from Windows. If you use this option, you must use the ASF Encapsulation Method.

Figure 7-24. A lot of options, but nothing to be intimidated by



UDP

The User Datagram Protocol is lightweight and works well for real-time data, like audio and video streams. When using UDP you will have the option to stream to only one computer (Unicast) or to many computers (Multicast). When using UDP, you can use only the MPEG TS Encapsulation Method.


RTP

Using the Real-Time Transport Protocol is one of the better available options, because it is a standard that most media players can read. RTP was designed with a focus on audio and video communications. The RTP type will require you to use the Raw Encapsulation Method.

After you have selected a Type and an appropriate Encapsulation Method, enter an IP address. For most situations, simply entering your computer's IP address will suffice. If you are going to use UDP, you have two options. First, you can Unicast, where the stream is sent to only one specific viewer. In this case, you will need to know the viewer's IP address. Your other option is to Multicast, in which case you need to make sure you select and enter an appropriate IP address, between 224.0.0.0 and 239.255.255.255.

If you plan to stream across a router, choose an IP address above the 224.0.2.0 block. Also, change the Time To Live setting to something higher than 1. For an in-depth explanation of multicast addressing, point your web browser at http://www.tldp.org/HOWTO/Multicast-HOWTO-2.html#ss2.1.


Here's how to find out a computer's IP address:


Macintosh

System Preferences Network Select the active network connection


Windows

Start Settings Control Panel Network Connections select the active network connection

When entering the IP address, take note of both the Address and the Port number, because you will need the information to view the stream.

You can use the Transcoding and Miscellaneous options for transcoding your video and Stream Announcing for more sophisticated situations. Transcoding allows you to convert one video codec and file format to another [Hack #29]. Stream Announcing allows your viewers to automatically open your stream in a media player, and should be enabled if you have selected to use UDP.

As soon as you've completed setting your streaming options, click the OK button. Then, click the OK button on the Open… (Windows) or Open Source (Macintosh) window. VLC will then start streaming your DVD. If you have selected to "Play locally," then the video will open in its own window.

7.6.3. Viewing the Stream

How your viewers configure their media players to connect to the stream will depend on the selection you made in your Stream Settings, as well as the specifics of the media player they are using:


QuickTime Player

File Open URL in New Player…


VLC

File Open Network…


Windows Media Player

File Open URL…

In the URL or Network section, a viewer should enter:


HTTP

http://ip_address:port_number


MMSH

mms://ip_address:port_number


UDP


Unicast

udp://localhost:port_number


Multicast

udp://ip_address


RTP

rtp://ip_address:port_number

After entering the appropriate information, the DVD should begin playing. Figure 7-25 shows a Mac OS X client viewing a UDP streamed DVD from Windows XP.

VLC offers a lot more than just streaming DVDs. As mentioned previously, it can be used to both view and distribute streaming videos, to save streaming videos [Hack #90], and it can open and play just about any type of digital video (including some proprietary ones) you throw at it. If the Swiss Army made a media player, it would be VLC.

Figure 7-25. Streaming a DVD from Windows XP to Mac OS X


     < Day Day Up > 


    Digital Video Hacks
    Digital Video Hacks: Tips & Tools for Shooting, Editing, and Sharing (OReillys Hacks Series)
    ISBN: 0596009461
    EAN: 2147483647
    Year: 2005
    Pages: 158
    Authors: Joshua Paul

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net