A few months ago, I was working with this software called ClipShare, which is a PHP video-sharing software like YouTube. Essentially it lets you create a YouTube clone.
This software is horrible. It is poorly coded, insecure, unmaintainable and unscalable. It is in PHP4 (EDIT: PHP4 is now considered legacy software, and is no longer supported by Zend, the company who makes PHP) and does not take advantage of any of the "object-oriented" features of the language. If you're looking for a software that you can just dump in and ignore, then ClipShare MIGHT be a solution, until somebody injects SQL somewhere or your site actually grows. It uses $_REQUEST everywhere, including in SQL strings, which means somebody could put SQL in a cookie and have it wreck your DB. It uses Smarty templates, which are designed to separate the view from the application code. Ta da, it is a bare-bones MVC architecture, minus the M part and you have to learn a new syntax/language to program the views. It also doesn't interface very well with PHP, you can only call functions and so ClipShare gives us a gigantic 3000+ line function.php file. Ever heard of modularization?
ClipShare just dumps all the files of one type in one place. Suppose you have 12 images per video, which is 4 thumbs for an animation and 3 different sizes, then you get 1000 videos on your site. That's 12 000 thumbs in one folder, which means your filesystem is going to be running crazy slow. On top of that, it must synchronize files between servers, which takes even longer. Triple the number of videos to 3000 and you've got 36 000 files in one folder. This isn't actually possible with ext3 (the standard Linux filesystem) unless you recompile your kernel, since the maximum is something like 32 000 and so thumbs will just stop being created. Now you have to re-arrange your file structure and find every place in your code that uses thumbs - since ClipShare doesn't centralize these sorts of things, it's all over the place - and organize it so that everything isn't in the same folder. Lot's of work, and time well wasted.
At this point we have completely recoded the site and cleaned out anything that was there from the ClipShare code. The only thing left is the names of variables and database tables, which are retarded (who calls a users table signup?). Unfortunately we might have to do another recode, since the server layout won't really scale very well. If you're looking to do a YouTube clone, you're better off getting a bunch of good programmers together and coding your own site from scratch.
UPDATE: Since I'm not working on it anymore, I feel it's safe to say that the site I was working on was Pornhub.com. And I can assure you (despite the fact that they still use a view_video.php for SEO reasons) that there is not a scrap of ClipShare code on that site anymore.
ANOTHER UPDATE: For those who care, I wrote a post describing to some degree how we recoded our site.
ANOTHER UPDATE: I'm not interested in coding another video sharing app, sorry.