PDA

View Full Version : 3 questions about video uploads


Johnny Doomo
December 22nd, 2005, 09:28 PM
1. Does Photopost have leech protection against uploaded videos? I see the full url path straight in the source code of the streaming video. Can people just grab that url and post the video (for streaming or for download) on their site and use all my bandwidth?

2. Is there any way to get it so that the watermark.php file can call videos just so it protects their location or another way to prevent people from even accessing the video other than viewing it on the actual page?

3. The admincp setting "Maximum multimedia upload size in Kb" is a seperate size limit than what is allowed for images, correct?

Thank you.

Johnny Doomo
December 23rd, 2005, 06:33 PM
bump bump bump

Michael P
December 23rd, 2005, 06:56 PM
1. When you use a direct link to a video, there is nothing about PhotoPost involved; any anti-leeching would have to be done outside PhotoPost in your htaccess file.

2. It is possile, however we don't support it at this time.

3. Yes, this is a seperate maximium strictly for multimedia files.

Johnny Doomo
December 24th, 2005, 02:08 AM
2. It is possile, however we don't support it at this time.

Would it be possible in a small mod or would it take a good chunk of coding for a huge price? If it was within a small budget I would be willing to pay if it ment that the actual location videos on my server would truly be hidden.

Michael P
December 24th, 2005, 09:59 AM
I honestly don't know what it would take because I've never tried it; it could take a few hours or it could take a couple days.

If it were going to be a small mod, then it would only need to be modified such that it changed the header to reflect a video type (whatever those types are relative to what is being viewed) and then showphoto call watermark regardless of file type.

$isjpeg = false;
if ( stristr($bigimage,".jpg") || stristr($bigimage,".jpeg") ) {
$isjpeg = true;
$cttype = "Content-Type: image/jpg";
}
elseif ( stristr($bigimage,".gif") ) {
$cttype = "Content-Type: image/gif";
}
else {
ditchempty();
}


Basically, this section would need to be enhanced to support the video type you want to show. It may be enough to just add those type switches here, but I don't know.

Chuck S
December 24th, 2005, 10:40 AM
well this would be a start.


$isjpeg = false;
if ( stristr($bigimage,".jpg") || stristr($bigimage,".jpeg") ) {
$isjpeg = true;
$cttype = "Content-Type: image/jpg";
}
elseif ( stristr($bigimage,".gif") ) {
$cttype = "Content-Type: image/gif";
}
elseif ( stristr($bigimage,".wav") ) {
$cttype = "Content-Type: audio/x-wav";
}
elseif( stristr($bigimage,".rm") ) {
$cttype = "Content-Type: application/x-pn-realaudio-plugin";
}
elseif ( stristr($bigimage,".mp3") ) {
$cttype = "Content-Type: audio/mpeg";
}
elseif ( stristr($bigimage,".mpg") || stristr($bigimage,".mpeg") ) {
$cttype = "Content-Type: video/mpeg";
}
elseif ( stristr($bigimage,".mov") ) {
$cttype = "Content-Type: video/quicktime";
}
elseif ( stristr($bigimage,".avi") ) {
$cttype = "Content-Type: video/x-msvideo";
}
elseif ( stristr($bigimage,".swf") ) {
$cttype = "Content-Type: application/x-shockwave-flash";
}
else {
ditchempty();
}

Chuck S
December 24th, 2005, 11:37 AM
Well your not going to be able to hide the multimedia source from what I see. The embedded players need the EXACT URL to the image. You can not use a file link. I have tried modifying watermark and the templates to use a watermark.php link.

Basically I would suggest you make sure right click is disabled in showphoto options and then also you add to the headtags area of your site this

<meta http-equiv="imagetoolbar" content="no">

Basically anyone wanting to really get the path can view your page source but right clicks and imagetoolbar will not grab it.

You might also want to remove the download link in showphoto.php for multimedia files

Johnny Doomo
December 27th, 2005, 03:37 AM
What is the "imagetoolbar" exactly?

So htaccess will work in preventing other sites linking directly to the videos? I tried to get htaccess to work with swf files and I was told it just doesn't really work since browsers and that format don't really care about sending reffering info. Is this the case with videos or will a htaccess truly protect my videos from bandwidth stealing?

EDIT: Also, does the retreival url field work for videos? So it looks at a pages source code and pulls any video files on that page over to my server?

Thanks for the info provided so far.

Chuck S
December 27th, 2005, 08:41 AM
HTACCESS will prevent any file from being viewed as long as you have the extention listed in that code to my knowledge.

Anyone can view source of a player and get the url to the file. Nothing to do about that.

imagetoolbar is an imagebar in IE

Johnny Doomo
December 27th, 2005, 04:18 PM
While testing the .mov vide extension it does the same thing flash files do in Photopost. The box that Photopost uses to display box quicktime vide and flash files is a specific size and won't readjust to the size of the flash file or mov video. I think there is something wrong or missing in the code, but I've been testing some other scripts and Photopost is the only one that I've seen have this problem so far.

Can you guys maybe check into this and see if you can find a fix? I don't want a hard coded size, I want it to adjust to the size of every video. I've seen other sites have something like that I believe they don't have to put in the height and width of every video. I don't need the border/html table around the video if that helps at all, but I do need it to show the entire mov video and the small quicktime controls under the video.

I would appreciate any tweak you could give me that might help solve this problem.

Thanks.

Chuck S
December 27th, 2005, 06:21 PM
The player opens just like most the others at a specific size in this case for this one

document.write ("<object classid='clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B' codebase='http://www.apple.com/qtactivex/qtplugin.cab' width='320' height='256'><param name='SRC' value='{$Globals['origdir']}/$storecat/$bigimage'><param name='AUTOPLAY' value='true'><param name='CONTROLLER' value='true'><embed src='{$Globals['origdir']}/$storecat/$bigimage' width='320' height='256' autoplay='true' controller='true' pluginspage='http://www.apple.com/quicktime/download/'> </embed> </object>");

Johnny Doomo
December 27th, 2005, 08:28 PM
Are you saying that the windows player one does this too? It looked like it was playing it at the regular size to me... but if it was, at least it re-adjusts the video to fit the size. Swf and mov files don't re-adjust at all, they just geet cropped which is really annoying. Isn't there a way to fix this?

This script: http://arcade.networktechs.com/play-4283-Metal__Microwave_=_wivestale.html

seems to manage it just fine and it calls the videos using a php file and not the direct link to the movie as well.

With as many video sites out there, it just doesn't seem like other sites are limited by what you are saying is the problem.

I also noticed that your plugin page for .mov doesn't work. If somebody doesn't have Quicktime installed and tries to view a .mov file in photopost it doesn't show them anything and it doesn't contact or give any message about the line in the code that reads "http://www.apple.com/quicktime/download/"

Can you guys maybe clean up the video embedding code a little and give me the fixes? It seems like a lot of stuff that should work doesn't work very well. Any ideas on how I can get .mov (or all videos as may be the case) to show at their regular and full size without cropping edges and how to get the quicktime plugin message or redirect to actually work?

I don't know what could be the problem, but it seems like I look at other scripts and they are able to do what Photopost can't, though Photopost claims that it can. I'm just confused as to how somebody is suppose to get videos to work in photopost if a specific width and height has to be hard coded into the Photopost code. I mean, it's not like every video on the internet are the same proportions.

Any ideas/help?

Chuck S
December 27th, 2005, 10:05 PM
Photopost just claims to play video's inline. If Michael chooses to hard code the players to a specific size which he did so it fits the size to not be oversized in the site that is how he did it. The video is simply resized down to proportion as it should be. You can edit any specific template to suit your needs as always.

Johnny Doomo
December 28th, 2005, 11:28 AM
Photopost just claims to play video's inline. If Michael chooses to hard code the players to a specific size which he did so it fits the size to not be oversized in the site that is how he did it. The video is simply resized down to proportion as it should be. You can edit any specific template to suit your needs as always.

That is incorrect. View a .mov file in a fresh install of Photopost and you will see that if the video is larger than the hard coded HxW then the edges of the video simply get cut off. .mov files won't resize, but after testing, the other formats do. The quicktime format is the one that all the problem seems to be with. Despite changing the hard coded HxW the mov files still maintain their same size, so you pick a large HxW and then you have this huge space around your mov video.

Chuck S
December 28th, 2005, 11:46 AM
Okay and in my quicktime player when I play a small movie there is a large space around the mov video when I play one on my home computer. As stated you can edit the template to suit your needs.

Johnny Doomo
December 29th, 2005, 12:13 PM
Yeah, I guess it's not really PP causing the problem, it's Quicktime is stupid and doesn't resize like MS videos do.

Thanks for helping me understand the way this works better. I guess I was just hoping for it to be tight around the mov files so that there isn't a huge space surrounding uploaded mov files, especially on smaller uploaded mov videos.

Perhaps a suggestion for a next release is to make PP "somehow" fix this problem and have more of a "Display embedded media at" and then the option of 1x, 2x, etc. options. Though I don't even know if something like that is possible, but it would make PP more user friendly for videos IMO.

Chuck S
December 29th, 2005, 12:15 PM
Well PhotoPost simply uses the video players as they are made. I have explained how quicktime works so unless they change there player there is not much we can do.

paulfletcher
March 21st, 2006, 09:13 AM
What video sizes are supported? If I have a larger video 800px x 800px will that work? Verses a smaller video size (such as 320px by 240px).

Will you see any border around smaller videos in this new version of Photopost?

Thanks,
Paul

Chuck S
March 21st, 2006, 09:16 AM
That I guess would depend on the individual players as to what size things are.

Video sizes allow are up to your and your server. Remember a default PHP install is only set to allow 2mb uploads so if your trying to allow bigger files you would need to ability to edit your PHP settings to accomidate your needs.