Click here to Skip to main content
16,016,570 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dears,
when i save video with extension .mov i can play it on on all browsers correctly using the below code with VideoHandler
HTML
 <object width="288" height="300" id="MediaPlayer" type="application/x-oleobject"
  standby="Loading Windows Media Player components..." classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"                    codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
<param name="showControls" value="true">
<param name="autoStart" value="true">
<embed width="288" height="300" src="<%# "VideoHandler.ashx?id=" + Eval("id") %>"
type="application/x-mplayer2" showcontrols="1" autostart="0"></embed>
                </object>


but when i save video with extension .flv or .swf it doesn't work, i know this is normal but i used the below code and still can't play on any of the browsers

HTML
 <object width="288" height="300" id="MediaPlayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
                       type="application/x-oleobject" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0">
<param name="showControls" value="true">
<param name="allowfullscreen" value="true" />
<param name="allowscriptaccess" value="always" />
<param name="autoStart" value="true">
<embed width="288" height="300" src="<%# "VideoHandler.ashx?id=" + Eval("id") %>"
type="aapplication/x-shockwave-flash" showcontrols="1" autostart="0" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
                   </object>


and i get a message in the video player: "no plug-in available to display this content"
i tried to to install plug-in i get a message means that the plug-in is installed and enabled also i tried the online test for the player it works good so the problem is from my code
how can i solve it??

also i need to solve it because as i read that the best way is to convert all the videos to .flv before saving them into the db and use only one video player (flv) is this right? if yes is there any method to convert them without using any third party or any dll (i need only the clear code and free no dlls no closed controls not third party)
Thanksss
Posted
Updated 25-Jun-14 1:21am
v2

1 solution

The problem seems not with the code rather its the source file format that is causing the problem. Please note that .MOV, .SWF, .FLV represent different ways of storing the movie (CODEC: more formal way). This is same as saving an image to .JPEG, .GIF, .PNG, .BMP as each stored image in a different way.

You need to remember the file extension when you save the file as array so that the same extension can be attached to file when you re-create it. This probably is the easiest way otherwise converting each format (.MOV, .SWF, etc) to flv meant you have to understand each format and then convrting it into .FLV is hell of a task.
 
Share this answer
 
Comments
Member 10266297 26-Jun-14 1:40am    
my dear after uploading the video to my database and then download it, the video is playing normally and not corrupted i think this means that the video is stored successfully right? if not please can you support me with a method to store flv in database?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900