Code Monkey home page Code Monkey logo

projectchaplin's Introduction

Project Chaplin

Greenkeeper badge

An open source, self-hosted video sharing service

Current features

  • AGPLv3 License
  • No intrusive adverts
  • No restrictions on content by country, IP or government
  • Video downloading as standard
  • HTML5 WebM as standard
  • Brightness/Contrast controls
  • Easter eggs?
  • 12-Factor App
  • Fully Docker service compatible

Future features

  • Live streaming (pluginless) - to be re-implemented
  • No staff blocking, auto-blocking only on public demand
  • REST APIs
  • Public tagging
  • Public flagging
  • Individual show subscription
  • CSS profiles
  • Download audio
  • Scrape from other public APIs

Recommended way to install and run

  1. Copy over the special /.env.docker to /.env and edit environment variables as appropriate
  2. Use Docker Compose to install:

docker-compose -p chaplin -f servers/docker/docker-compose.yml up -d

  1. Visit the site (http://localhost or add the vhost - by default http://dev.projectchaplin.com - to /etc/hosts).

Development on Docker

Edits on the source repository will be propagated to the docker environment, and rebuilds can be done with this command instead of the above:

docker-compose -p chaplin -f servers/docker/docker-compose.yml -f servers/docker/docker-compose.dev.yml up -d

Manual install

  • Copy over /.env.example to /.env and edit environment variables as appropriate
  • Check the Dockerfiles in servers/docker for installation instructions for each component.
  • Compile the client-side JS in src/php by using npm install and npm run build.
  • Ensure PHP has the bcmath, pdo and pdo_mysql (or whichever DB you use) extension.
  • Install the PHP in src/php by using composer install.
  • Install Nginx to serve PHP in src/php/public.
  • Run listeners in src/php/cli/cli.php like: php cli.php cli youtube, php cli.php cli convert and php cli.php cli vimeo.
  • Run one-time setup script in the same way like: php cli.php init adminuser.
  • Nginx configs are in servers/nginx and copy servers/php-fpm/uploads.ini to php-fpm's conf.d.
  • SQL schema is in db/.
  • Add appropriate hosts to /etc/hosts or use DNS.

Join us!

We are currently looking for developers and designers to help this open source project. If you're interested please contact me at [email protected].

Issues

For help, you can create an issue on the Github project: https://github.com/danwdart/projectchaplin/issues

projectchaplin's People

Contributors

danwdart avatar greenkeeper[bot] avatar snyk-bot avatar snyk-support avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectchaplin's Issues

Framework code

What needs to be done here is:

Mongo collection type stuff
Helpers for up/down

C hook to ffmpeg would be nice. Might have to be a custom PHP extension if we can't get much to work.

Video viewing permissions?

When you upload a video (or edit the settings of it after upload) it could be cool to be able to just share it with a group of friends or have it unindexed so you can't search/browse for it. Make it fully public or possible just to those who have an account and login or restrict it via age (maybe make it more than just a check box for only over 18 but allow to select a minimum/maximum age?) it'd be awesome if you could if you desired...

Login to view videos

I seem to have found a bug. I logged myself out and saw the video's on the homepage. I then tried clicking on one. It brought me to the login page rather than the video. Shouldn't the video's be public to anyone?

Allowing easy deletion of videos?

This is a must, to be able to easily click a button and take down a video of yours is good also, maybe if they are an admin or moderator (configurable what powers each user class has?) could also take video's down they have not uploaded.

CIDR for node scanning

I could imagine a lot of networks might have a few nodes per LAN you could maybe do it so if they enetered 10...* or 10.1.. or 192.168.0.* or some combanation of the unroutable ips you could parse those and then scan for other nodes which you could add, if you setup more than one or two it could be helpful. This also could alert the node admin in the admin page and allow you to click accept and have it easier for node setup rather than having to manually alter files on the each node and enter other ip's.

Node linking needs to be easier.

Enable downloads

Enable downloads of videos one has access to.
This should probably be a URL like /video/id/[id]/download

Nicer design

We need to find someone who can put together a nicer design.
That's all that can really be said here.

Login page redirect

When you go to a page which requires a login, it'll take you to the login page. Once you've logged in it just takes you to the standard login page. However it should take you to the page you tried to go to prior to login e.g:

try to go to chaplin/broadcast => sends you to login => sends you back to chaplin/broadcast

Messaging

There should be a messaging system so you can message people on it.

Videos date

On the video page you should show when the video was uploaded. It could be useful to do it with human time so possibly like

"Just now", "10 minutes ago", "An Hour ago", "3 months ago", etc...

Channels

It needs to support channels like the youtube type channels.

Video viewing UI clutter

There seems to be a lot of pointless clutter on the UI when viewing a video... you have:

good / bad lol / poor cute / ugly win / fail

Those really ought to be condensed into +1 or -1 or like / dislike... something easy, if it's going to be an image I suggest the +1 / -1 as that wouldn't have to be changed for each language.

Rating system

On most video services you can rate video's easily with a 5 star system or even a simplistic thumbs up, thumbs down idea (such as the one used on youtube). A feature much needed. Also, you could take the mean rating if it is a star system and have that on the profile/channel/user page.

Upload multiple video's at once & Progress bar?

This will most likely require some JS but it would be awesome if i could just click an button to add another brows box and it begin uploading. and also if i have a 200MB file i might wanna see how much of it has actually uploaded maybe an ETA? something a bit more dynamic. The current system would be great as a fall back if people don't have js or don't want to enable it but for those who do, it could help a lot.

getUserMedia problem

Could not run getUserMedia - you probably denied it

I didn't deny it? It never asked me...

Version:
Version 23.0.1271.95 Built from source for Fedora release 18 (Spherical Cow) (169798)

Searching

Search box

Thumb 1
Result 1 by user 1

Thumb 2
Result 2 by user 1

YouTube results:

thumb23
Result 23 by user Frano

thumb47
Result 47 by user Jimothy

Transcode videos

Transcode arbitrary type videos into the WebM standard using the upload tool via command service or plugin/extension/library.

Youtube videos

You need to reduce the size of info it makes a massive page below when info is there.

Needs to allow commenting.

User admin panel

Allow gods/minions to manage the list of users and apply permissions to them, and ban/edit/delete/email them.

Featureds

Featured videos (ones with the highest ratings) should be featured on the homepage.

Display of licencing infomation

The display of licensing information for the videos would be useful (creative commons licensed content is marked as such). If there is a search feature, the ability to search for/limit to the display of creative commons licensed content would also be cool.

Translations

Chaplin really needs to support translations to language.

Node protocol

It is all very well and dandy to have an HTTP request across IPs but there could be vhosts in the way - and these cannot be scanned.

To ensure proper efficient scanning, we should include a secondary HTTP(S) server for node linkage, which is setup to use the "node" module.

I am arbitrating TCP ports 32855 (http) and 32856 (https) simply because "PCN" (Project Chaplin Node) from base 36 to base 10 is 32855. Chunky nibblets to you if you disagree.

Allow OpenID?

Maybe allow it so you can use openID to login to project chaplin?

NB: This should not be a replacement for your own management of logins but make it an additional option for those who would rather use an openID provider.

Problem with database configuration during installation

I have run install_ubuntu.sh script and after some tweaking got this error:

Application error
SQLSTATE[28000] [1045] Access denied for user 'chaplin'@'localhost' (using password: YES)
Backtrace:
#0 /home/jacek/Programming/projectchaplin/library/Zend/Db/Adapter/Pdo/Mysql.php(109): Zend_Db_Adapter_Pdo_Abstract->_connect()

I haven't set up a PHP application for a while and now I wonder how to proceed further.

Error when UTF-8 usernames are used.

Message: non-utf8 string: tsyes�ka
Stack trace:
#0 /home/dan/projectchaplin/library/Mongo/Collection.php(71): MongoCollection->findOne(Array, Array)
#1 /home/dan/projectchaplin/library/Chaplin/Dao/Mongo/User.php(20): Mongo_Collection->findOne(Array)
#2 /home/dan/projectchaplin/library/Chaplin/Gateway/User.php(13): Chaplin_Dao_Mongo_User->getByUsernameAndPassword('Tsyes?ka', 'Z0&h$4Z#efsaB$')
#3 /home/dan/projectchaplin/library/Chaplin/Auth/Adapter/Mongo.php(13): Chaplin_Gateway_User->getByUsernameAndPassword('Tsyes?ka', 'Z0&h$4Z#efsaB$')
#4 /home/dan/projectchaplin/library/Zend/Auth.php(117): Chaplin_Auth_Adapter_Mongo->authenticate()
#5 /home/dan/projectchaplin/application/modules/default/controllers/LoginController.php(38): Zend_Auth->authenticate(Object(Chaplin_Auth_Adapter_Mongo))
#6 /home/dan/projectchaplin/library/Zend/Controller/Action.php(516): LoginController->indexAction()
#7 /home/dan/projectchaplin/library/Zend/Controller/Dispatcher/Standard.php(295): Zend_Controller_Action->dispatch('indexAction')
#8 /home/dan/projectchaplin/library/Zend/Controller/Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#9 /home/dan/projectchaplin/library/Zend/Application/Bootstrap/Bootstrap.php(97): Zend_Controller_Front->dispatch()
#10 /home/dan/projectchaplin/application/Bootstrap.php(157): Zend_Application_Bootstrap_Bootstrap->run()
#11 /home/dan/projectchaplin/library/Zend/Application.php(366): Bootstrap->run()
#12 /home/dan/projectchaplin/public/index.php(26): Zend_Application->run()
#13 {main}

Request Parameters:

array (
'controller' => 'login',
'action' => 'index',
'module' => 'default',
'redirect' => '',
'username' => 'Tsyes�ka',
'password' => 'my-password',
'Login' => 'Login',
)

Import from other video providers

It would be so awesome to be able to give it a link to something on youtube, vimeo, google video (if it still exists?), facebook video's (not sure if it's possible but if it is that'd be cool too) and then it could go and get it and transcode it for you (remember to look up the licence it's under and retain that too).

Maybe allow you to browse video's and it goes and finds video's on those services too?

Installer

A script which sets up php.ini, mongo, and configures all of apache would be nice. Saves the node admin searching through a bunch of files to try and figure it out. (It could ask the user some things too like max file size and change accordingly rather than just assuming 200mb or something.

Download button?

Having a button you can press just to download the video would be awesome. Also allowing you to download a group of videos or all videos from one person would be great too.

More video info?

You should put the channel/uploader on there, maybe the date of upload? Things like that.

Allow +1, share by twitter, diaspora, status.net, etc..

Having some awesome way to configure on a per user basis (so i could add my twitter and diaspora for example into my project chaplin control panel and when i go on a video be able to share/like them good services to support would be:

  • Status.net (identi.ca pre-configured?)
  • Twitter
  • Facebook
  • +1 for G+
  • Diaspora
    others?

Password Storage

Firslty I think using both a global salt stored out of the database (a config file of sorts maybe?) and also personal salts per user kept in the database. And do something like

hash(Global_salt + password + User_specific_salt)

Also sha1 was designed a long time ago for speed, I'd suggest switching to sha512 providing you with much more security and much slower for hackers to attempt to crack.

Another brilliant security extra you could try and implement is PBKDF2 (https://en.wikipedia.org/wiki/PBKDF2) to store passwords, it's now considered good practise to put the output of the sha512 hash through that (multiple times to slow the process down for hackers). I believe iphone usses 2000?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.