Add capability to play HTML5 native formats without bbcode

Looking for an Extension? Have an Extension request? Post your request here for help. (Note: This forum is community supported; while there is an Extensions Development Team, said team does not dedicate itself to handling requests in this forum)
Get Involved
User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

<source src="./files/{_file.P_FNAME}" type="{_file.MIMETYPE}">

this is a direct link to the file on the server. Because I tought that if the problem is on file.php, and browsers cant know that their is a video, then I put a direct link to the video.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

A friend of mine sent me a test, and it worked on his mac.
Image

he tested on safari (picture) and chrome, and it worked on both.
Last edited by Leinad4Mind on Sat Feb 27, 2016 12:50 am, edited 1 time in total.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

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

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Yeah. Well, my problem is with iOS, not with OS X (although, it may be).

And the subdir ".../files" exists nowhere in the phpBB hierarchy. <yourboard>/download/file.php does, however - sans "s".

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

I see! I'll try and test it on iOS smartphones then ;)

Btw, its not download/file.php, Im pointing to the folder root/files/ where you have all attachments

viewtopic.php?f=64&t=1035445
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

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

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Leinad4Mind wrote: Btw, its not download/file.php, Im pointing to the folder root/files/ where you have all attachments
I see. But, you're referencing root/files from code in root/styles/prosilver/template/attachment.html. This is where I don't know much about PHP: At execution time, are all file references relative to root?

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

Yes, they will go to root. Because im writing a point ./files/ the ./ means root.

EDIT: Can you test my website again please?
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

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

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Your latest post mentions a test of bbcode. Is that how you did it?

I wish to avoid bbcode. Here are my reasons, from the initial post:
I'd like to see an extension that incorporates the edits I describe below. These add the capability to play mp4, webm and ogv video attachments, and mp3 audio attachments natively within an HTML5-compatible browser, without the use of bbcode, e.g., [media]. This makes it easier for my non-tech-savvy users to upload videos to my hosted site, without having to reference another location for the video, and without having to wrap with bbcode.
For some of my board members, it's all they can do to drag and drop an attachment!

It doesn't take bbcode to play an .avi on any browser. And with HTML-5, it shouldn't take bbcode to play an .mp4 either. We just haven't figured out the solution yet - but, the answer isn't bbcode.

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

I know that I just want to know if the bbcode video works and if the other one with the play video button if it works.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

User avatar
3Di
Former Team Member
Posts: 15071
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by 3Di »

Ok, all of this being said...

You guys haven't ever had a chance to try out this extension?
viewtopic.php?f=456&t=2272431

You can ask the author to give you an hint, in case.
Please PM me only to request paid works. Thx.
Want to compensate me for my interest? Donate
My development's activity º PhpStorm's proud user
Extensions, Scripts, MOD porting, Update/Upgrades
:studio_microphone: Premium extensions @ The Studio

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

I wasn't aware of that. I was thinking on using js to bypass all Problems. Thanks for the information. I'll test it out.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

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

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

3Di wrote:Ok, all of this being said...

You guys haven't ever had a chance to try out this extension?
viewtopic.php?f=456&t=2272431

You can ask the author to give you an hint, in case.
I've heard of it. You missed the other part of my "mission statement":
This makes it easier for my non-tech-savvy users to upload videos to my hosted site, without having to reference another location for the video, and without having to wrap with bbcode.

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

Re: Add capability to play HTML5 native formats without bbcode

Post by shortmort37 »

Leinad4Mind wrote:I know that I just want to know if the bbcode video works and if the other one with the play video button if it works.
Yeah, bbcode works on iOS.

The other is still busted, though.

User avatar
stefd75
Registered User
Posts: 10
Joined: Sat Feb 20, 2016 1:39 pm

Re: Add capability to play HTML5 native formats without bbcode

Post by stefd75 »

Hello !

hello @leina :D

I've exactly the same problem, and i try with @leina to resolv it : i want to have the possibility to add videos mp4 as attachments in my forum.
I made many tests during last weeks, and the problem is video mp4 have problems with <video> HTML5 code on Safari and all devices Apple.

What tests i did.
- try with multiples examples of <video> code, with mime, with codecs, with bla bla ... same problem
- try with multiples player jsplayer, videojs, flowplayer, kawaplayer instead of <video> ... same problem

- try with direct link to attachment physical_name like this (ex: 12010_12abdref2145ertyufdftyop124op)

Code: Select all

 ... same problem
<video src="./files/12010_12abdref2145ertyufdftyop124op}" width="75%" height="75%" controls preload type="{_file.MIMETYPE}">
			 Votre navigateur ne permet pas de lire les vid&eacute;os.<br>
			 T&eacute;l&eacute;chargez Firefox<br>

so
- i test to upload manually with ftp an attachment directly in the attachments dir (for me /files/) and not rename it with the sequential system unique id. .... so if my video is called "testvideo.mp4", i just rename it in myid_id01_namefiles.mp4 => it give : 12010_0001_testvideo.mp4 (instead of 12010_12abdref2145ertyufdftyop124op with upload attachment system of phpbb)
- i add this information in the phpbb_attachment table, with extension, type mime, etc

and with this solution, it's work on all device included IOS, APPLE AND MORE if u put this code in attachment.html

Code: Select all


<video src="./files/{_file.P_FNAME}" width="75%" height="75%" controls preload type="{_file.MIMETYPE}">
			 Votre navigateur ne permet pas de lire les vid&eacute;os.<br>
			 T&eacute;l&eacute;chargez Firefox<br>
			</video>
and using this js in overall_header.

Code: Select all

<script src="//api.html5media.info/1.1.8/html5media.min.js"></script>

so for sure, the only one solution for me is to change the posting system for attachments type html5 of phpbb
- if video mp4 => do not encrypted the name in physical_name but like this : iduser_idunique_namevideo_extension.

And it will work for everybody
But i dont have coding competence to do this myself and i'm looking for sometone able to do this, i think it's not very long, may be it's possible to do posting_video.php and posting_attachments_video.html .

nikitasius
Registered User
Posts: 15
Joined: Thu Apr 16, 2015 9:34 am

Re: Add capability to play HTML5 native formats without bbcode

Post by nikitasius »

if someone put link
http://example.com/video.mp4 or http://example.com/audio.mp3
You can wrap it in html5 tags using ngx_http_substitutions_filter_module. And nginx will modify html output from apache/php-fpm for user. Just use regexp syntax.

And here is mencoder for apple format (and it works in firefox or any platform):
for mp4

Code: Select all

mencoder in.mp4 -o out.mp4 -vf pullup,softskip,harddup -of lavf -oac faac -faacopts mpeg=4:object=2:raw:br=192 -aid 0 -ovc x264 -sws 9 -x264encopts nocabac:bframes=0:nofast_pskip:psnr:ssim:b_adapt=2:bitrate=2048:8x8dct:deblock:weight_b:global_header:me_range=32:nodct_decimate:threads=4:subq=9:frameref=9:partitions=all:aq_strength=1.0:aq_mode=1:mixed_refs:trellis=2:chroma_me:me=umh
For mov files with audio less than 8kHz:

Code: Select all

mencoder in.mov -o out.mp4 -vf pullup,softskip,harddup -of lavf -oac faac -af resample=44100 -srate 44100 -faacopts mpeg=4:object=2:raw:br=192 -aid 0 -ovc x264 -sws 9 -x264encopts nocabac:bframes=0:nofast_pskip:psnr:ssim:b_adapt=2:bitrate=4096:8x8dct:deblock:weight_b:threads=4:global_header:me_range=32:nodct_decimate:subq=9:frameref=9:partitions=all:aq_strength=1.0:aq_mode=1:mixed_refs:trellis=2:chroma_me:me=umh
For mov files with audio better than 8kHz:

Code: Select all

mencoder in.mov -o out.mp4 -vf pullup,softskip,harddup -of lavf -oac faac -faacopts mpeg=4:object=2:raw:br=192 -aid 0 -ovc x264 -sws 9 -x264encopts nocabac:bframes=0:nofast_pskip:psnr:ssim:b_adapt=2:bitrate=2048:8x8dct:deblock:weight_b:global_header:me_range=32:nodct_decimate:threads=4:subq=9:frameref=9:partitions=all:aq_strength=1.0:aq_mode=1:mixed_refs:trellis=2:chroma_me:me=umh
I use such settings in my private gallery. Just upload videos/photos from differ photocams and my phone and run SH script. out.mp4 - video what will work on ipad/iphone and in firefox (pc or android)

User avatar
Leinad4Mind
Translator
Posts: 852
Joined: Sun Jun 01, 2008 11:08 pm
Contact:

Re: Add capability to play HTML5 native formats without bbcode

Post by Leinad4Mind »

That seems to me code for encode a video, we dont want to encode but display and play it.
Want to access all my portuguese MOD and Extension translations?
Become my Patreon!
phpBB Portugal Translator and Moderator

Post Reply

Return to “Extension Requests”