LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-17-2013, 01:23 PM   #1
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Rep: Reputation: Disabled
Apache handling mpg and mp4


Hello all I am having an issue with apache handling these types of files, i've added the AddType for both in the .htaccess file and in the httpd.conf and still nothing

here's what im getting


"GET /profile_videos/tdatech/1368814103-ResizedVideo_1360449282341.mpg HTTP/1.1" 304 -

any help please?
 
Old 05-17-2013, 03:33 PM   #2
Habitual
Senior Member
 
Registered: Jan 2011
Distribution: Slack14_64_Multilib
Posts: 3,074
Blog Entries: 4

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
http://drron.com.au/2008/07/09/dont-...s-your-friend/
 
Old 05-17-2013, 05:02 PM   #3
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Habitual View Post
Thank you for that , i was chasing a ghost in that respect then. However i guess the root of the problem is that its not handling MPG's or MP4's from my webserver. However ogg files work so I am still at a crossroads.

TypesConfig /etc/mime.types

in there i have

video/mp4 mp4 mpg4
video/MP4V-ES
video/mpeg mpeg mpg mpe
video/mpeg4-generic

Which is stock with the config so i know that's ok and here is my HTML.
Code:
		<video width="715" height="303" controls autoplay>
			<source src="profile_videos/tdatech/1368814103-ResizedVideo_1360449282341.mpg" type="video/mpg" />
			Your browser does not support the video tag.
		</video>
Thank you once again for the quick reply's i always get here and the help.
 
Old 05-20-2013, 02:08 PM   #4
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
I am still struggling with this one if anyone has another idea it would be very much appreciated.
 
Old 05-24-2013, 08:05 AM   #5
bloodstreetboy
Member
 
Registered: May 2012
Posts: 186
Blog Entries: 3

Rep: Reputation: 37
Why don't you use the player to play the files. Use this code in your html file.
Quote:
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td width="60%" align="center">
<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"
WIDTH="320" HEIGHT="256" >
<PARAM NAME="src" VALUE="http://localhost/flv-avi-mpg-mov-mkv-mp4-player/b.flv">
<PARAM NAME="autoplay" VALUE="true">
<PARAM NAME="controller" value="true">
<EMBED SRC="QTMimeType.pntg" TYPE="image/x-macpaint"
PLUGINSPAGE="http://www.apple.com/quicktime/download" QTSRC="http://localhost/flv-avi-mpg-mov-mkv-mp4-player/b.flv"
WIDTH="500" HEIGHT="300" AUTOPLAY="true" CONTROLLER="true">
</EMBED>
</OBJECT>
Now instead of this path
http://localhost/flv-avi-mpg-mov-mkv-mp4-player/b.flv
Give the proper path of the video file with sufficient permissions.
Now open this html file in browser and see if you are able to play the files or not.
 
1 members found this post helpful.
Old 05-25-2013, 05:28 PM   #6
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Thanks mate! how come it wouldn't play nice with HTML5 though?
 
Old 05-25-2013, 07:00 PM   #7
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Right then found a few issues with this way , can't play these videos on all browsers
 
Old 05-26-2013, 06:31 AM   #8
bloodstreetboy
Member
 
Registered: May 2012
Posts: 186
Blog Entries: 3

Rep: Reputation: 37
Have you flash installed in all your browsers?

Read these threads.
http://stackoverflow.com/questions/1...luding-firefox
http://stackoverflow.com/questions/7...s-all-browsers
 
Old 05-26-2013, 11:22 PM   #9
SernOne
Member
 
Registered: Oct 2012
Posts: 33

Original Poster
Rep: Reputation: Disabled
Well yes but I'm looking for a method of users to upload videos in their profiles. How come html5 doesn't work any other methods you can suggest?
 
Old 05-27-2013, 12:32 AM   #10
bloodstreetboy
Member
 
Registered: May 2012
Posts: 186
Blog Entries: 3

Rep: Reputation: 37
The HTML5 video may play in Safari, Chrome and IE 9 but not Firefox or IE 7-8. If you fix the MIME-type issue, it will play in Firefox.

If you’re using the Apache web server or some derivative of Apache, you can use an AddType directive in your site-wide httpd.conf or in an .htaccess file in the directory where you store your video files. (If you use some other web server, consult your server’s documentation on how to set the Content-Type HTTP header for specific file types.)
Quote:
AddType video/mpg .mpg
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm

AddType audio/mpeg .mp3
AddType audio/ogg .ogg
AddType audio/mp4 .m4a
AddType audio/wav /wav
Read this too
http://stackoverflow.com/questions/6...ot-from-server
http://stackoverflow.com/questions/1...eo-not-playing
http://stackoverflow.com/questions/6...145629#6145629
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a video from mp4/flv to mpeg/mpg sadikemre Linux - Newbie 5 03-11-2013 02:16 PM
[SOLVED] no thumbnail for flv file though present for mpg,avi & mp4 files sumeet inani Ubuntu 7 05-07-2010 04:53 AM
What you use to convert .avi/.mpg to .mp4 in linux? ishuaia Linux - Software 1 10-24-2007 06:07 PM


All times are GMT -5. The time now is 02:54 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration