Click here to Skip to main content
15,569,696 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
in my project i am trying to display the video file.. which only plays the audio not the video.. i am running this in chrome 38.0.2125.111 m

these videos and images are stored in folder of xampp.and in database i stored the path of these files.
if ($db_found) 
			$query ="SELECT * FROM `upload_file`";
			$result = mysql_query($query,$db_handle);	
	//$row_cmp=mysql_fetch_array($result_cmp, MYSQL_ASSOC);
		echo "<div class="product">";
		while($row = mysql_fetch_array($result, MYSQL_ASSOC))

			if (preg_match("/\.jpg$/i",$src)){
			echo "<img src='$src' height='200' width='200' alt='Image not Found' style='padding:10px 10px 10px 10px'/>";
			echo "">";
			echo "<video width='200' height='200' controls style='padding:10px 10px 10px 10px'> <source src="$src" type="video/mp4">Your browser does not support this video. </video>";echo "^__b style="margin-removed-100px">Name: <a href="info.php">$name</a>";

	echo "</source></div>";
Updated 20-Nov-14 5:07am
Sergey Alexandrovich Kryukov 20-Nov-14 12:19pm    
Do you mean that you can hear audio of the video MPEG-4 file? Can you see and hear both is you use some available player? The container format of codec might be unsupported. There is not such thing as just MPEG-4. There are too many combinations of different containers (in MPEG-4 terminology, there are different "levels") and particular codecs...
Member 11250252 20-Nov-14 14:28pm    
how to solve this problem?
Sergey Alexandrovich Kryukov 20-Nov-14 16:21pm    
Find out what is that first. Re-master to something more compatible.
Member 11250252 20-Nov-14 14:19pm    
is there any solution for that??

1 solution

Member 11250252 asked:

how to solve this problem?
First, read on the compatibility of HTML5 video element with media formats and codecs:[^].

Then, learn what your files are and re-master them to something which is more likely to work. For both things, the best tool I know is FFmpeg or libav set or open-source utilities:[^],[^],[^],[^].

These tools are good for nearly all chores related to media, and also can be used in programming. The set of formats and codecs embedded or plugged-in in this product is also the most comprehensive one.

By the way, on Windows, it's good to have K-Lite Codec Pack with Windows Media Player Classis, which also provides good diagnostics. One alternative is VLC, which does not depends on codecs but uses libav codec set internally.

Share this answer

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