Please consider a donation to the Higher Intellect project. See https://preterhuman.net/donate.php or the Donate to Higher Intellect page for more info.

QuickTime TV

From Higher Intellect Vintage Wiki

QuickTime TV allows you to digitize any video signal and send it out live on any IP network, including the Internet. The digital signal is copied in the network using one of two technologies - IP Multicast (as used on the MBone) - or QuickTime TV reflectors. Clients can 'tune in' to your broadcast and watch it in real time. QuickTime TV leverages QuickTime for video and audio compression, allowing you to use the latest coding techniques to send signals which will be viewable over a 28.8 modem. Or you can use higher data rates to get better sound or video quality. Unlike other techniques, QuickTime TV is live, requiring no disk space at either server or client, and is codec-independent. And, because the network replicates the signal to the clients, the load on the source server is independent of the number of people watching.

QTTV Client[edit]

To run QuickTime TV client you'll need a fast Mac (most broadcasts require Power Mac decoders), and at least a 28.8 Internet connection.

You'll want to set up some MIME types in your web browser after having loaded the package. Check the configuring Netscape Navigator instructions for setting MIME types on your favorite web browser.

After you connect, you should wait a while for video to appear and audio to start playing. Sound should start within 15 seconds, but the video may take longer if the signal is highly compressed (most of the time only differences between successive frames are sent, and when you start you have to wait for a periodic full, or base, frame).

Viewing RTP (aka Mbone) Broadcasts

Run "QuickTime TV SD Listener" to begin building a list of available multicast sessions. This program is similar to the Unix MBone tool "sdr" (though vastly less functional at the moment). Select "Browse" within this application to see the available list of sessions. It is safe to leave this application running in the background all the time. If no entries appear in the browser list after five minutes or so, this means you do not have a working multicast feed. If you select a session within QuickTime TV SD Listener, it will automatically launch QuickTime TV.

Run "QuickTime TV". Select "New RTP Channel...". You should then see the same list as the QuickTime TV SD Listener presents. Double-click on a session to view or listen to it. WARNING! Currently, this can only cope with the nv, JPEG, H.261, GSM, mu-law and DVI encodings. More codec types are in the works.

QTTV Broadcaster[edit]

System Requirements[edit]

  • Power Macintosh AV. Preferably an 8100AV, 7500, 7600, or 8500
  • System Software System 7.5.3 Update 2.0 or better.
  • 16MB of memory (32MB preferred)
  • OpenTransport 1.1.2 or better.
  • QuickTime 2.5 or better.

Configuring HTTP Server for QTTV calling cards[edit]

Set your HTTP Server for the following MIME type:

BINARY .qtc qtc * video/x-qtc

Configuring Netscape to Watch Webcasts[edit]

If you have Netscape 2.0 or later, you shouldn't need to do anything. It should come pre-configured for QuickTime TV.

If you need to configure your web browser, install the "Conferencing Helper Application" as the Helper Application for the Mime Type "video/x-qtc", with the file extension ".qtc".

Follow the directions below to configure your web browser:

  • From the Netscape Options menu, choose General Preferences. The Preferences panel opens, showing a variety of preferences to select.
  • Choose the panel in preferences which says "Helpers".The window changes to show the Helper Applications settings.
  • Type in the Mime type "video"
  • Type in the Mime sub-type "x-qtc"
  • Type in the extension ".qtc"
  • Set the "Action" to launch application.
  • Click on "Browse", and then a file directory pop-up is displayed. Browse through your directories, and select the "Conferencing Helper Application" in the local "QuickTime Conferencing" folder on your hard disk. When you are done with this step, the "Conferencing Helper Application" will be displayed as the helper application for the Mime type "video/x-qtc" with action "Launch" and extension ".qtc".
  • Close the preferences panel of Netscape, and close the application. When you restart Netscape, you will now be able to launch QuickTime TV to view live broadcasts.

QuickTime TV and Firewalls[edit]

To allow QuickTime Conferencing media streams to flow in through the firewall, UDP traffic with static port 458 and with dynamic port values greater than or equal to 7000 must be allowed incoming.

QTTV Reflector[edit]

When multicast support is not available, a QTTV Broadcaster must send a separate copy of the media to each recipient. The broadcaster can quickly saturate its network, and must reduce its frame rate to compensate. To remove this burden from the broadcaster, we have written the QTTV Internet Reflector.

The QTTV Internet Reflector serves as a mediator between a single QTTV broadcaster and multiple QTTV watchers, using Internet Protocol (IP). It is NOT a "meetpoint" like the CU-SeeMe reflector; it is more like a splitter, with a single explicit source which qtcd routes to multiple watchers. The Reflector connects to a QTTV Broadcaster, receives media streams from that broadcaster, and performs the replication necessary to supply multiple recipients.

Reflectors can be chained, in a tree-like fashion, to further distribute the network load generated by many recipients.

The application is called "qtcd". It runs as a faceless background application in Unix. The "d" suffix is a Unix convention signifying "daemon", a background system task.

All Macs connected to qtcd (the broadcast sources and all watchers) MUST use QTTV Client 1.0.4 or later.

The qtcd program, on startup, reads a list of initialization commands from its default configuration file, called "qtc.cf". You may create and edit this list of commands before starting qtcd. You may also start qtcd with its default configuration, reconfigure its settings while it is running, and direct it to save the new settings to its configuration file. You may also create other configuration files (with different names) and read the preferences from one of these alternate configurations.

To run qtcd as a foreground task, simply invoke "qtcd". This will allow you to monitor qtcd's diagnostic output, but it will also mean that qtcd will be terminated if you close that login shell.

To run qtcd as a background task, invoke "qtcd [port] >&& /dev/null &&". This directs qtcd's diagnostic output to the "null" output device and places qtcd in the background. Diagnostic output will continue to be deposited in the file "qtc.log". The [port] argument chooses the control port. The default port is 4001.

To give commands to qtcd interactively, while qtcd is running (either in the foreground or background), invoke "telnet [host] [port]". The [port] is as described in the previous paragraph. You will be presented with a "qtc>" prompt, at which point you may enter commands. The first command must be 'password [xxx]' to give the password (or set it if no password has been set previously).

The qtcd program may receive its media from a Macintosh broadcast source, or from another copy of qtcd running on another host machine. This chaining allows more viewers to receive a media stream. For example, if each host can supply at most ten watchers, then the daemon receiving the Mac feed may feed ten remote copies of qtcd, which can in turn supply a total of 100 viewers.

To connect qtcd to another qtcd, be sure that the "remote connect" port of the leaf machine matches the "local connect" port of the branch. Connecting to a Mac usually means that the remote connect port of qtcd is 545, while connecting to another qtcd would typically require setting the remote connect port to 5001.

The configuration commands either set or get a parameter, depending on whether or not you specify any arguments. For example, if you type "max users", qtcd will display something like "max users 20". If you type "max users 10", it will acknowledge "max users 10".

Certain configuration commands require you to invoke "initialize" to take effect. This allows you to change several parameters at once without booting your existing watchers until necessary.

Status commands are similar, but won't let you configure anything.

All commands may be abbreviated: "s", "str", and "strea" all are the same as "streams". However, the string "strfoo" would not be recognized.

Configuration:

  • allow [[ip] mask] -- set/get access information
  • allow reset -- reset all access information
  • local media [num] -- set/get local media (udp) port
  • local connect [num] -- set/get local connection (tcp) port
  • remote connect [num] -- set/get remote connection (tcp) port
  • remote address [ip] -- set/get remote ip address
  • max users [num] -- set/get max number users
  • max bandwidth [bps] -- set/get max aggregate bandwidth (e.g. "10" = 10, "10k" = 10,000, and "10m" = 10,000,000)
  • password pw [new-pw] -- give the password to gain access (give a new password as well as the old to change passwords)

Status:

  • info -- name of source broadcast, version of qtcd, etc.
  • bandwidth -- get aggregate bandwidth
  • streams -- get num streams
  • stream [num] -- get stream info (0..n-1)
  • users -- get num users
  • user [num] -- get user info (0..n-1), format is "'[user name]' at [ip address] on for [hh]:[mm]:[ss]" e.g. 'Markus Karcass' at 17.255.9.185 on for 1:01:44

Other:

  • init -- reinitialize
  • boot -- kick everybody off the reflector without shutting down
  • read [fn] -- read prefs
  • write [fn] -- save prefs
  • exit -- done configuring
  • quit -- done configuring
  • verbosity [0/1/2] -- set level of message detail in the log file
  • shutdown -- bring the reflector down
  • # lines that start with '#' are comments

Examples To configure qtcd on taurus.apple.com to receive a feed from the Mac called "MGM MovieTalk" (whose IP address is 17.201.41.53), with 13 users, limited to the Apple Direct Internet Access network, with 3.9 Mbits aggregate bandwidth, you would invoke the following commands (prompts shown):

taurus% qtcd >& /dev/null &
[1] 1234
taurus% telnet localhost 4001
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is '^]'.
qtc> remote address 17.201.41.53
Password, please.
qtc> password foo
Access granted.
qtc> remote addr 17.201.41.53 
remote address 17.201.41.53
qtc> max bandwidth 3900k
max bandwidth 3900K bits/sec
qtc> max users 13
max users 13
qtc> allow reset
# no access list
qtc> allow 17.255.0.0 255.255.0.0
allow 17.255.0.0 255.255.0.0
qtc> initialize
reinitializing
qtc> write
Wrote config to 'qtc.cf'
qtc> quit
Bye!
Connection closed by foreign host.
taurus% 

To call taurus from within QTC, select the MovieTalk transport and the TCP/IP network, then inside the TCP/IP browser, enter "taurus.apple.com:5001" as the address.

To configure qtcd on ceres.apple.com as a second-level reflector, receiving its feed from taurus.apple.com, and allowing only ten viewers, follow these commands:

ceres% qtcd >& /dev/null &
[1] 2345
ceres% telnet localhost 4001
Trying 127.0.0.1 ...
Connected to localhost.
Escape character is '^]'.
qtc> password foo
Access granted.
qtc> remote addr 17.201.41.53 
remote host 17.201.41.53
qtc> remote connect 5001
remote connect 5001
qtc> max users 10
max users 10
qtc> initialize
reinitializing
qtc> write
Wrote config to 'qtc.cf'
qtc> quit
Bye!
Connection closed by foreign host.
ceres% 

Note that access lists, bandwidth limitations, and all other port settings are left in their default state on ceres.

Broadcasting Check List[edit]

Sourcing[edit]

By "sourcing", I mean all steps involved in creating a digital audio/video stream from some number of analog a/v streams. You'll need:

  • Video sources (live cameras, VCR's, laser discs)
  • Audio sources (ditto)
  • Minimal mixing equipment
  • Appropriate cables and connectors
  • An A/V PowerMacintosh
  • Open Transport
  • An Internet connection of ISDN rates (112 Kb/s) or better
  • QTTV Broadcaster Lite

To configure your system as a broadcast source:

  • Obtain PowerMac. An 8500 is the optimal system.
  • Obtain and install QTTV Broadcaster Lite.
  • Configure TCP/IP as instructed by your network administrator.
  • Configure QTTV Broadcaster Lite to use TCP/IP when broadcasting.
  • Connect your sources. Make sure your switching equipment generates a signal that the Mac A/V inputs are happy with. Futz with the settings until the levels appear correct. Or reduce the gain externally if you have a mixing board.
  • If you're using an audio source other than the microphone that came with your Macintosh, and your A/V Mac doesn't have line level audio inputs (RCA jacks), be sure to use the line-to-mic adapter that came with your Macintosh. This will help prevent your audio from distorting.
  • Select "Start Broadcasting" from the "File" menu. Now the Mac is an active broadcast station.
  • Check your audio and video settings. See more on settings below.

Settings[edit]

Video[edit]

As of this writing, the preferred video settings use the "H.261" codec with the quality slider set to 25% and the frame rate set at 3 or 4 f/s. Some codecs, such as Cinepak, require too much CPU to encode in real-time. Others, such as H.261, are PPC-only. The Graphics codec is suited to computer-generated pictures and not to digitized images. We'll have better codecs available soon.

Audio[edit]

For audio, select '8-bit' and 'mono' as the sample size. You should experiment with the different compressors and pick one that suits you. Each has trade-offs. MACE 6:1 gives a good compression ratio for a small CPU cost, but is fairly poor quality. MACE 3:1 is higher quality but still not very good. Both MACE compressors tolerate loss reasonably well; some compressors require a moment to fully recover, even after traffic resumes. IMA 4:1 provides decent quality at a good compression ratio, but is somewhat CPU intensive (8100/80 or better on the encode side). Apple GSM 10:1 sounds great at extremely low bitrates.

Distribution[edit]

"Distribution" refers to setting up a reflector network so that more than a handful of users may watch your feed simultaneously. If you plan to have less than about ten viewers at any given moment AND have a network connection suitable for feeding that many simultaneously, you can skip this section.

To supply multiple watchers with a real-time-media stream, the source must deliver each packet of digitized media to all destinations. Traditional Internet protocols use unicast packet delivery: each packet has an explicit host for a destination. Thus to deliver media to four watchers using unicast, the broadcaster must send four copies of the media. As more and more watchers join in, the source machine's network connection becomes increasingly clogged by this outbound network traffic. The source machine's processor also becomes increasingly loaded, occupied with copying each packet to the network.

The proposed solution to this problem is multicast protocols. Routers configured for multicasting perform the replication of packets, but only when necessary. A source in New York might send a single media stream to multiple destinations in San Francisco, and the packets would be duplicated on different sub-nets only as necessary to reach the destinations, after the stream reaches California.

Multicasting would seem to be the best solution to the traffic problem, but there's a catch: most of the Internet's routers are not configured for multicast. The reasons are more psychological than technical. One hinderance is the difficulty in configuring routers for multicasting. It is a non-trivial task for network administrators, many of whom are currently swamped by the current exponential growth of the Internet. Further, most admins are against the idea anyway; the thought of a lot of real-time traffic bringing their routers to their knees makes them cringe. "Not on my network," they say. Even Apple's own IS&T; has enabled multicast only in certain subnets, and so far is refusing to actively support multicast.

As a stop-gap, we have the QTTV reflector. The reflector is a Unix application which acts as a proxy for a broadcaster. Instead of calling the source, viewers connect to the reflector, which takes care of replicating the media streams. This reduces the processor and network demand on the source. Each reflector can supply some number of clients; this number is dependent upon the rate of the data stream, the speed of the host machine and its network interface, and the network bandwidth available to that reflector. More on this later.

For a list of downloadable files, look here. To build your distribution network, you'll need:

  • A broadcast source (see above)
  • QuickTime TV client software
  • Login accounts on Unix machines to serve as reflectors
  • Compiled versions of the reflector for each type of machine
  • Reflector documentation
  • Someone with rudimentary Unix skills
  • Permission to run a lot of data through these Unix boxes

Instructions:

  1. Read the reflector documentation.
  2. Obtain a login account on your reflectors, along with permission to run a lot of data through them during your webcast. The accounts do not need any special permissions or capabilities. Ask each sysadmin for an upper limit on the amount of bandwidth that you may use. Log in to each machine and use ftp to bring over the reflector executable. Feel free to rename something complicated like 'sparc-sunos413-qtcd-1.0d11' to simply 'qtcd'.
  3. Set up broadcast source as described above. Write down the IP address of the source machine. Use the "TCP/IP" control panel to get this address.
  4. Log in to the primary reflector (which is usually the host closest to your source machine). Edit the file 'qtc.cf' so that it will receive its feed from the source Mac. (Instructions are in the reflector documentation.) Choose the maximum number of users by dividing your allocated bandwidth by the estimated bandwidth of the stream(s) you'll be sending (and subtract one to account for the source). For example, if you've been given a T-1 line (1.5 Mb/s) and plan to send a 100 Kb/s signal, you can supply (1500/100 - 1) = 14 users. Note that mega-bandwidth does not necessarily translate into many simultaneous watchers. For example, our tests with a Sparc 10 suggested that the processor and network card could handle only 50-60 streams of 100 Kb/s.
  5. Type 'qtcd' to run the reflector. (If it says "qtcd not found", try typing the path name such as './qtcd'.) You should see a bunch of diagnostic information spew to the screen; the reflector will call the source to get the name of the broadcast and verify the broadcast is available. If you get a message saying "port already in use", one of the local ports described in the qtc.cf file is in use -- possibly because qtcd is already running. If you're sure qtcd is not running, wait a moment and try again.
  6. If you have other reflectors in addition to the root reflector, log in to each host and set up the 'qtc.cf' file on each, then start up the reflector. Instead of going directly to the source, they should receive their feed from the nearest reflector. For example, during the webcast of the Grammys, a Mac in Cupertino fed a reflector in Cupertino, which in turn fed a reflector in Stockton, which fed another reflector in Washington, D.C., which fed a reflector in Norway ...
  7. Test each reflector by connecting to it using QuickTime TV. Select 'Watch broadcast' in the File menu, then type in an address of the form "host-address:connect-port". After you log in to each site, select "Save Calling Card" from the File menu. All sites will show the same name in the Save dialog box -- the name of the source machine's broadcast -- so you'll want to name each Calling Card differently.

Promotion[edit]

After you've gone to all this trouble, you should make sure that people know about it, can download the software, and can connect easily. You'll need:

  • Internet access and a web browser
  • QuickTime TV client software
  • Access to a Web server
  • Basic knowledge of HTML
  • A skilled artist and page designer (optional but desired)

Here are the steps:

  • If you haven't got a Calling Card (stored address) for each site to which people will connect (as described in the last bit of the previus section), make those now. The Calling Cards are not themselves directly embeddable. To create a '.qtc' file suitable for embedding, use the Conferencing Helper App (hereafter referred to as "CHA") which is installed in the same folder as QuickTime TV. Launch CHA and select "Convert Calling Card..." from the File menu. You will be prompted for the Card, then CHA will suggest a web-friendly filename (".qtc" appended, no spaces, all lowercase, etc.) for the '.qtc' file.
  • Create the basic web page. (This is where it helps to have either an expert on such things or basic HTML experience yourself.) One handy hint is: you can view the 'source code' of most web pages. In Netscape, select "View as Source" from the "View" menu. You may create the page on your local hard disk and edit it there; you need not upload the file to the server until you are ready to do so.
  • Add links to relevant useful information: times and dates of the webcast, system requirements for watching, where to get the software, how to configure your browser for web-launching of QuickTime TV, how to connect to the webcast, basic troubleshooting. Most of these pages are available within the main QuickTime Conferencing site.
  • Embed the '.qtc' file(s). A typical bit of HTML might read:
   Click to connect to our reflector in
   <a href="http://host.domain.com/path/filename.qtc">San Francisco</a>.;
  • When your page is ready, publicize the event. Go to the major search engines (e.g. Yahoo, Alta Vista, etc.), and fill our their forms to have your web page scanned by their webcrawlers and your page fed into their search database. Send mail to relevant mailing lists. Post on the net (but only newsgroups that are clearly appropriate; do NOT 'spam' many irrelevant groups or face grave consequences). Find people in P.R. to assist with press releases and whatnot. Be sure to include a URL to your main page with all announcements, electronic or otherwise.

See Also[edit]