Solaris Common Desktop Environment: User's Guide

Chapter 17 Using Video and Audio

Video is the Java Media Player application used for viewing or saving video data in several formats. The Java Media Player is automatically launched once you select the Audio/Video menu option from the Applications menu. This is the default unless you select the Audio option to customize your environment.

Audio is a CDE Motif application for playing, recording, or saving audio data in AU (Sun), WAV (PC), or AIFF (Macintosh) format.

Video

Overview

Use the Java Media Player for viewing multimedia files. The Java Media Framework (JMF) is an application programming interface (API) for incorporating media data types into Java applications and applets. It is specifically designed to take advantage of Java platform features.

Java Media Player Main Window

All video functions start with the main window.

Graphic

You can open a video file by choosing Open file from the File menu. Once you open a file, the main window alters to display the file and a control panel at the bottom of the screen.

Graphic

The control panel consists of the following icons and their respective functions:

Graphic

Click this button to begin playing a file.

Graphic

Click this button to pause a file.

Graphic

This button indicates how far a file has played.

Graphic

Click this button to alternatively turn on or turn off the sound.

Graphic

Click this button to increase or decrease the volume.

Graphic

Click this button to view information on a file.

Supported Media Formats

The Java Media Player supports the following formats:

Aiff (.aiff)

AVI (.avi)

Audio:

Video

GSM (.gsm)

MIDI (.midi)

MPEG-1 (.mpg)

This format is not available on Solaris x86.

MPEG audio (.mp2)

This format is not available on Solaris x86.

Quicktime (.mov)

Audio:

Video:

RMF (.rmf)

Headspaces Rich Media Format audio files.

RTP

Audio:

Video:

Sun Audio (.au)

Vivo (.viv)

Video: H.263

Wave (.wav)

Using the Java Media Player

The following tasks can be performed on multimedia files using JMF.

To Open a New Java Media Player

To Exit the Java Media Player

To Open a File

To Close a File

To Open a URL

To Play a File

  1. From the File menu, select Open file.

  2. Enter the path or folder name in the text field.

  3. From the Files window, double click the file that you want to open.

To Stop or Pause a File

To Rewind a File

To Forward a File

The file will begin playing from the point you placed the slider.

To Adjust the Volume

You can either adjust or mute the volume for a file. To adjust the volume of a file:

To select mute for a file:

To Set the Play Rate for a File

  1. Place the cursor over the triangle on the lower left of the screen.

  2. Right-click the mouse button.

  3. From the pull-down menu select one of the options.

    • 1/10 speed - 1/10th the original rate

    • Half speed - 1/2 the original rate

    • Normal speed - the original rate

    • Double speed - twice the original rate

    • Triple speed - three times the original rate

    • Quadruple speed - four times the original rate

To Alter the Screen Size

  1. Place the cursor over the screen.

  2. Right-click the mouse button.

  3. From the pull-down menu select a zoom option:

    • Half Size - Shrinks the screen to half its original size

    • Normal - Alters the screen to accommodate the picture

    • Double Size - Expands the screen to twice its original size

    • Quadruple Size - Adjusts the screen to 4 times its original size

To Display Information on a Video File

Starting and Quitting Audio

There are several ways to start Audio:

To Start Audio From the Front Panel

  1. Click the Voice Note control on the Applications subpanel to start the application.

    Audio runs in note mode, and automatically starts recording.

  2. Click the Stop button to stop recording.

Graphic

To Start Audio From the Command Line

You can start Audio and open files directly from the command line.

    Type sdtaudio to start Audio.

Or:

    Type sdtaudio filename to start Audio and open a specific file.

To Start Audio From the Workspace Programs Menu

  1. Place the mouse pointer anywhere on the background of the desktop (the workspace) and click mouse button 3.

    The Workspace menu appears.

  2. Choose Programs, and then choose Audio from the Programs submenu.

    The Audio main window is displayed.Graphic

To Exit Audio

    Choose Exit from the File menu or Close from the Window menu, or hold down the Alt key and press the F4 key with the mouse cursor over the Audio main window to exit Audio.

Audio Main Window

All Audio functions start with the main window. Open an audio file by choosing Open from the File menu; record by choosing New from the File menu and clicking the Record Audio button; set startup, recording, or playing options by choosing the appropriate item from the Options menu.

Graphic

Voice Notes

In the same way as Text Note allows you to rapidly create small text files and display them on the desktop, Voice Note allows you to record an audio message and save it on the desktop for playing later. For example, you might want to record the pronunciation of a foreign name, or a useful quotation which you don't want to type.

The Voice Note control is located on the Applications subpanel of the Front Panel. When you click the Voice Note control it runs the Audio application, which immediately starts recording from your host's microphone. To stop recording, you click the Stop button or exit the Audio application.

The sound file that is created is displayed on your desktop when you exit the Audio application. You can remove it by choosing Remove From Workspace from the right-mouse button popup menu. You can remove it from your file system by deleting it from your home directory.


Caution – Caution –

If you click the Voice Note control and neglect to stop Audio, it can record and save a huge file that may eventually use up all your disk space.


Displaying the Waveform Window

An audio file can be displayed with or without a waveform displayed. The waveform is a graphic depiction of the sound levels of an audio file.

To Display the Waveform Window

  1. To show the waveform window, click the Show Wave Window button.

  2. To hide the waveform window, click the button again.

    The button is a toggle, changing from Show Wave Window to Hide Wave Window and back again to Show Wave Window as it is clicked.

    If stereo viewing is enabled, the window depicts levels and volume individually for left and right channels.

Graphic

To Start Audio With the Waveform Displayed

  1. Choose Startup from the Options menu.

    The Options dialog box is displayed, with Startup selected as the Category. If the Options dialog box is already displayed, choose Startup from the Category menu.

  2. Click Waveform View Enabled or Stereo View Enabled.

  3. Click OK.

    The Options dialog box closes. The next time you start Audio the monaural or stereo waveform will be displayed. The Stereo View Enabled button is inactive if the current audio file is in monaural format.

Opening and Playing Audio Files

You can open an audio file from the Audio File menu or by dragging and dropping it from File Manager onto Audio. Once you have opened an audio file or recorded something, you can play it from the beginning or from any point in the file. You can specify whether an audio file will be played automatically when it is opened.

To Open an Audio File

  1. Choose Open from the File menu or hold down the Control key and press ``o'' with the mouse cursor over the Audio main window.

    The Audio-Open File dialog box is displayed.

  2. Navigate to the folder where the audio file is located.

    Navigate by selecting a folder in the Folders list or by entering a folder name in the Enter path or folder name text field.

  3. Optional. Type an audio-file suffix (au, wav, aiff) after the asterisk (*) in the Filter field.

    Only files with the specified suffix will be listed in the Files field.

  4. Press Return or click Update to update the change in the folder location or filter field.

  5. Select a file from the Files list.

  6. Double-click the file in the Files list or select it and click OK.

    The selected file is opened. If Automatically play audio file on Open is selected in the Options-Play dialog box, the audio file starts playing.

    Audio automatically detects the type of device accessed. If Audio is started with a play-only device, only playback options and output sources are available. If audio is started with a record-only device, such as a microphone, only record options and input sources are available.

To Open an Audio File With Drag and Drop

  1. Open File Manager and navigate to the folder where the audio file is located.

  2. Drag the audio file icon from File Manager and drop it on the Audio main window.

    The Selected file is opened. If Automatically play audio file on Open is selected in the Options-Play dialog box, the audio file starts playing.

To Specify Play Options

  1. Choose Play from the Options menu.

    The Options dialog box is displayed, with Play selected as the Category. If the Options dialog box is already displayed, choose Play from the Category menu.

    Graphic
  2. Determine whether files should automatically play when they are opened.

    • Click Automatically play audio file on Open to automatically play files when they are opened.

    • Deselect Automatically play audio file on Open if you do not want files to automatically start playing when opened.

  3. Move the Set Default Play Volume and Balance Audio Output sliders to desired positions.

    Position the mouse pointer over the slider and press mouse button 1 as you move the mouse to change slider positions.

  4. Click OK to apply the specified values and close the Options dialog box.

To Play an Audio File

Once you have recorded something or opened an audio file, you can play it, as follows. You can play AU, WAV, or AIFF files.

  1. Click the Play Audio button.

    When you click Play Audio, play begins at the play pointer position. The file is played from the beginning if it has just been opened or if you have just created the recording. If you click the Stop Playing button during play and then click Play Audio, play begins at the previous stop point.

    Note that the Play Audio button is a toggle: before play, it is Play Audio; during play, it is Stop Playing.

  2. Optional. Move the play pointer to a new start play position.

    To move the play pointer to the beginning of the file, click the Go to Start button.

    To move the play pointer to the end of the file, click the Go to End button.

    To move the play pointer to a position within the file:

    • If the waveform is not displayed, drag the slider with mouse button 1.

    • If the waveform is displayed, click anywhere in the waveform window.

  3. Optional. Adjust the output volume by clicking on the Increase Volume or Decrease Volume buttons.

    To mute the output, click the Turn Sound Off button.

  4. To stop playing the file, click the Stop Playing button.


    Note –

    The Play buttons are inactive when no file has been loaded or recorded.


Recording With Audio

You can record and save audio files in three formats.

To Specify Record Options

You can specify audio format, sample rate, encoding method, channels, record volume, and input balance in the Options dialog box. You can also specify whether you will specify the values when you start recording, or if the set values will be used automatically when recording or if you will specify the values when you start recording.

  1. Choose Record from the Options menu.

    The Options dialog box is displayed, with Record selected as the Category. If the Options dialog box is already displayed, choose Record from the Category menu.

    Graphic
  2. Choose AU, WAV, or AIFF from the Audio Format menu.

    AU, which is the default, is Sun audio format. WAV is Microsoft PC format. AIFF is Macintosh audio format.

  3. Choose samples per second from the Sample Rate menu.

    8.000kHz is the default. Other rates fall in a range between 5.510kHz and 48.000kHz.

  4. Choose an encoding method from the Encoding menu.

    Encoding method options include u-law, A-law, and linear PCM.

  5. Choose Mono or Stereo from the Channels menu.

    Choose Mono, the default, for single-track recording, or Stereo for multiple channels.

  6. Determine whether to use the selected recording options as the default for new files.

    • To use the selected recording options as the default, click Use selected recording options as default for new files.

    • To specify recording options when you click Record Audio, click Ask me when I start recording.

  7. Set default record volume and balance the audio input.

    Position the mouse pointer over the slider and press mouse button 1 as you move the mouse to set the Default Record Volume and Balance Audio Input sliders to desired positions.

  8. Click OK to apply the specified values and close the Options dialog box.

To Create a Recording

You can record Audio files from a microphone, line-in, or CD source.

  1. Specify recording options.

  2. Choose New from the File menu or hold down the Control key and press ``n'' with the mouse cursor over the Audio main window.

    If a previous recording has not been saved, you are asked if you want to save it.

  3. Prepare to record.

    Be sure that the selected input device is connected to your computer and ready for transmission, and that the microphone or other input device is on.

  4. Click Record Audio button and start recording.

    Speak, sing, or play into the microphone or start transmission of audio from a line-in or CD source. Recording starts as soon as you click Record Audio unless you have specified Ask me when I start recording in the Options-Record dialog box.

  5. When recording is complete, click the Stop Recording button.

  6. Click Play Audio button to play what you have just recorded.


Note –

The Record Audio button, which becomes the Stop Recording button during recording, is inactive if a file is open; the button's function is not displayed in the current function area when it is inactive. Similarly, the Play and Go to buttons are inactive when no audio file has been opened or recorded.


To Save an Audio File or a Recording

You can save an existing audio file or a new recording in AU, AIFF, or WAV format.

  1. Choose Save As from the File menu or hold down the Control key and press ``a'' with the mouse cursor over the Audio main window.

    The Audio - Save As dialog box will be displayed.

  2. Specify the folder in which you want to save the file.

    Change to a different folder, if you wish. Press Return or click Update to update the folder location.

  3. Choose a format (AU, WAV, or AIFF) from the Audio Format menu.

    AU, which is the default, is Sun audio format. WAV is Microsoft PC format. AIFF is Macintosh audio format.

  4. Type a name in the Enter file name field.

    Audio files are usually named with .au, .wav, or .aiff suffixes for easy identification. To overwrite an existing file, select the file in the Files list.

  5. Click OK to save the audio file or recording.

To Specify Input and Output Device Options

You can specify output (play) and input (record) devices for playing and recording. Audio automatically detects the type of device accessed. If Audio is started with a play-only device, only playback options and output sources are available. If Audio is started with a record-only device, such as a microphone, only record options and input sources are available.

  1. Choose Devices from the Options menu.

    The Options dialog box is displayed, with Devices selected as the Category. If the Options dialog box is already displayed, choose Devices from the Category menu.

    Graphic
  2. Select Speaker, Headphone, or Line Out as Output Sources.

    Note that you can select more than one output source. Only devices that are installed on your computer are active.

  3. Select Microphone, Line In, CD, or Codec Loopback as the Input Source.

    Only devices that are installed on your computer are active.

  4. Click OK to apply the specified values and close the Options dialog box.

To Display Information About an Audio File

    To view file information, choose Get Info from the File menu.

The File Information dialog box is displayed.

Graphic

Audio provides the following information about the current file:

Audio Control

Audio Control enables you to control the volume and balance levels for playback and recording. Please refer to the following illustration for an example of the Audio Control window.

Graphic

Menus

There are three menu items available:

Using the Tabs

There are two tabs, Playback and Record. Audio Control detects the type of device being used and displays the appropriate tab. The Playback window appears if used with a play-only device, such as speakers. The Record tab appears when used with a record-only device, such as a microphone.

If your device supports both play and record, you can switch between adjusting Playback (Output) and Record (Input) by selecting the corresponding tab (toggles). If you have the Playback tab selected when you check the Application Controls box, the Application control box also displays. Refer to the following illustration for an example of this.

Graphic

Master Output

The following controls are provided on the Master Output window:

Controlling Master Recordings

You can control master recording parameters on the Master Recording window. Access it by selecting the Record tab at the top of the window. Please refer to the following illustration for an example of this.

Graphic

The controls provided are:

Controlling the Master and Application Output

The Playback tab lets you control individual process audio output parameters. You can access it by selecting the Application Controls option from the View menu when the Playback tab is active. The new controls provided are exactly the same as those provided for the Master Output, with the exception that they are provided for one process at a time, rather than for an entire output device. Processes that are currently using audio are displayed in the list box at the top of the panel. By selecting a process, you can individually control the volume, balance, and muting of that process. If you have multiple audio channels, you can customize the individual volume and balance of each channel.

Graphic

Recording Using the Master and Application Input

You can control individual process' audio input parameters using the Master and Application Input screen. You access it by selecting the Application Controls option from the View menu when the Record tab is active. Refer to the following illustration for an example of this.Graphic

The controls provided behave exactly the same as those provided for the Master Output, with the exception that they are provided for one process at a time, rather than for an entire output device. Processes that are currently using audio are displayed in the list box at the top of the panel. By selecting a process, you can individually control the gain, and balance of that process. The Monitor volume is controllable only at the master level, so there is no Monitor Volume Slider on the Application Input panel.

Using the Status Dialog

This dialog allows you to view playback and recording status at the master level for each process. You can access it by selecting Status from the View menu. Audio Control detects the type of device in use. If the device supports playback, the Playback Status appears, if the device supports recording, the Record Status appears. Please refer to the following illustration.

Graphic

The controls provided are:

The status of each of the following parameters being monitored and is represented by either an LED icon in the on or off state, or a text string with the details of the status item being displayed.

Playback and Record