{"id":13554473,"url":"https://github.com/openfun/videofront","last_synced_at":"2025-04-09T22:20:58.921Z","repository":{"id":79716968,"uuid":"64736521","full_name":"openfun/videofront","owner":"openfun","description":"DEPRECATED An extensible video storage, transcoding and streaming video provider (replaced by https://github.com/openfun/marsha)","archived":false,"fork":false,"pushed_at":"2018-07-03T14:35:32.000Z","size":430,"stargazers_count":23,"open_issues_count":2,"forks_count":12,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-24T00:14:05.691Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-08-02T07:54:29.000Z","updated_at":"2024-10-22T16:08:19.000Z","dependencies_parsed_at":"2023-05-15T10:15:26.460Z","dependency_job_id":null,"html_url":"https://github.com/openfun/videofront","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fvideofront","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fvideofront/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fvideofront/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfun%2Fvideofront/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfun","download_url":"https://codeload.github.com/openfun/videofront/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248120059,"owners_count":21050886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated"],"created_at":"2024-08-01T12:02:48.584Z","updated_at":"2025-04-09T22:20:58.891Z","avatar_url":"https://github.com/openfun.png","language":"Python","readme":"# Videofront [![Build Status](https://travis-ci.org/openfun/videofront.svg?branch=master)](https://travis-ci.org/openfun/videofront)\n\nA scalable video hosting platform written in Django.\n\nInitially, Videofront was developed to host videos of MOOCs taught on [Open edX](https://open.edx.org/) platforms, but it can easily be used in just any web platform that requires video embedding.\n\n## Features\n\n- Video storage, transcoding and streaming\n- A RESTful API, with a browsable GUI powered by [Swagger](http://swagger.io/)\n- A flexible and extensible set of backends to store and process videos from different providers. Out of the box, Amazon Web Services (S3 + ElasticTranscoder + Cloudfront) support is provided.\n- A basic user permission system for interacting with the API\n- Command line and browser-based video upload (with [CORS](https://en.wikipedia.org/wiki/Cross-origin_resource_sharing))\n- Subtitle upload, conversion to [VTT](https://w3c.github.io/webvtt/) format, storage and download\n- Thumbnail generation and customisation\n\n## TODO\n\nVideofront is still in early beta, although it is already used in production at [FUN-MOOC](https://fun-mooc.fr). Here is the list of upcoming features, by decreasing priority:\n\n- Development of a backend for local storage, transcoding and streaming\n- Creation of an `/embed` endpoint for easy video integration inside iframes\n- Viewer statistics\n- More evolved permission system, with public \u0026 private videos\n- ... We are open to feature requests!\n\n## Install\n\nClone the repository:\n\n    git clone https://github.com/openfun/videofront.git\n    cd videofront/\n\nInstall non-python requirements:\n\n    sudo apt-get install rabbitmq-server libxml2-dev libxslt1-dev libtiff5-dev libjpeg8-dev zlib1g-dev\n\nInstall python requirements in a virtual environment:\n\n    virtualenv --python=python3 venv # note that python3 is required\n    source venv/bin/activate\n    pip install -r requirements/base.txt\n\nIf you wish to interact with Amazon Web Services, additional dependencies need to be installed:\n\n    pip install -r requirements/aws.txt\n\nNote that you will also need to install and configure an SQL database.\n\nCreate database tables:\n\n    ./manage.py migrate\n    ./manage.py createcachetable\n\n## Usage\n\nYou will first need to create a user in Videofront to obtain a token and start interacting with the API:\n\n    $ ./manage.py createuser chucknorris fantasticpassword\n    Created user 'chucknorris' with token: 6f6801edef3f4b74378f2ac270be464b351efefe\n\nStart a local server:\n\n    $ ./manage.py runserver\n\nStart a celery worker for periodic and non-periodic tasks:\n\n    celery -A videofront worker -B # don't do this in production\n\nObtain a video upload url:\n\n    $ curl -X POST -H \"Authorization: Token 6f6801edef3f4b74378f2ac270be464b351efefe\" http://127.0.0.1:8000/api/v1/videouploadurls/\n    {\"id\":\"0sqmLiEuLpGJ\",\"expires_at\":1474362128,\"origin\":null,\"playlist\":null}(env3)\n\nUpload a video to this url:\n\n    $ curl -X POST -H \"Authorization: Token 6f6801edef3f4b74378f2ac270be464b351efefe\" -F file=@video.mp4 http://127.0.0.1:8000/api/v1/videos/0sqmLiEuLpGJ/upload/\n\nAlternatively, you may use the [videofront-client](https://github.com/openfun/videofront-client) package instead of `curl` for easier interaction with the API.\n\n## Development\n\nInstall test and contrib requirements:\n\n    pip install -r requirements/tests.txt\n\nRun unit tests:\n\n    ./manage.py test\n\nCheck test coverage:\n\n    coverage run ./manage.py test\n    coverage report\n\n## Deployment\n\n### Production settings\n\nPick a backend and customize the settings file accordingly:\n\n    cp videofront/settings_prod_sample_aws.py videofront/settings_prod.py\n    # edit videofront/settings_prod.py\n\n### Start gunicorn and celery workers\n\nThe recommended approach is to start gunicorn and celery workers with `supervisorctl`:\n\n    $ cat /etc/supervisor/conf.d/videofront.conf \n    [group:videofront]\n    programs=gunicorn,celery,celery-beat\n\n    [program:gunicorn]\n    command=/home/user/videofront/venv/bin/gunicorn --name videofront --workers 12 --bind=127.0.0.1:8000 --log-level=INFO videofront.wsgi:application\n    directory=/home/user/videofront/src/videofront/\n    environment=DJANGO_SETTINGS_MODULE=\"videofront.settings_prod\"\n    autostart=true\n    autorestart=true\n    user=videofront\n    priority=997\n\n    [program:celery]\n    directory=/home/user/videofront/src/videofront/\n    command=/home/user/videofront/venv/bin/celery worker -A videofront --loglevel=INFO --pidfile=/home/user/videofront/celery/w1.pid --hostname 'w1.%%h'\n    environment=DJANGO_SETTINGS_MODULE=\"videofront.settings_prod\"\n    autostart=true\n    autorestart=true\n    user=videofront\n    priority=998\n\n    [program:celery-beat]\n    directory=/home/user/videofront/src/videofront/\n    command=/home/user/videofront/venv/bin/celery beat -A videofront --loglevel=INFO --pidfile=/home/user/videofront/celery/beat.pid --schedule /opt/videofront/celery/celerybeat-schedule\n    environment=DJANGO_SETTINGS_MODULE=\"videofront.settings_prod\"\n    autostart=true\n    autorestart=true\n    user=videofront\n    priority=999\n\n### Serve content with nginx\n\nRecommended nginx configuration:\n\n    $ cat /etc/nginx/sites-enabled/videofront.vhost \n    upstream django {\n        server 127.0.0.1:8000;\n    }\n\n    server {\n        listen 80;\n        server_name example.com;\n\n        client_max_body_size 20M;\n\n        location /static/ {\n          # This depends on the STATIC_ROOT setting\n          alias /home/user/videofront/static/;\n        }\n        \n        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n        proxy_set_header Host $http_host;\n        proxy_redirect off;\n\n        location ~ ^/api/v1/videos/(.*)/upload/ {\n            # Max video upload size\n            client_max_body_size 1G;\n\n            proxy_pass http://django;\n        }\n\n        location / {\n            proxy_pass http://django;\n        }\n    }\n\n## Custom commands\n\n    # Create a user and print out the corresponding access token\n    ./manage.py createuser --admin username password\n\n    # Launch a new video transcoding job; useful if the transcoding job is stuck in pending state\n    ./manage.py transcode-video myvideoid\n\nAWS-specific commands:\n\n    # Create S3 buckets according to your settings\n    ./manage.py bootstrap-s3\n\n    # Delete folders from the production S3 bucket\n    ./manage.py delete-s3-folders videos/xxx folder1/ folder2/somefile.mp4\n\n## License\n\nThe code in this repository is licensed under version 3 of the AGPL unless otherwise noted. Your rights and duties are summarised [here](https://tldrlegal.com/license/gnu-affero-general-public-license-v3-(agpl-3.0)). Please see the LICENSE file for details.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfun%2Fvideofront","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfun%2Fvideofront","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfun%2Fvideofront/lists"}