1、JMStudioJMStudio Users GuideThis guide describes how to use JMStudio. JMStudio is a stand alone Java application that uses the JMF 2.0 API to play, capture, transcode, and write media data. JMStudio also uses the JMF RTP APIs to receive and transmit media streams across the network. Contents Getting
2、 Started o Running JMStudio o Opening a New JMStudio Window o Exiting JMStudio o Menu Summary Playing Media Data with JMStudio o Playing a File o Playing a URL o Replaying a Previous File or URL o Receiving and Playing RTP Media Streams o Controlling the Presentation o Closing the Current Player Sav
3、ing a Media Stream to a File Transmitting Media Streams via RTP Capturing Media Data with JMStudio o Previewing Captured Media Data Using the Plug-In Viewer Known Limitations Getting StartedBefore you can run JMStudio, you must have JMF 2.0 Beta installed. For information about setting up JMF, see t
4、he Setup pages. Running JMStudioTo launch JMStudio, you can run the batch file JMStudio.bat or invoke: java JMStudioIf you run JMStudio directly, both the JMF 2.0 classes and the JMStudio classes must be in your classpath. When JMStudio is launched, just the menu is visible: Opening a new JMStudio W
5、indowTo create a new instance of the JMStudio application, select New Window from the File menu. A new instance of JMStudio is launched without affecting the current one. Both applications share the same Java virtual machine. Exiting JMStudioTo exit JMStudio, select Exit from the File menu. Menu Sum
6、maryFile | Open FileCtrl+OOpens a file for playback.File | Open URLCtrl+UOpens a URL or MediaLocator for playback.File | Open RTP SessionCtrl+ROpens an RTP receive/playback session.File | Capture PreviewCtrl+PEnables you to monitor media data as it is captured.File | Capture ControlsEnables you to c
7、ontrol capture parameters.File | Save AsCtrl+AOpens a dialog from which you can transcode and save media data.File | TransmitCtrl+TOpens a dialog from which you can transmit media data over the network.File | Close PlayerCtrl+WCloses the current Player or Processor.File | Visited URLsOpens a menu fr
8、om which you can select a URL from a list of URLs recently accessed by JMStudio.File | New WindowCtrl+NLaunches a new instance of the JMStudio application.File | Plug-In ViewerCtrl+VOpens a window that displays the media processing flow.File | ExitTerminates the application.Player | Auto PlayToggles
9、 the auto play state of the current Player or Processor. When auto play is enabled, the player begins presenting the media stream automatically.Player | Auto LoopToggles the auto loop state of the current Player or Processor. When auto loop is enabled, the player automatically replays the media stre
10、am when the end of media is reached.Player | Maintain Aspect RatioMaintains the aspect ratio of the video window when the JMStudio window is resized.Player | Full ScreenCtrl+FExpands the JMStudio window to fill the entire screen. Click anywhere to restore the JMStudio window to its original size.Pla
11、yer | Snap ShotCtrl+STakes a snap shot of the current video frame being displayed.Help | About JMStudioCtrl+HDisplays an about box that contains the version number and copyright information for JMStudio.Playing Media Data with JMStudioJMStudio lets you play media streams from a variety of sources-fi
12、les, URLs, or RTP transmissions. Playing a FileTo play a file: 1. Select Open File from the File menu. The Open File dialog is displayed: 2. In the Open File dialog, select the file you want to play and click OK. A JMF Player for the selected file is created. If Auto Play is enabled, the player is s
13、tarted and presentation of the selected media file begins automatically. If the format of the file is not supported by JMF, an error message is displayed.Playing Media from a URL or MediaLocatorTo play a URL or MediaLocator: 1. Select Open URL from the File menu. The Open URL dialog is displayed: 2.
14、 In the Open URL dialog, enter the URL or MediaLocator you want to play, for example 3. Click Open. If the URL exists, and its format is supported by JMF, a JMF Player for this URL is created and started. If the URL cannot be found or the format is not supported by JMF, an error message is displayed
15、. Supported protocols for the JMF 2.0 Beta implementation include HTTP, FTP, and FILE.You can use the Open URL command to play any URL or media locator, including RTP media locators. When you use Open URL to play an RTP stream, the first stream of the RTP session is played. To use Open URL to play a
16、n RTP Stream: 1. Select Open URL from the File menu. 2. In the Open URL dialog, enter the media locator that identifies the RTP source from which you want to receive the RTP stream. For example, rtp:/:49150/audio/1. (See RTP Media Locator for a description of an RTP-specific media locator.) 3. Click
17、 Open. For more information about playing RTP streams, see Receiving and Playing RTP Streams. The Open URL command is also used to capture media data. For more information, see Capturing Media Data with JMStudio. Replaying a Previous File or URLTo replay a previously played file or URL, select Visit
18、ed URLs from the File menu. A hierarchical menu is displayed that contains all of the files and URLs previously played by JMStudio. This list is sorted by media type. When you select a file or URL from this menu, a new JMF Player is created and started. This list is maintained across application ses
19、sions. The list of visited URLs is stored in a file called .JMStudio in your home directory. The home directory varies depending on the Java VM that you use. So dont be surprised if all your visited URLs disappear when you use a different Java VM. Some common locations are C:, %USERPROFILE% and %WIN
20、DIR%Java. Receiving and Playing RTP StreamsTo receive a media stream using the RTP protocol: 1. Select Open RTP Session from the File menu. The Open RTP Session dialog is displayed: 2. In the Open RTP Session dialog, enter the session address in the Address field (eg. 129.144.251.181), enter the por
21、t no. in the Port field (eg. 23450) and select a TTL (Time To Live). This constitutes the address of the transmitting source (or multicast address if its a multicast transmission). You can read more about RTP session addresses in the Programmers Guide. The format of an RTP Media Locator is: rtp:/add
22、ress:port:ssrc/content-type/ttl where: addressThe IP address of the RTP sessionportThe port of the RTP session.ssrcSSRC Identifier of the source from which data is to be received. If ssrc is not specified, the first stream detected by the RTP Session Manager will be selected as a stream for the Data
23、Source.ttlTime to Live of the RTP session.content-typeA string defining the data content type. e.g. video, audio, motion, text, etc. The RTP media handler (Player) will be created for this specific media type. 3. After you enter the RTP session address and port, click the Open button. JMStudio creat
24、es an RTP Session Manager for the specified RTP media location. JMStudio displays two buttons during an RTP session: Statistics, and Close RTP Session: Clicking Close RTP Session closes the RTP Session Manager. Clicking the Statistics button opens a Participant List window that displays information
25、about the RTP session participants. This window contains another Statistics button that displays a window that displays the RTP session statistics. When RTP packets actually begin to arrive, a JMF Player is opened to present the RTP media stream. This player has all of the standard JMF presentation
26、controls except for the Seek bar, which is not relevant for RTP streams. For more information about sending and receiving RTP streams with JMF 2.0, see Receiving and Presenting RTP Media Streams in the Java Media Framework API guide. Controlling a Media PresentationWhile media data is being played,
27、the following controls are available: PlayStarts presentation of the media data. If the presentation was paused, playback resumes from the point at which it was paused.PausePauses presentation of the media data. The Play button will resume playback from the point at which it was paused.Step Back / F
28、orwardSteps back or forward by one frame. If either button is kept pressed, the action automatically repeats at the rate of two frames per second.SeekSets the media to a new playback position. You seek by dragging the Seek slider or clicking within the Seek bar. When the media is playing, the seek d
29、oes not take effect until the mouse button is released. When the media is paused, dragging the Seek slider will cause the video to be continually updated.MuteMutes the audio. The presentation (including video, if applicable) continues while the audio is muted. Clicking the Mute button mutes the audi
30、o, clicking it again resumes normal audio playback.VolumeRight-clicking on the Mute button pops up a volume slider. This sets the volume level. You can drag the volume slider to increase or decrease the volume. Dragging to the right increases the volume. In some situations, the volume slider is unav
31、ailable.InformationDisplays the media properties, which contains information about the media being played, including the JMF version, URL name, duration, bit rate, video encoding, window size, frame rate, audio encoding, and audio quality.ZoomRight-clicking on the video window displays a menu from which you can set the image scale. Available options are 1:2 (half size), 1:1 (normal size), 2:1 (double size) and 4:1 (quadruple size).RateRight-clicking on the Inform
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1