Embed Video Suggestions

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Scam Warning
Locked
User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Embed Video Suggestions

Post by KeyJockey » Sun Jun 17, 2012 3:54 pm

Hi All:

I need to be able to embed some videos, FLV files directly uploaded to our own server, into only a few special phpBB forum topics, and not necessarily *all* video sources like YouTube, etc. I'm the Admin of our board and I'd like to be able to make some videos available to our forum members, but we don't necessarily need them to be able to embed videos in post topics.

Searching around a bit, it seems like existing Mods such as "Auto Video Embed" are out there and would work for this, but I'm just curious if anyone has other or better suggestions for this (maybe without actually requiring a Mod install...? Maybe just some way to directly 'inject' the appropriate html code into a couple of post topics?)

Also I'm probably an idiot or something but I can't seem to find info or instructions for actually installing a mod like AutoVideoEmbed anywhere. Comments on it say "it's easy" and "it works great" etc but I can't see where to start, LOL.

BTW I already have the JWPlayer software enabled on our website and it's running embedded FLV video on directly accessibly HTML pages, but I'd like to get it working for certain videos also ONLY running from a few, special, specific phpBB forum post topic pages... that's the starting point of this request, basically.

Thanks in advance for all suggestions & help :)

-JC

User avatar
VEG
Registered User
Posts: 84
Joined: Sat Jun 25, 2005 9:31 am
Location: Belarus, Minsk
Contact:

Re: Embed Video Suggestions

Post by VEG » Sun Jun 17, 2012 3:59 pm

Try phpBB [video] — it works without code changes.
Best regards, Evgeny

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Sun Jun 17, 2012 8:17 pm

Hi Evgeny:

You wrote:
In the nearest future the following video services will be supported: webm, mp4 and flv video files
But as I noted I need this for FLV files on our server only: so is it done yet or still "coming soon"?

If not done yet, any idea of when FLV file support might be ready?

Thanks,

-JC

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Embed Video Suggestions

Post by 4_seven » Sun Jun 17, 2012 11:18 pm

auto video embed works on the fly for local flv and mp3 without any bbcode. just the link, thats it.
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Mon Jun 18, 2012 3:39 pm

Hi 4_seven:

Okay thanks for that... I managed to get AutoVideoEmbed installed on our board now (using AutoMod) and it seems to work, thanks!

I tested it with one FLV so far and the video plays, but is there a way to force the video-window size that's embedded for it? Using JWPlayer on a plain HTML page I was able to make this same video look 'widescreen' in the little embedded rectangle but the default using AutoVideoEmbed makes it "letterboxed" in a larger square...

Thanks for any tips ;)

-JC

P.S. Here is the code I am using for this embedded video in the plain HTML page, for comparison...

Code: Select all

<div id="container">Loading the player ...</div> 
<script type="text/javascript"> 
//<![CDATA[
          jwplayer("container").setup({ 
                   flashplayer: "player.swf", 
                   file: "HiRollers.flv", 
                   height: 176, 
                   width: 320, 
                   image: "HiRollers.jpg",
                   skin: "minima.zip" 
                   }); 
//]]>
</script> 
Last edited by KeyJockey on Mon Jun 18, 2012 4:56 pm, edited 1 time in total.

User avatar
FloridaMan339
Registered User
Posts: 112
Joined: Thu Jan 07, 2010 11:58 pm
Location: Fort Myers, Florida
Name: Randy Wood
Contact:

Re: Embed Video Suggestions

Post by FloridaMan339 » Mon Jun 18, 2012 4:27 pm

You really should be asking 4_seven on the mod's support site, which is here:
http://www.phpbb.com/community/viewtopi ... &t=2017165
but in looking at the code in the two files,
includes/auto_video_embed_post.php and includes/auto_video_embed_view.php, it looks like the video size is determined in these two files.

Try changing the one you want (flv, maybe) in those 2 files and see if it works for you. If not, just undo the changes.

OR...ask 4_seven on his mod support site as he has always been quick to respond on his support and help.

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Embed Video Suggestions

Post by 4_seven » Mon Jun 18, 2012 7:01 pm

KeyJockey wrote:but is there a way to force the video-window size that's embedded for it?
In both of the php files

includes/auto_video_embed_post.php
includes/auto_video_embed_view.php

In // ---------------- CONFIG --------------- Area

Code: Select all

#
$flv                 = true;
$flv_width           = 425;
$flv_height          = 350;
#
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Mon Jun 18, 2012 10:39 pm

OK thanks... but, hmm... actually what I think I need for this is to set a fixed width, but then let HEIGHT be determined by some "auto" parameter. Is that possible?

Some of the videos I want to embed are 4x3 aspect ratio (i.e. old format, like TV) but some are 'widescreen' size rectangles (like movie screen). Also, our forum uses a fixed-width style that's pretty narrow, so I think it's probably a good idea to keep the embedded video width to some reasonable small size, to prevent it breaking the forum page by being too wide (users can go full screen if they want to watch it bigger).

So, how to set height 'auto'...?

User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Embed Video Suggestions

Post by 4_seven » Mon Jun 18, 2012 11:47 pm

includes/auto_video_embed_post.php
includes/auto_video_embed_view.php

find 'px;height:' . $flv_height . 'px;"

replace with 'px;height:auto;"
Current Mods | Mod Base | php(BB) programming | No help via PM

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Tue Jun 19, 2012 2:31 pm

Hi 4_seven:

Thanks so much for all this help -- I really appreciate it :D

However, I hate to be a pain in the ass but I'm still having some trouble getting the embedded FLV videos to LOOK the way I we need them to look, i.e. as compared to how some other embedded videos are already working on our website in plain, direct-HTML pages (not forum posts).

Basically I want the posted videos in the phpBB forum to look mostly the same as some others that we have embedded in HTML pages, using the JWPlayer software directly.

Maybe the difference is because we're doing it using the "container" method (see code, above) and your mod is doing it with the "object" method? (Sorry if I have the terminology incorrect, I am not very experienced with this stuff... but I think you will know what I mean.) -- I'd like to be able to use features of the JWPlayer like skins, etc too (again, see code above).

Also I noticed your mod is using an older version of the JWPlayer, (v3.16) maybe a problem here is due to newer version (currently v5.9) changing some things?

The main issue I'm seeing is basically the size & aspect ratio of the actual, embedded VIDEO is not the same in both places. I thought it was just from the "size" parameters in the code but that seems to be not enough :(

Again, I really appreciate all the help on this... if it would be better to move this topic over to YOUR forum (as FloridaMan suggested) I can do that, no problem.

Thanks,

-JC

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Tue Jun 19, 2012 6:07 pm

Just to be clear, here's a screen shot of what I'm talking about.

Image

The TOP embedded video is how it looks on our HTML page, using JWPlayer as in code copied above.

The BOTTOM embedded video (using the same FLV file) is how it looks now, embedded in a forum post using the Auto Video Embed mod.

I'd like them to look the same using the JWPlayer skin and correct video size etc.

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Thu Jun 21, 2012 12:59 am

OK, I figured it out by myself :lol:

The solution had to do, mostly, with adding "flashvars" to control the features of JWPlayer.

In Auto_Video_Embed_post.php, I changed this:

Code: Select all

// remote link
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#is', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/flv_player.swf"><param name="movie" value="mediaplayer/flv_player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="file=http://$1.flv" /></object>', $preview_message);
// local link
$preview_message = preg_replace('#<a class="postlink-local" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#is', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/flv_player.swf"><param name="movie" value="mediaplayer/flv_player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="file=http://$1.flv" /></object>', $preview_message);}
...to THIS...

Code: Select all

// remote link
$preview_message = preg_replace('#<a class="postlink" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#is', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/player.swf"><param name="movie" value="mediaplayer/player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="skin=mediaplayer/slim.zip&image=mediaplayer/movie.jpg&controlbar.position=over&stretching=fill&file=http://$1.flv" /></object>', $preview_message);
// local link
$preview_message = preg_replace('#<a class="postlink-local" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#is', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/player.swf"><param name="movie" value="mediaplayer/player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="skin=mediaplayer/slim.zip&image=mediaplayer/movie.jpg&controlbar.position=over&stretching=fill&file=http://$1.flv" /></object>', $preview_message);}

And in Auto_Video_Embed_view.php, I changed this...

Code: Select all

// remote link
$message = preg_replace('#<a class="postlink" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/flv_player.swf"><param name="movie" value="mediaplayer/flv_player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="file=http://$1.flv" /></object>', $message);
// local link
$message = preg_replace('#<a class="postlink-local" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/flv_player.swf"><param name="movie" value="mediaplayer/flv_player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="file=http://$1.flv" /></object>', $message);}
...to THIS...

Code: Select all

// remote link
$message = preg_replace('#<a class="postlink" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/player.swf"><param name="movie" value="mediaplayer/player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="skin=mediaplayer/slim.zip&image=mediaplayer/movie.jpg&controlbar.position=over&stretching=fill&file=http://$1.flv" /></object>', $message);
// local link
$message = preg_replace('#<a class="postlink-local" href="http:\/\/(.*?).(flv|FLV)"(.*?)>(.*?)<\/a>#U', '<object type="application/x-shockwave-flash" style="width:' . $flv_width . 'px;height:' . $flv_height . 'px;" data="mediaplayer/player.swf"><param name="movie" value="mediaplayer/player.swf" /><param name="allowfullscreen" value="true" /><param name="flashvars" value="skin=mediaplayer/slim.zip&image=mediaplayer/movie.jpg&controlbar.position=over&stretching=fill&file=http://$1.flv" /></object>', $message);}
Note also that the player changed from flv_player.swf to just "player.swf" -- there was a newer version of JWPlayer available, so I upgraded for this, instead of using the older one included with the MOD.

Hope this info helps someone 8-)

-JC

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Sat Jun 23, 2012 3:02 am

Hmm. "One More Thing..."

I forgot that FLV flash files won't play on iPad, iPhone etc... so probably better to use MP4?
Has anyone added direct MP4-file support to this mod already: any code available, to do that the best way?

Thx :)

User avatar
KeyJockey
Registered User
Posts: 95
Joined: Fri Mar 05, 2010 6:33 pm
Location: Michigan

Re: Embed Video Suggestions

Post by KeyJockey » Wed Aug 29, 2012 6:31 pm

Bumping up this old thread of mine, because it seems the author of Auto Video Embed has been banned here and his mod is now abandoned....

SO, okay, what's next-best to use for embedding of locally-hosted FLV files on our site?

Need to update this 'cuz of the phpBB update now available, so I wanna cleanup old un-needed mods too.

Any help/advice appreciated... thanks.

-JC
Last edited by KeyJockey on Wed Aug 29, 2012 9:28 pm, edited 1 time in total.

User avatar
ViolaF
Registered User
Posts: 1411
Joined: Tue Aug 14, 2012 11:52 pm

Re: Embed Video Suggestions

Post by ViolaF » Wed Aug 29, 2012 6:51 pm

Hello KeyJockey,

as far as i know, this mod is not [abd], like all other mods from this programmer. Here you find infos about that.You get support there as well :D .

Locked

Return to “[3.0.x] MOD Requests”

Who is online

Users browsing this forum: No registered users and 13 guests