phpBB, mp4 and iPads

Do not post support requests, bug reports or feature requests. Discuss phpBB here. Non-phpBB related discussion goes in General Discussion!
Get Involved
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

phpBB, mp4 and iPads

Post by shortmort37 »

I hacked 3.1.4 to permit the upload of html5 video, described here: viewtopic.php?f=496&t=2319361

(Not an extension! Please don't move this topic there - it's more a general discussion about Apple products and video formats.)

On Windows, I can play mp4, webm and ogv from my phpBB site in both Chrome and Firefox. (IE11 can play mp4 readily, and webm with an addon.) But, I cannot get mp4 to play on my iPad within phpBB, either with Chrome or Safari. However...

I loaded my mp4 directly to here: www.59plymouth.net/m4v (yes, I experimented with producing m4v with Handbrake as well). If I click on the mp4 file, it plays fine - in both Chrome and Safari on my iPad. (So does the m4v.)

So, there is something about phpBB on the iPad that is tripping it up. Does anyone have a clue what might be the problem?

adTHANKSvance,
Dan
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

*Bump*.

OK, I have some new information - it has to do with file.php in the download directory. If I directly reference the video, it works on any platform (including iPad) - if I use file.php on the iPad, it fails. Check this out:

Code: Select all

<html>
  <head>
    <meta name="viewport" content="width=device-width">
  </head>
  <body>
  <!-- This works on Windows Chrome, Firefox, and iPod Safari -->
  		<video controls name="media"width="320" height="285">
            <source src="http://www.59plymouth.net/phpBB/MVI_4054.mp4" type="video/mp4">
        </video>
  <!-- This works on Windows Chrome and Firefox, but not on iPod Safari -->
		<video controls name="media"width="320" height="285">
            <source src="../59test/download/file.php?id=7390" type="video/mp4">
        </video>
  </body>
</html>
You can find it at http://www.59plymouth.net/phpBB/test.html. Works on Windows Chrome and Firefox, not on iPad Chrome or Safari.
Last edited by shortmort37 on Thu Jun 11, 2015 12:56 am, edited 1 time in total.
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

*Bump*!

Does anyone have a clue for me? I don't have a PHP IDE, so I'll be reduced to hacking file.php with print statements if folks can't point me in the right direction...

Thanks
Dan
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52133
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB, mp4 and iPads

Post by Brf »

shortmort37 wrote:(Not an extension! Please don't move this topic there - it's more a general discussion about Apple products and video formats.)
There is no support here for Apple products or video formats. Maybe you would have better luck on a support board for one of those.
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: phpBB, mp4 and iPads

Post by A_Jelly_Doughnut »

Brf wrote: There is no support here for Apple products or video formats. Maybe you would have better luck on a support board for one of those.
I would say that this could be a phpBB bug. Just like a bug that prevents video from playing in Chrome would be.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52133
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB, mp4 and iPads

Post by Brf »

You think so?
It would appear more like it is a problem with the browsers. If the OP's phpBB mod is presenting the file with a proper mime-type, it might be that the device webbrowsers are specifically looking for the file extension and see the .php extension instead -- that they can only display it if the file is specifically linked with the proper extension.
This works on Windows Chrome and Firefox, but not on iPod Safari
How about IPod Chrome? Is this a problem specifically to Safari, or to the device?
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

A_Jelly_Doughnut wrote:
Brf wrote: There is no support here for Apple products or video formats. Maybe you would have better luck on a support board for one of those.
I would say that this could be a phpBB bug. Just like a bug that prevents video from playing in Chrome would be.
Well, it definitely is a phpBB bug. In the code snippet I give above (and in the reference to my site), there are side by side videos - the left sans file.php call, the right with the file.php call.

Both play in Chrome, in Windows.

Only the left plays in Chrome, on the iPad.

So it's not a problem with the video, or the platform. It's a problem with file.php invoking the video on the iPad platform. Too bad, that seems to make it uninteresting to phpBB admins.
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52133
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB, mp4 and iPads

Post by Brf »

I replied as you were typing...
So it does not work on IPad Chrome either.

So, this depends on whether you view phpBB pushing the video through file.php at the browser, or you view the browser as pulling the video through file.php. Somewhere in there it is breaking. PhpBB would be presenting the contents of the video either way. Is it that the contents are not getting to the browser, or that the browser is not attempting to pick-up the contents, since the source is presented with a php extension? That might be a question to ask the browser authors.
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

Brf wrote:I replied as you were typing...
So it does not work on IPad Chrome either.
Just to clarify - the video does work on iPad Chrome. It also works on iPad Safari.

It just doesn't work, when file.php is invoked to deliver it as the source parameter.
Brf wrote: So, this depends on whether you view phpBB pushing the video through file.php at the browser, or you view the browser as pulling the video through file.php. Somewhere in there it is breaking. PhpBB would be presenting the contents of the video either way. Is it that the contents are not getting to the browser, or that the browser is not attempting to pick-up the contents, since the source is presented with a php extension? That might be a question to ask the browser authors.
These are good questions. Not sure how to get to the browser authors, but for starters I think I'll sprinkle liberal print statements in a copy of file.php. Like I say - I'm just a hacker! :lol: But I hope to gather some more info.

Thanks
Dan
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52133
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB, mp4 and iPads

Post by Brf »

shortmort37 wrote:
Brf wrote:I replied as you were typing...
So it does not work on IPad Chrome either.
Just to clarify - the video does work on iPad Chrome. It also works on iPad Safari.

It just doesn't work, when file.php is invoked to deliver it as the source parameter.
I meant it does not work through file.php with IPad Chrome either, so it is not just a Safari problem.
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: phpBB, mp4 and iPads

Post by Pony99CA »

shortmort37 wrote:Both play in Chrome, in Windows.

Only the left plays in Chrome, on the iPad.

So it's not a problem with the video, or the platform. It's a problem with file.php invoking the video on the iPad platform.
You haven't proven that it's not a platform problem at all. You've shown that the video file itself is good, but the fact that it plays either way on Windows could imply that phpBB is serving the video properly and that something on the Apple side is not allowing it to play.

It could also be that phpBB isn't serving the file just right, but Windows is able to handle it while Apple isn't. Unfortunately, we can't infer which alternative is correct at this point.

To try to find out where the problem really is, I would copy the video file to test.php, then try this third example.

Code: Select all

        <video controls name="media" width="320" height="285">
            <source src="http://www.59plymouth.net/phpBB/test.php" type="video/mp4">
        </video>
See which platforms and browsers (if any) can play the video that way.

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

Pony99CA wrote: To try to find out where the problem really is, I would copy the video file to test.php, then try this third example.

Code: Select all

        <video controls name="media" width="320" height="285">
            <source src="http://www.59plymouth.net/phpBB/test.php" type="video/mp4">
        </video>
See which platforms and browsers (if any) can play the video that way.
Inneresting... Ain't nobody happy with the third choice! (I added your snippet to .../phpBB.test.html.)

So - what does this tell me?

Thanks
Dan
User avatar
Brf
Support Team Member
Support Team Member
Posts: 52133
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: phpBB, mp4 and iPads

Post by Brf »

That way would never work.
PHP files are not served up to the webbrowser at all. They are executed by the host's PHP engine, with the output served to the webbrowser. The PHP engine is not going to be able to execute the MP4 file, so nothing would be served to the webbrowser.
Pony99CA
Registered User
Posts: 4783
Joined: Thu Sep 30, 2004 3:13 pm
Location: Hollister, CA
Name: Steve
Contact:

Re: phpBB, mp4 and iPads

Post by Pony99CA »

Brf wrote:That way would never work.
PHP files are not served up to the webbrowser at all. They are executed by the host's PHP engine, with the output served to the webbrowser. The PHP engine is not going to be able to execute the MP4 file, so nothing would be served to the webbrowser.
Hmmm, I was hoping that the type="video/mp4" attribute would override PHP trying to handle the file. Sorry for the red herring, I guess. :oops:

The point remains that we still don't know whether it's a phpBB problem or an Apple problem, though. So how does one diagnose which it is?

Steve
Silicon Valley Pocket PC (http://www.svpocketpc.com)
Creator of manage_bots and spoof_user (ask me)
Need hosting for a small forum with full cPanel & MySQL access? Contact me or PM me.
User avatar
shortmort37
Registered User
Posts: 525
Joined: Sat Aug 26, 2006 8:40 pm
Location: Upper Darby, PA, USA
Name: Dan Morton
Contact:

Re: phpBB, mp4 and iPads

Post by shortmort37 »

Pony99CA wrote:So how does one diagnose which it is?
Dang if I know. I'm just a hacker, so I do what I know how to do - slather on comments.

But, it seems that not only does this not work, it artificially breaks what used to work. So,

http://www.59plymouth.net/phpBB/test1.html

displays the same video, the upper directly referenced, the lower fetched by file.php. (That is, it works on Windows, not on the iPad.)

http://www.59plymouth.net/phpBB/test2.html

does the same, but includes this snippet of code before the "send_file_to_browser" call in file.php:

Code: Select all

		$fh = fopen("./test.txt", 'w');
		$text = "Made it here";
		fwrite($fh, $text);
		fclose($fh);
			send_file_to_browser($attachment, $config['upload_path'], $display_cat);
It breaks the second video (so did echo and print, which is why I resorted to writing to a file) - and, the file doesn't get written.

I was hoping to be able to print some diagnostic statements in Windows, so I could then test in iOS on the iPad. But if I can't do it it Windows, how do I diagnose? What am I doing wrong? This hacker wants to know...

Thanks
Dan
Post Reply

Return to “phpBB Discussion”