[Player-dev] Re: [Helix-client-dev] Re: Mimetype for rm video file
Milko Boic milko at real.comAt 02:14 PM 8/8/2006, Stanley Kao wrote: >Christina, > >So DataSource supports multiple streams right? DataSource support single SourceStream. SourceStream however can contain multiple media streams which is supported. handling of multiple streams from within a single file is not functionality specifically support by DataSource implementation by rather by standard helix file-format modules: DataSource -----------> Proxy F. Sys ---------> RealMedia File Format (chosen by mime-type) === Demuxed A/V streams ====> Milko >Hrmmm I wonder why it is not working for me. Ok thanks for your help and >clarification. Need to investigate more. > >-stan > > >From: Christina Dunn <cdunn at real.com> >To: "Stanley Kao" <aircow33 at hotmail.com>, >Helix-client-dev at helixcommunity.org, player-dev at helixcommunity.org >Subject: Re: Mimetype for rm video file >Date: Tue, 08 Aug 2006 13:01:16 -0700 > >Correction! You do not need to create two players. Using one player with >either the audio or video mimetype will work. >So for the following DataSoruce and InputStream examples, you will get >both audio and video playback from the helix engine. > >new MyPlayer().playDataSource("fileproxy://e:\\src\\music\\alice.rm"); >... >new MyPlayer().playInputStream("fileproxy://e:\\src\\music\\videotest.rm", >"video/x-pn-realvideo"); > > public void playDataSource(String url) { > > try { > DataSource ds = (DataSource) new MyDataSource(url, > SourceStream.NOT_SEEKABLE); > Player player = Manager.createPlayer(ds); > player.realize(); > > player.start(); > VideoControl video = > (VideoControl)player.getControl("VideoControl"); > setupVideo(video); > > System.out.println("Playing for 30s..."); > Thread.currentThread().sleep(30000); > > player.close(); > > } catch (MediaException pe) { > } catch (IOException ioe) { > } catch (InterruptedException ie) { > } > } > > public void playInputStream(String url, String mimeType) { > > try { > InputStream is1 = new java.io.FileInputStream(url); > Player p1 = Manager.createPlayer(is1, mimeType); > > p1.realize(); > > VideoControl video = > (VideoControl)p1.getControl("VideoControl"); > setupVideo(video); > > p1.start(); > > System.out.println("Playing for 20s..."); > Thread.currentThread().sleep(20000); > > p1.close(); > > } catch (MediaException pe) { > } catch (IOException ioe) { > } catch (InterruptedException ie) { > } > } > > >At 12:17 PM 8/8/2006, Christina Dunn wrote: >At 04:39 PM 8/7/2006, Stanley Kao wrote: > >Christina, > >So the file i am trying to test is videotest.rm that comes with real >player. I have used both video/x-pn-realvideo and audio/x-pn-realaudio >as mimetype and both doesnt work. With DataSource if the byte array >contains two streams, it will find the correct stream based on the >mimetype? Or will it get confused. > >Right now i am just reading the whole file which contains 2 streams and >giving that to DataSource. Do I need to manually separate the two streams? > > >No, just create two players, one that plays audio, one that plays video. >Or, it might be easier for your implementation to enhance the example >DataSource, 'MyDataSource', to have two SourceStreams. Below is an example >of how I played audio/video of the videotest.rm using InputStream. > >new MyPlayer().playInputStream2("e:\\src\\music\\videotest.rm", >"video/x-pn-realvideo", "audio/x-pn-realaudio"); >... > public void playInputStream2(String url, String mimeTypeVideo, String > mimeTypeAudio) { > try { > InputStream is1 = new java.io.FileInputStream(url); > InputStream is2 = new java.io.FileInputStream(url); > Player p1 = Manager.createPlayer(is1, mimeTypeVideo); > Player p2 = Manager.createPlayer(is2, mimeTypeAudio); > > p1.realize(); > > VideoControl video = > (VideoControl)p1.getControl("VideoControl"); // Get the video control > from the first player > setupVideo(video); // Setup the java window > > p1.start(); > p2.start(); > > System.out.println("Playing for 20s..."); > Thread.currentThread().sleep(20000); > > p1.close(); > p2.close(); > > } catch (MediaException pe) { > } catch (IOException ioe) { > } catch (InterruptedException ie) { > } > } > >--christina > > >-stan >From: Christina Dunn <cdunn at real.com> >To: "Stanley Kao" <aircow33 at hotmail.com>, >Helix-client-dev at helixcommunity.org, player-dev at helixcommunity.org >Subject: Re: Mimetype for rm video file >Date: Mon, 07 Aug 2006 16:25:51 -0700 >Stan, >DataSource only supports one stream, currently. You could try to create >two players, one with the audio stream, one with the video stream. This >hasn't been tested, but I don't see why it wouldn't work. >--christina >At 04:06 PM 8/7/2006, Stanley Kao wrote: > >So when i play the rm file in splay it shows that it actually has two >streams. first one is "audio/x-pn-realaudio", then the second one is >"video/x-pn-realvideo". What to do in this case? >-stan > > > >From: Christina Dunn <cdunn at real.com> >To: aircow33 at hotmail.com, Helix-client-dev at helixcommunity.org, >player-dev at helixcommunity.org >Subject: Re: Mimetype for rm video file >Date: Mon, 07 Aug 2006 15:37:22 -0700 > >Hi Stan, > > > >I usually run the clip in RealPlayer or splay and view the clip > >properties to find the correct mime type. > >For RealVideo the mime type is most likely "video/x-pn-realvideo", > >but you should double check with > >RealPlayer or splay. > > > >--christina > > > >At 03:02 PM 8/7/2006, stankao wrote: > >>Hi Chrstina, > >> > >>I am wondering for jsr135 kit for datasourceadapter what should be > >>passed in > >>for mimetype for rm video file. I tried "realVideo" but it > >>doesn't seem > >>to work. I can play the video file if I use the url and not from > >>the > >>inputstream. Any suggestions? > >> > >>-stan > > > > > > > >_______________________________________________ >Helix-client-dev mailing list >Helix-client-dev at helixcommunity.org >http://lists.helixcommunity.org/mailman/listinfo/helix-client-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.helixcommunity.org/pipermail/player-dev/attachments/20060808/b3eae341/attachment-0001.html