Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 22. Nov 2024, 00:02

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Video streaming
PostPosted: 6. May 2006, 21:12 
Offline

Joined: 6. May 2006, 21:07
Posts: 22
I am using TWG for a shot while now.
What I am missing is some kind of video streaming (quality must be configurable, prefferable with some check of bandwidth).

So not video download but putting the image inside the website and play it online.


Top
 Profile  
 
 Post subject:
PostPosted: 7. May 2006, 11:20 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I was thinking about something like that too - but I don`t have a nice solution i have liked do far - maybe instead of the download there comes the included video stream ...
I you use normal navigation you have to have still a fast navigation but still the option to see the video ...
Maybe this could be done with a nice popup instead of the download ...

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 12. May 2006, 22:12 
Offline

Joined: 6. May 2006, 21:07
Posts: 22
I find some kind of solution. I create in the directory with a link.txt and the corresponding files. In link.txt I put the next (on one line only!):

<table border='0' cellpadding='0' align="center"> <tr><td> <OBJECT id='mediaPlayer' width="320" height="285" classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='Filename' value="/films/test1.wmv"> <param name='animationatStart' value='true'> <param name='transparentatStart' value='true'> <param name='autoStart' value="true"> <param name='showControls' value="true"> <param name='loop' value="false"> <EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols="true" showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285" src="/films/test1.wmv" autostart="true" designtimesp='5311' loop="false"> </EMBED></table>

This file uses the windows media player plugin, ofcourse you have to make then a .wmv rip of your movie.

The only thing I don't really am happy with is that for every movie I have to make a seperate directory with link.txt. It would be nices if I could put multiple link.txt in the same directory.
If I find a workaround I will put that here. If you have suggestions?


Top
 Profile  
 
 Post subject:
PostPosted: 13. May 2006, 02:20 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
I think I have a better solution!

but it's 2:14 right now and I go to bed now.

Only in short - add php as a new "other Filetype" with a image of a movie.
and remove e.g. wmv! (replace wmv by php).
Then the php file is open where you put your code in - inside you can read the filename with php and extract the name without extension. Then you add the extension wmv - then the php does open the movie.

The nice thing: the php is always the same file only with a different name. This means you have 3 files for a movie . the jpg, the php and the wmv - and the php opens the wmv!

so - Hope it was clear enough - if you have the php that works fine - you can send it to me - i'll add it to the example folder - if you like you can then even write a small howto that I add to the howto page.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 13. May 2006, 19:31 
Offline

Joined: 6. May 2006, 21:07
Posts: 22
I think I know what you mean.
I tried it,, it works I didn't make the complete php yet, just playing a movie. Only one thing I don't like so much. With a php script it opens in a new browser window and not in the existing one.
I think TWG is designed to do it like that?


Top
 Profile  
 
 Post subject:
PostPosted: 13. May 2006, 20:10 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
yes - there is a target="_blank" defined. You would have to change this in the code depending where you want to open it.

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 18. May 2006, 21:53 
Offline

Joined: 6. May 2006, 21:07
Posts: 22
I decided to go forward with the link.txt option because then video streaming stays inside TWG and you can stil use the arrow up or go straight to different directory by clicking where you want to go left-up.

I took the time to implement it as much as possible without changing to much of the code. I am not a regular programmer so perhaps I did some things not the best way, but it works exactly how I wanted and personaly I find it really looks great like this.

I did the following:

In the directory where you put the video streaming files there has to be a video.txt file, this file is empty or not doesn't matter. The purpose of this file is to trigger video streaming.

In the directory there has to be a *.wmv file with the belonging *.JPG file (watch the capitals).


Add some code in image.inc.php (just above $linkfilename):

$videofilename = $basedir . "/" . $twg_album . "/video.txt";
// we enable videostreaming
if (file_exists($videofilename)) { // video file exists !!!
include ('videostreaming.inc.php');
}


Add file videostreaming.inc.php (in the inc directory):

<?php
$linkmoviefile =str_replace('JPG', 'wmv', $image);
$embedstringbegin = "<table border='0' cellpadding='0' align='center'> <tr><td> <OBJECT id='mediaPlayer' width='320' height='285' classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95' codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701' standby='Loading microsoft Windows Media Player components...' type='application/x-oleobject'> <param name='Filename' value=";
$embedstringmidden = "<param name='animationatStart' value='true'> <param name='transparentatStart' value='true'> <param name='autoStart' value='true'> <param name='showControls' value='true'> <param name='loop' value='false'> <EMBED type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols='true' showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width='320' height='285' src='";
$embedstringeind = "' autostart='true' designtimesp='5311' loop='false'></EMBED></table>";
$embedstring ="'" . "/" . $basedir . "/" . $twg_album . "/" . $linkmoviefile . "'";
echo $embedstringbegin;
echo $embedstring;
echo $embedstringmidden;
echo $embedstring;
echo $embedstringeind;
?>

Further:
In the file config.php I put in wmv by the other_file_formats.

The same could be easely possible with embedded java. The only thing you would have to change is the extentions and put je java code in videostreaming.inc.php instead of the code I used. Or put a file besides it and change the include towards this file.
The best way is to add some lines in image.inc.php like I did and include the java code file.
In this way you enable support for embedded java and windows media player.


Top
 Profile  
 
 Post subject:
PostPosted: 19. May 2006, 17:43 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
looks good to me - the video.txt I think is not needed because you can check for the video already (It'S already in image.inc.php).

But you have to use the HTML navigation then. DHTML would not update your include...

/Michael


Top
 Profile  
 
 Post subject:
PostPosted: 14. Jun 2006, 08:35 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
Hi,

I'm working on 1.4.3 right now.

The main new feature will be support for videos!

I will have support for:
- WMP
- Divx web player streaming
- google video
- youtube.com (and simelar websites!)

Just to let you know!

/Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy