User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Java section within the Software Development category of DaniWeb, a massive community of 456,520 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,821 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Java advertiser: Lunarpages Java Web Hosting
Views: 2659 | Replies: 5
Reply
Join Date: Apr 2007
Posts: 24
Reputation: ttamilvanan81 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ttamilvanan81 ttamilvanan81 is offline Offline
Newbie Poster

Need Help for playing a Video file in Java Application

  #1  
Oct 3rd, 2007
Hai everyone, I am working with one Image/Video Application using JSP.

In my jsp i need to displaying and playing a video file.
I am using the following Embed tag, for the video file.

 
<OBJECT 
ID="mediaPlayer" 
CLASSID= "clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE= "http://activex.microsoft.com/activex...ion=5,1,52,701"
TYPE="application/x-oleobject" 
STANDBY="Loading media player components..." 
HEIGHT="200" WIDTH="250"> 
<PARAM NAME="showcontrols" VALUE="true">
<PARAM NAME="autostart" VALUE="false">
<PARAM NAME="loop" VALUE="false">
<PARAM NAME="filename" VALUE="photo/video/<%=category%>/<%=image.elementAt(i*4+1)%>">
<EMBED TYPE="video/x-msvideo" 
STANDBY="Loading media player components…"
CONTROLLER="true" 
CONTROLS="ImageWindow,ControlPanel" 
SHOWCONTROLS="true" 
AUTOSTART="false" 
HEIGHT="200" WIDTH="250" 
SRC="photo/video/<%=category%>/<%=image.elementAt(i*4+1)%>" >
</OBJECT>

While using this Embed Tag, such type of video files are not playing(ex: *.flv, *.avi, *.mov, etc.,).

I need to play all types of video files in any browser.

Can anyone help me for this.

Waiting for replies..

Regards

Tamilvanan
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Dec 2006
Location: in a dream
Posts: 127
Reputation: nschessnerd is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
nschessnerd's Avatar
nschessnerd nschessnerd is offline Offline
Junior Poster

Re: Need Help for playing a Video file in Java Application

  #2  
Oct 3rd, 2007
this looks more like a html error instead of a jsp error. check out http://htmlhelp.com/reference/html40...al/object.html for more info on objects... if not then post under web dev [possibly jsp]
Reply With Quote  
Join Date: Apr 2006
Location: City of God
Posts: 163
Reputation: orko is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 10
orko orko is offline Offline
Junior Poster

Re: Need Help for playing a Video file in Java Application

  #3  
Oct 3rd, 2007
looks like you are using two similar tag inside of each other, which is resulting into nothing... you can refer to this site: http://cit.ucsf.edu/embedmedia/step1.php to get your embedding code... click on the media type, and give the information it is asking for, it will generate code for you... and plz post in the correct forum.... good luck...
A Perfect World
Reply With Quote  
Join Date: Apr 2007
Posts: 24
Reputation: ttamilvanan81 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ttamilvanan81 ttamilvanan81 is offline Offline
Newbie Poster

Re: Need Help for playing a Video file in Java Application

  #4  
Oct 4th, 2007
Hai, Thanks for your replies.
Still such type of files does not playing in browser, like(*.flv, *.avi, *.mp4, etc.,)

In your References, there are separate Embed Tags for each player, such as separate Embed Tag for Windows Media Player, Real Player, Quick Time Player.

But in my system there is installed Windows Media Player only.

I have used the following code for windows media player, to play the video files such as (ex: *.wmv, *.mov, *.mpeg, *.mpg, *.avi, *.flv, *.mp4, etc.,).

 
<object type="video/x-ms-*" 
  data="photo/video/baby/1@barsandtone.flv" 
  width="420" height="360">
  <param name="autostart" value="true" />
  <param name="controller" value="true" />
</object>
 
and
 
<object type="video/x-ms-wmv" 
  data="photo/video/baby/1@barsandtone.flv"
  width="320" height="260">
  <param name="src" 
    value="<A href="photo/video/baby/1@barsandtone.flv"/>"
  <param name="autostart" value="true" />
  <param name="controller" value="true" />
</object>

and this also

<OBJECT id='mediaPlayer' width="320" height="285" 
      classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' 
      codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
      standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
      <param name='fileName' value="photo/video/baby/1@barsandtone.flv">
      <param name='animationatStart' value='true'>
      <param name='transparentatStart' value='true'>
      <param name='autoStart' value="true">
      <param name='showControls' value="true">
      <param name='loop' value="true">
      <EMBED type='application/x-mplayer2'
        pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
        id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' 
        bgcolor='darkblue' showcontrols="true" showtracker='-1' 
        showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
        src="photo/video/baby/1@barsandtone.flv" autostart="true" designtimesp='5311' loop="true">
      </EMBED>
      </OBJECT>


But for those types there are *.flv, *.mp4, *.avi files does not play with this Embed Tag

I need to play all those types of video files also in a same Embed Tag in any browser.

So if there is any aother solution

Thanks in advance

Tamilvanan
Last edited by ttamilvanan81 : Oct 4th, 2007 at 4:23 am.
Reply With Quote  
Join Date: Apr 2006
Location: City of God
Posts: 163
Reputation: orko is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 10
orko orko is offline Offline
Junior Poster

Re: Need Help for playing a Video file in Java Application

  #5  
Oct 4th, 2007
i still can't understand your question... so u r saying u know how to embed flv or not?
for the media files, it does not matter what type of file you want to play, but what type of object you want to embed.... suppose, for a mpg file, you need to embed windows media player, not mpg file it self... thn u will pass the location of mpg file to the object media player as a parameter... same way, flv is a flash document... u need to know how to embed a flash object... (i am not sure if you can run a flv file using windows media player)... same thing goes for mp4, avi.
if you move this topic to web developers forum in this website, you may find better response.
A Perfect World
Reply With Quote  
Join Date: Apr 2007
Posts: 24
Reputation: ttamilvanan81 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
ttamilvanan81 ttamilvanan81 is offline Offline
Newbie Poster

Re: Need Help for playing a Video file in Java Application

  #6  
Oct 9th, 2007
Hai, still i am having the problem,
I have attached the jsp file, what i have used, please refer the file, and let me know what else i have done. The filename was videos.zip

In this file i have using separate Embed/Object Tag for each type of video files, and in my system installed Windows Media Player, Flash player, VLC Media Player.

So with this condition, what can i do for this...

Please reply me, i am waiting for replies.
Attached Files
File Type: zip videos.zip (2.5 KB, 9 views)
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Java Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Java Forum

All times are GMT -4. The time now is 4:11 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC