Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Internet video not playing

Status
Not open for further replies.

1gbram

Technical User
Jul 1, 2006
69
GB
i have recently set up a small web site using Apache 2.2.3; my web site works fine untill I try to play a video off it. I have tried embedding it as well as stand alone, but windows media player just brings up the message 'Windows Media Player cannot play the file. The Player might not support the file type or might not support the codec that was used to compress the file.' I have tried using .wmv and .avi videos but neither work and their both on the format list.
I'm using Windows XP media center with SP.2 and apache sever 2.2.3
Thanks to anyone that can help!!
 
In the mine.types, the format .avi is apparantly added, although .wmv is not there. How would you add the .wmv format?
 
I think I'v added .wmv but neither of them work!!
 
Ok, I noticed that the format wasn't direcly in the httpd.conf file, but only in the mini.types (as video/wmv and video/x-msvideo (avi)) and was linked to httpd file with (TypesConfig conf/mime.types). I also tried just putting in 'Addtypes video/wmv' to the httpd file, after doing this the sevice would not run so I have restet it, this is (i asume) the wrong sytax, does any one know the right one?
 
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types

#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz


#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

# For type maps (negotiated resources):
#AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>
 
The new file looks like this;
<IfModule mime_module>
#
# TypesConfig points to the file containing the list of mappings from
# filename extension to MIME-type.
#
TypesConfig conf/mime.types

#
# AddType allows you to add to or override the MIME configuration
# file specified in TypesConfig for specific file types.
#
#AddType application/x-gzip .tgz
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
#
#AddEncoding x-compress .Z
#AddEncoding x-gzip .gz .tgz
#
# If the AddEncoding directives above are commented-out, then you
# probably should define those extensions to indicate media types:
#
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
Addtypes video/wmv

#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
#AddHandler cgi-script .cgi

# For type maps (negotiated resources):
#AddHandler type-map var

#
# Filters allow you to process content before it is sent to the client.
#
# To parse .shtml files for server-side includes (SSI):
# (You will also need to add "Includes" to the "Options" directive.)
#
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
</IfModule>

But now the service will not run!
Also after looking in the Error log file I found this;

Syntax error on line 384 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf:
Invalid command 'Addtypes', perhaps misspelled or defined by a module not included in the server configuration
 
New error message;
Syntax error on line 486 of C:/Program Files/Apache Software Foundation/Apache2.2/conf/httpd.conf:
AddType requires at least two arguments, a mime type followed by one or more file extensions

By using the line AddType Video/WMV
 
Sorry, didn't see that link. I put the formats into the httpd file as well as the mime file and restarted the server. After this the server (amazingly) started normally, but still nothing on the videos!!
 
Would it be a possibility that downloading wideos users a diffrent port, which is blocked?
 
Do you have an example of this problem in real life we can see? Do you have any evidence that it is/not related to your browser configuration? What is the URL you are using to offer this? What errors are you seeing?!

If you want help, saying "it doesn't work" is not sufficient background.

D.E.R. Management - IT Project Management Consulting
 
If you wish to see the error, go to http//clay-movies.piczo.com goto videos and try them. I'v also tried if from a diffrent Pc in a friends house. The link may not work as I need to change the link as I don't yet have a static IP, sorry.
 
So now I can see... I was able to click onto the two videos that are .wmv and are directly linked...

Here's the result from my linux-command line effort to see your Apache headers:

Code:
wget -S [URL unfurl="true"]http://86.112.190.58/myweb1/movies/Jameskillmorgs.wmv[/URL]
--15:35:43--  [URL unfurl="true"]http://86.112.190.58/myweb1/movies/Jameskillmorgs.wmv[/URL]
           => `Jameskillmorgs.wmv'
Connecting to 86.112.190.58:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Fri, 03 Aug 2007 20:35:49 GMT
  Server: Apache/2.2.3 (Win32)
  Last-Modified: Mon, 23 Apr 2007 20:17:47 GMT
  ETag: "1de3d-3fd3e5-5cd0131a"
  Accept-Ranges: bytes
  Content-Length: 4183013
  Keep-Alive: timeout=5, max=100
  Connection: Keep-Alive
  Content-Type: video/x-ms-wmv
Length: 4,183,013 (4.0M) [video/x-ms-wmv]
...and then the download began.
But when my Windows Media Center Media Player v9 went to play these files, they were declared broken and/or corrupt.

so....

I went and found some other random sample .WMV file embedded out in the wild and looked at their headers
Code:
wget -S [URL unfurl="true"]http://images.linspire.com/file_types/clips.wmv[/URL]
--15:47:04--  [URL unfurl="true"]http://images.linspire.com/file_types/clips.wmv[/URL]
           => `clips.wmv'
Resolving images.linspire.com... 130.94.123.206
Connecting to images.linspire.com|130.94.123.206|:80... connected.
HTTP request sent, awaiting response...
  HTTP/1.1 200 OK
  Date: Fri, 03 Aug 2007 20:47:05 GMT
  Server: Apache
  Last-Modified: Wed, 23 Jul 2003 01:11:50 GMT
  ETag: "f0272-152f4e-3f1de0d6"
  Accept-Ranges: bytes
  Content-Length: 1388366
  Connection: close
  Content-Type: video/x-ms-wmv
Length: 1,388,366 (1.3M) [video/x-ms-wmv]

I am inclined to believe what Windows Media player is saying - your Apache and MIME settings are fine, your video files have become corrupt.




D.E.R. Management - IT Project Management Consulting
 
But the files run fine when I run them direcly of my Pc? And I also tried a file whick I did not build in windows movie maker and that didn't work. I know the files are not corrupt, so could be being messed with while leaving my computer?
 
So the differences between your testing and mine:

1) Possible differences in Windows Media Player, it's ensuing codecs, DRM modules, and general version of WMP.
2) OS versions... I'm on XP Home
3) Apache delivery method.
4) Something is happening to the files when you post them to your server.

Q: If you are using FTP from your PC to the server, can you confirm that you are using BIN mode in order to transport the file to your server? Otherwise that would account for the corruption.

I'm NOT an expert in this technology space, but I maintain that there's something wrong in the transport of your files to the server.

D.E.R. Management - IT Project Management Consulting
 
OS: Microsoft XP Media center (Very simular to Pro)
My Pc is the server, so I can just copy the files from My Documents to the HtDocs file (is this the wrong way to do it?)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top