473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Mpg movie stops playing in browser

I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

http://www.askblax.com

Jan 15 '06 #1
14 2311
askMe said the following on 15/01/2006 12:57:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

<... SNIP BLATANT ATTEMPT AT SPAMMING ...>
Firstly, what does this have to do with PHP?

Secondly, if this isn't an attempt to spam, why have you not provided
sample HTML code, and a URL to the problematic page in question, or any
information about which browser you're using?
--
Oli
Jan 15 '06 #2
Oli Filth wrote:
askMe said the following on 15/01/2006 12:57:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.
<... SNIP BLATANT ATTEMPT AT SPAMMING ...>


Grow up already. This is not spamming. I am here looking for php
help. Wrong place?

http://www.askblax.com

Firstly, what does this have to do with PHP?
The application is developed in php. I'm sure there are javascript
solutions, but I'm looking for something that will work server side and
with reliably. I have tried working with the object tags as well and
none of the solutions I've found have worked consistently. The file
that needs to play is an mpg movie and I don't have tools to compress
it any further, but still need to play it online. I believe the
problem is in the file size and an inability to stream it.

Thanks.

Secondly, if this isn't an attempt to spam, why have you not provided
sample HTML code, and a URL to the problematic page in question, or any
information about which browser you're using?
I would have posted the code, but since the part that makes the video
run is using nothing but html's embed tag and php only for the name of
the clip to play, I didn't see the point. But here it is...

<?php
$do_video = "<embed width=320 height=260 src=../videos/$video clip=true
controller=true controls=true autoplay=false QUALITY=high
KEEPASPECTRATIO=true align=middle></embed>";
print "$do_video";
?>

It runs sometimes. Sometimes the video cuts off. I read somewhere
that this problem may be related to the timing out due to the video's
size.

--
Oli


Jan 15 '06 #3
askMe said the following on 15/01/2006 15:43:
Oli Filth wrote:
askMe said the following on 15/01/2006 12:57:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

<... SNIP BLATANT ATTEMPT AT SPAMMING ...>


Grow up already. This is not spamming. I am here looking for php
help. Wrong place?


Well, if it wasn't spamming, then I apologise, but you have to admit
that a post with zero information in an unrelated newsgroup and a URL to
a website, looks a lot like a ruse just to draw people to that website.
It wouldn't be the first time... ;)

Firstly, what does this have to do with PHP?


The application is developed in php.


Well, you didn't say that originally - and it still has no bearing on
the problem, as all PHP is doing is generating some HTML. The problem is
either with the HTML itself, or with the video file, or the way that
your server is serving up the video file, none of which is related to PHP.

You'd be far better asking this sort of question in alt.html or similar,
preferably with a URL to the page in question, so people have some
chance of figuring out what might be wrong.
--
Oli
Jan 15 '06 #4

Oli Filth wrote:
askMe said the following on 15/01/2006 15:43:
Oli Filth wrote:
askMe said the following on 15/01/2006 12:57:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

<... SNIP BLATANT ATTEMPT AT SPAMMING ...>

Grow up already. This is not spamming. I am here looking for php
help. Wrong place?


Well, if it wasn't spamming, then I apologise, but you have to admit
that a post with zero information in an unrelated newsgroup and a URL to
a website, looks a lot like a ruse just to draw people to that website.
It wouldn't be the first time... ;)


Ha ha... and yes I know. I didn't realize it until you pointed it out,
though. I had forgotten all about how harsh usenet can be. No apology
needed. My apoligies to you. :-)
Firstly, what does this have to do with PHP?
The application is developed in php.


Well, you didn't say that originally - and it still has no bearing on
the problem, as all PHP is doing is generating some HTML. The problem is
either with the HTML itself, or with the video file, or the way that
your server is serving up the video file, none of which is related to PHP.

You'd be far better asking this sort of question in alt.html or similar,
preferably with a URL to the page in question, so people have some
chance of figuring out what might be wrong.

I don't want to use the HTML. That is a temporary fix until I can find
or create the proper php object. I was hoping that someone could lead
me to the appropriate php object or some open source that would handle
this problem. I know that there are all sorts of home made php apps
out there that have the ability to either convert movies to other
formats, compress them using php, or create specialty objects that
mimmick flash objects even. I've seen a lot of them, but, the old
freebies are now trial applications that expire or require modifying
the server. Thank you anyway.

--
Oli


Jan 15 '06 #5
askMe wrote:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

http://www.askblax.com


Nothing happens in Firefox! It just loads up as a plain Web page.
Richard.

Jan 15 '06 #6
askMe wrote:
Oli Filth wrote:
Well, you didn't say that originally - and it still has no bearing on
the problem, as all PHP is doing is generating some HTML. The problem is
either with the HTML itself, or with the video file, or the way that
your server is serving up the video file, none of which is related to PHP.

You'd be far better asking this sort of question in alt.html or similar,
preferably with a URL to the page in question, so people have some
chance of figuring out what might be wrong.

I don't want to use the HTML. That is a temporary fix until I can find
or create the proper php object. I was hoping that someone could lead
me to the appropriate php object or some open source that would handle
this problem. I know that there are all sorts of home made php apps
out there that have the ability to either convert movies to other
formats, compress them using php, or create specialty objects that
mimmick flash objects even. I've seen a lot of them, but, the old
freebies are now trial applications that expire or require modifying
the server. Thank you anyway.


The behavior of the user's browser and/or media player is solely
determined by what gets output by your PHP code. Any objects or
whatever you create in PHP will have no bearing whatsoever on what the
browser gets - only the end result (the outputted HTML) is important.

If you can't get the video to play properly in a static HTML page, PHP
is going to be of no use to you. Personally, I'd say part of the
problem could be that the <embed> HTML tag is mostly obsolete, and you
should try using <object> -- but none of this has anything at all to do
with PHP.

-- David

Jan 15 '06 #7

Richard Brooks wrote:
askMe wrote:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

http://www.askblax.com

Nothing happens in Firefox! It just loads up as a plain Web page.


Thanks for checking. The beauty of PHP is that when a $variable
doesn't exist, it doesn't render the rest of the code inoperable like
in some other programming languages. PHP mistakes/problems are often
transparent. It ain't that *strict* if I remember correctly. That's
what I love about it.

Thanks for checking, though. I actually got the code I needed to work
with the appropriate object and the whole problem boiled down to the
object's classid being unavailable on the php server trying to serve it
up.

Richard.


Jan 16 '06 #8

David Wahler wrote:
askMe wrote:
Oli Filth wrote:
Well, you didn't say that originally - and it still has no bearing on
the problem, as all PHP is doing is generating some HTML. The problem is
either with the HTML itself, or with the video file, or the way that
your server is serving up the video file, none of which is related to PHP.

You'd be far better asking this sort of question in alt.html or similar,
preferably with a URL to the page in question, so people have some
chance of figuring out what might be wrong.
I don't want to use the HTML. That is a temporary fix until I can find
or create the proper php object. I was hoping that someone could lead
me to the appropriate php object or some open source that would handle
this problem. I know that there are all sorts of home made php apps
out there that have the ability to either convert movies to other
formats, compress them using php, or create specialty objects that
mimmick flash objects even. I've seen a lot of them, but, the old
freebies are now trial applications that expire or require modifying
the server. Thank you anyway.


The behavior of the user's browser and/or media player is solely
determined by what gets output by your PHP code.


Yes. I realize that. That is why I wanted a bona fide and tested PHP
object that the open sourcers have tried, validated and distributed as
final -- so that I don't have to waste time on this sort of trivial
stuff. Also, that is why I prefer to just print the code and let the
browser decide how to handle the tags that get printed instead of <?php
variable output?>. I realize this goes against the norm. Most
programmers that I know prefer to php print only the variable's value
at run time and feel that offers better encapsulation.
Any objects or
whatever you create in PHP will have no bearing whatsoever on what the
browser gets - only the end result (the outputted HTML) is important.

Yes. But, rather than output an <embed> tag, I'd prefer to out a
universal tag that is handled by IE, netscape, fox fire, opera... and
the list goes on. Ordinarily, if you can get it to work in IE, the
other browsers follow suit and handle background problems for you.
If you can't get the video to play properly in a static HTML page, PHP
is going to be of no use to you.
The video works. The mpg is embedded. It cuts off due to a timeout
limitation in PHP's default server settings.
Personally, I'd say part of the
problem could be that the <embed> HTML tag is mostly obsolete,
Obsolete tags are the best because everything developed afterwards has
to handle its functionality -- unless its functionality posed a
security risk. I don't know of any security risks related to the embed
tag. Do you?
and you
should try using <object>
I agree. That's how I ended up in this forum. All the examples of the
object tags I found did not work because I am developing in PHP. The
classid's were different from year to year and from browser to browser.
Guess its the nature of the beast. PHP has a flash library, but my
problem is not that deep currently.
-- but none of this has anything at all to do
with PHP.
Beg to differ there. Javascript doesn't have this problem. Java
doesn't have this problem. C++ doesn't have this problem. PHP does.
The PHP objects address dealing with server side conversions requiring
config mod installations and a gazillion other tweaks. I shouldn't
have to do so much research to play a video on a web page. If you
think I'm wrong, check out the prices of the applications that provide
solutions for dealing with this problem. They wouldn't be commanding
such prices if this problem were not unique to PHP. Attributing $value
to PHP code/modules/classes is a good thing for PHP and open source, so
please don't play it down as not being a PHP issue.

Thanks for your comment.

-- David


http://www.askblax.com

Jan 16 '06 #9
askMe wrote:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

http://www.askblax.com


To start, try cleaning up your html:

http://validator.w3.org/check?verbos...w.askblax.com/
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================
Jan 16 '06 #10
askMe wrote:
Yes. But, rather than output an <embed> tag, I'd prefer to out a
universal tag that is handled by IE, netscape, fox fire, opera... and
the list goes on.


<object> *is* supported by IE, Netscape, Firefox, Opera and the list goes
on.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Jan 16 '06 #11
askMe said the following on 16/01/2006 01:04:
David Wahler wrote:
The behavior of the user's browser and/or media player is solely
determined by what gets output by your PHP code.
Yes. I realize that. That is why I wanted a bona fide and tested PHP
object that the open sourcers have tried, validated and distributed as
final -- so that I don't have to waste time on this sort of trivial
stuff. Also, that is why I prefer to just print the code and let the
browser decide how to handle the tags that get printed instead of <?php
variable output?>.


What does that even mean? <?php echo $variable ?> outputs the content of
$variable; no involvement with the client/browser whatsoever. The
browser knows nothing about PHP.

I realize this goes against the norm. Most
programmers that I know prefer to php print only the variable's value
at run time and feel that offers better encapsulation.
Better "encapsulation" than what?

Any objects or
whatever you create in PHP will have no bearing whatsoever on what the
browser gets - only the end result (the outputted HTML) is important.


Ordinarily, if you can get it to work in IE, the
other browsers follow suit and handle background problems for you.


Well, if you think that's the case, I suggest you do a little more
research on embedding media in HTML, before even thinking about PHP.

If you can't get the video to play properly in a static HTML page, PHP
is going to be of no use to you.


The video works. The mpg is embedded. It cuts off due to a timeout
limitation in PHP's default server settings.


Please explain how you think that a PHP timeout setting (which controls
the maximum length of time PHP will execute a script before timing out)
has an effect on the client playing a video?

and you
should try using <object>


I agree. That's how I ended up in this forum. All the examples of the
object tags I found did not work because I am developing in PHP. The
classid's were different from year to year and from browser to browser.
Guess its the nature of the beast.


The classid is a client-side, HTML attribute of the HTML <object>
element; nothing whatsoever to do with PHP.

-- but none of this has anything at all to do
with PHP.


Beg to differ there. Javascript doesn't have this problem. Java
doesn't have this problem. C++ doesn't have this problem. PHP does.
The PHP objects address dealing with server side conversions requiring
config mod installations and a gazillion other tweaks.


What are you talking about? If it is possible to create a static HTML
page that works, then you can get PHP (or any server-side language, for
that matter) to produce identical HTML, and it will work. PHP settings
have nothing to do with how the client plays video.

I shouldn't
have to do so much research to play a video on a web page. If you
think I'm wrong, check out the prices of the applications that provide
solutions for dealing with this problem.
This is a problem with cross-browser compatibility, not a problem with PHP.

please don't play it down as not being a PHP issue.


It's not a PHP issue.
--
Oli
Jan 16 '06 #12
d
"Oli Filth" <ca***@olifilth.co.uk> wrote in message
news:Mx****************@newsfe3-win.ntli.net...
askMe said the following on 16/01/2006 01:04:
David Wahler wrote:
The behavior of the user's browser and/or media player is solely
determined by what gets output by your PHP code.
Yes. I realize that. That is why I wanted a bona fide and tested PHP
object that the open sourcers have tried, validated and distributed as
final -- so that I don't have to waste time on this sort of trivial
stuff. Also, that is why I prefer to just print the code and let the
browser decide how to handle the tags that get printed instead of <?php
variable output?>.


What does that even mean? <?php echo $variable ?> outputs the content of
$variable; no involvement with the client/browser whatsoever. The browser
knows nothing about PHP.

I realize this goes against the norm. Most
programmers that I know prefer to php print only the variable's value
at run time and feel that offers better encapsulation.


Better "encapsulation" than what?

Any objects or
whatever you create in PHP will have no bearing whatsoever on what the
browser gets - only the end result (the outputted HTML) is important.


Ordinarily, if you can get it to work in IE, the
other browsers follow suit and handle background problems for you.


Well, if you think that's the case, I suggest you do a little more
research on embedding media in HTML, before even thinking about PHP.

If you can't get the video to play properly in a static HTML page, PHP
is going to be of no use to you.


The video works. The mpg is embedded. It cuts off due to a timeout
limitation in PHP's default server settings.


Please explain how you think that a PHP timeout setting (which controls
the maximum length of time PHP will execute a script before timing out)
has an effect on the client playing a video?


If the MPG is being streamed through a php script, then if the script times
out before it's sent all the data, the video will stop.
and you
should try using <object>


I agree. That's how I ended up in this forum. All the examples of the
object tags I found did not work because I am developing in PHP. The
classid's were different from year to year and from browser to browser.
Guess its the nature of the beast.


The classid is a client-side, HTML attribute of the HTML <object> element;
nothing whatsoever to do with PHP.

-- but none of this has anything at all to do
with PHP.


Beg to differ there. Javascript doesn't have this problem. Java
doesn't have this problem. C++ doesn't have this problem. PHP does.
The PHP objects address dealing with server side conversions requiring
config mod installations and a gazillion other tweaks.


What are you talking about? If it is possible to create a static HTML page
that works, then you can get PHP (or any server-side language, for that
matter) to produce identical HTML, and it will work. PHP settings have
nothing to do with how the client plays video.

I shouldn't
have to do so much research to play a video on a web page. If you
think I'm wrong, check out the prices of the applications that provide
solutions for dealing with this problem.


This is a problem with cross-browser compatibility, not a problem with
PHP.

please don't play it down as not being a PHP issue.


It's not a PHP issue.
--
Oli

Jan 16 '06 #13
d said the following on 16/01/2006 12:39:
"Oli Filth" <ca***@olifilth.co.uk> wrote in message
news:Mx****************@newsfe3-win.ntli.net...
askMe said the following on 16/01/2006 01:04:
David Wahler wrote:

If you can't get the video to play properly in a static HTML page, PHP
is going to be of no use to you.
The video works. The mpg is embedded. It cuts off due to a timeout
limitation in PHP's default server settings.

Please explain how you think that a PHP timeout setting (which controls
the maximum length of time PHP will execute a script before timing out)
has an effect on the client playing a video?


If the MPG is being streamed through a php script, then if the script times
out before it's sent all the data, the video will stop.


This is true - however, in one of the OP's posts, (s)he stated that
(s)he's "using ... php only for the name of the clip to play ...
src=../videos/$video". So I'm assuming this isn't the case.

But, if it indeed is the case, then set_time_limit() is the solution,
assuming PHP is not running in safe mode.
--
Oli
Jan 16 '06 #14
askMe wrote:
Richard Brooks wrote:
askMe wrote:
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Thanks.

http://www.askblax.com


Nothing happens in Firefox! It just loads up as a plain Web page.

Thanks for checking. The beauty of PHP is that when a $variable
doesn't exist, it doesn't render the rest of the code inoperable like
in some other programming languages. PHP mistakes/problems are often
transparent. It ain't that *strict* if I remember correctly. That's
what I love about it.

Thanks for checking, though. I actually got the code I needed to work
with the appropriate object and the whole problem boiled down to the
object's classid being unavailable on the php server trying to serve it
up.


Let me know when you've done the updates. It keeps me from getting on
with what I'm meant to be doing without the guilt, if I just sat around
doing nothing! ;-)
Richard.
Jan 16 '06 #15

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Niall Linden | last post by:
Is there any way to put text on an avi or movie in a web browser. are there any browser plugins, movie players etc that can facilitate this. i found in flash you can have EMBED mode="transparent"...
2
by: Frances Del Rio | last post by:
pls how do I detect if .swf movie is playing or has stopped? .swf is in a pop-up, I would like to trigger a window.close() once Flash movie has stopped playing.. (pls don't lecture me about...
3
by: torchestra | last post by:
I have several movie clips and would wish to play them in sequence. There is possible to use the SetQTNEXTUrl property for the quicktime plugin, but it creates a black gap between the clips. Is...
1
by: torbs | last post by:
I have a problem when I use javascript to get the length and position of a movie I recieve from a rtsp stream. The length and position is extremely high and not the actual length and position of...
1
by: MattC | last post by:
Hi, I have a directory of movie files that I want users to be able to view and play in an Embedded media player. However I only want them to be able to access the movies from my asp.net page. ...
1
by: Marije | last post by:
Hi, I have a FlashObject on my WindowsForm. At some point I want to change the movie (.swf) it is playing but this doesn't seem possible. It just keeps playing the old one after a...
15
by: Gujuboy | last post by:
I have assignment to do, but i dont know how to start it off. I read from a text file( also print movies r playing first) , read each line and assign to each string and next line is the price so...
3
by: suresh_nsnguys | last post by:
Respected sir/madam, right now i am displaying movie (.wmv) file using <embed> and <object> tags inside <div> tag. Everything is working fine. ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.