django-video-transcoding


Namedjango-video-transcoding JSON
Version 1.0.0 PyPI version JSON
download
home_pageNone
SummarySimple video transcoding application for Django framework
upload_time2024-06-27 07:02:33
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords django video media transcoding processing
VCS
bugtrack_url
requirements Django django-model-utils requests Celery pymediainfo fffw mypy types-requests django-stubs billiard kombu importlib-metadata
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-video-transcoding
Simple video transcoding application for Django Framework

[![build](https://github.com/just-work/django-video-transcoding/workflows/build/badge.svg?branch=master)](https://github.com/just-work/django-video-transcoding/actions?query=event%3Apush+branch%3Amaster+workflow%3Abuild)
[![codecov](https://codecov.io/gh/just-work/django-video-transcoding/branch/master/graph/badge.svg)](https://codecov.io/gh/just-work/django-video-transcoding)
[![Updates](https://pyup.io/repos/github/just-work/django-video-transcoding/shield.svg)](https://pyup.io/repos/github/just-work/django-video-transcoding/)
[![PyPI version](https://badge.fury.io/py/django-video-transcoding.svg)](http://badge.fury.io/py/django-video-transcoding)
[![Documentation Status](https://readthedocs.org/projects/django-video-transcoding/badge/?version=latest)](https://django-video-transcoding.readthedocs.io/en/latest/?badge=latest)

## Installation

### System requirements

In case of latest Ubuntu LTS (20.04):

1. ffmpeg-4.x
  ```shell script
  $> sudo apt install ffmpeg
  ```
2. mediainfo
  ```shell script
  $> sudo apt install mediainfo 
  ```
3. RabbitMQ
  ```shell script
  $> sudo apt install rabbitmq-server
```

### django-video-transcoding

```shell script
pip install django-video-transcoding
```

### Configure Django

Edit your project `settings.py`
```python
INSTALLED_APPS.append('video_transcoding')
```

### Env

Common env variables used in django web server and celery

```
DJANGO_SETTINGS_MODULE=YOUR_PROJECT.settings
VIDEO_TRANSCODING_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:15672/
```

Web-server-only env variables:

```
VIDEO_DOWNLOAD_SOURCE=0
VIDEO_EDGES='http://edge-1.localhost,http://edge-2.localhost'
```

Celery-only env variables:

```
VIDEO_TEMP_DIR=/tmp
VIDEO_TRANSCODING_CELERY_CONCURRENCY=2
VIDEO_ORIGINS='http://origin-1.localhost/video,http://origin-2.localhost/video'
```

Start celery worker

```shell script
$> celery worker -A video_transcoding.celery
```

## Develop

[Development environment quickstart guide](/docs/source/quickstart.md)

### Tests

```
src/manage.py test
```

### Type checking

```
$> pip install mypy django-stubs
$> cd src && /data/dvt/virtualenv/bin/dmypy run -- \
   --config-file ../mypy.ini -p video_transcoding

```

TBD:

* [x] travis-ci
* [ ] sphinx docs - autodoc + manual
* [x] coverage
* [x] typing
* [x] badges
* [x] video hosting demo project with docker-compose, nginx and player demo


## Production

### Graceful shutdown

* if you are running transcoder in docker, make sure that celery master process
    has pid 1 (docker will send SIGTERM to it by default)
* when using separate celery app, send SIGUSR1 from master to workers to trigger
    soft shutdown handling
    (see `video_transcoding.celery.send_term_to_children`)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "django-video-transcoding",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "django, video, media, transcoding, processing",
    "author": null,
    "author_email": "Sergey Tikhonov <zimbler@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/56/23/b14b29227e76200c47ba30eec0f17ad6ce5ddb6d64202c47849aa88bde1d/django_video_transcoding-1.0.0.tar.gz",
    "platform": null,
    "description": "# django-video-transcoding\nSimple video transcoding application for Django Framework\n\n[![build](https://github.com/just-work/django-video-transcoding/workflows/build/badge.svg?branch=master)](https://github.com/just-work/django-video-transcoding/actions?query=event%3Apush+branch%3Amaster+workflow%3Abuild)\n[![codecov](https://codecov.io/gh/just-work/django-video-transcoding/branch/master/graph/badge.svg)](https://codecov.io/gh/just-work/django-video-transcoding)\n[![Updates](https://pyup.io/repos/github/just-work/django-video-transcoding/shield.svg)](https://pyup.io/repos/github/just-work/django-video-transcoding/)\n[![PyPI version](https://badge.fury.io/py/django-video-transcoding.svg)](http://badge.fury.io/py/django-video-transcoding)\n[![Documentation Status](https://readthedocs.org/projects/django-video-transcoding/badge/?version=latest)](https://django-video-transcoding.readthedocs.io/en/latest/?badge=latest)\n\n## Installation\n\n### System requirements\n\nIn case of latest Ubuntu LTS (20.04):\n\n1. ffmpeg-4.x\n  ```shell script\n  $> sudo apt install ffmpeg\n  ```\n2. mediainfo\n  ```shell script\n  $> sudo apt install mediainfo \n  ```\n3. RabbitMQ\n  ```shell script\n  $> sudo apt install rabbitmq-server\n```\n\n### django-video-transcoding\n\n```shell script\npip install django-video-transcoding\n```\n\n### Configure Django\n\nEdit your project `settings.py`\n```python\nINSTALLED_APPS.append('video_transcoding')\n```\n\n### Env\n\nCommon env variables used in django web server and celery\n\n```\nDJANGO_SETTINGS_MODULE=YOUR_PROJECT.settings\nVIDEO_TRANSCODING_CELERY_BROKER_URL=amqp://guest:guest@rabbitmq:15672/\n```\n\nWeb-server-only env variables:\n\n```\nVIDEO_DOWNLOAD_SOURCE=0\nVIDEO_EDGES='http://edge-1.localhost,http://edge-2.localhost'\n```\n\nCelery-only env variables:\n\n```\nVIDEO_TEMP_DIR=/tmp\nVIDEO_TRANSCODING_CELERY_CONCURRENCY=2\nVIDEO_ORIGINS='http://origin-1.localhost/video,http://origin-2.localhost/video'\n```\n\nStart celery worker\n\n```shell script\n$> celery worker -A video_transcoding.celery\n```\n\n## Develop\n\n[Development environment quickstart guide](/docs/source/quickstart.md)\n\n### Tests\n\n```\nsrc/manage.py test\n```\n\n### Type checking\n\n```\n$> pip install mypy django-stubs\n$> cd src && /data/dvt/virtualenv/bin/dmypy run -- \\\n   --config-file ../mypy.ini -p video_transcoding\n\n```\n\nTBD:\n\n* [x] travis-ci\n* [ ] sphinx docs - autodoc + manual\n* [x] coverage\n* [x] typing\n* [x] badges\n* [x] video hosting demo project with docker-compose, nginx and player demo\n\n\n## Production\n\n### Graceful shutdown\n\n* if you are running transcoder in docker, make sure that celery master process\n    has pid 1 (docker will send SIGTERM to it by default)\n* when using separate celery app, send SIGUSR1 from master to workers to trigger\n    soft shutdown handling\n    (see `video_transcoding.celery.send_term_to_children`)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple video transcoding application for Django framework",
    "version": "1.0.0",
    "project_urls": {
        "documentation": "https://django-video-transcoding.readthedocs.io/en/latest/",
        "homepage": "https://github.com/just-work/django-video-transcoding",
        "issues": "https://github.com/just-work/django-video-transcoding/issues",
        "repository": "https://github.com/just-work/django-video-transcoding.git"
    },
    "split_keywords": [
        "django",
        " video",
        " media",
        " transcoding",
        " processing"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "76e20b9eb0e0ddbfb98cdfa2a18e7fc98fc8b3e396ed786814d75660d02ae570",
                "md5": "cfc919d6ac61f37c4afce7ec19c8183f",
                "sha256": "7954725e28bf2a600b48d8368987421e5a52a14257b36770cbfd654f1639dd21"
            },
            "downloads": -1,
            "filename": "django_video_transcoding-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cfc919d6ac61f37c4afce7ec19c8183f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 37574,
            "upload_time": "2024-06-27T07:02:31",
            "upload_time_iso_8601": "2024-06-27T07:02:31.944630Z",
            "url": "https://files.pythonhosted.org/packages/76/e2/0b9eb0e0ddbfb98cdfa2a18e7fc98fc8b3e396ed786814d75660d02ae570/django_video_transcoding-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5623b14b29227e76200c47ba30eec0f17ad6ce5ddb6d64202c47849aa88bde1d",
                "md5": "5f717aac424c699fabc7c3927c002b40",
                "sha256": "3f5db2c88db4c423cf2600751dcaa432b4e81e0efeebb741e121d62d54a3ab05"
            },
            "downloads": -1,
            "filename": "django_video_transcoding-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "5f717aac424c699fabc7c3927c002b40",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 27677,
            "upload_time": "2024-06-27T07:02:33",
            "upload_time_iso_8601": "2024-06-27T07:02:33.327763Z",
            "url": "https://files.pythonhosted.org/packages/56/23/b14b29227e76200c47ba30eec0f17ad6ce5ddb6d64202c47849aa88bde1d/django_video_transcoding-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 07:02:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "just-work",
    "github_project": "django-video-transcoding",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "Django",
            "specs": [
                [
                    "==",
                    "5.1.5"
                ]
            ]
        },
        {
            "name": "django-model-utils",
            "specs": [
                [
                    "==",
                    "5.0.0"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "==",
                    "2.32.3"
                ]
            ]
        },
        {
            "name": "Celery",
            "specs": [
                [
                    "==",
                    "5.4.0"
                ]
            ]
        },
        {
            "name": "pymediainfo",
            "specs": [
                [
                    "==",
                    "6.1.0"
                ]
            ]
        },
        {
            "name": "fffw",
            "specs": [
                [
                    "==",
                    "7.0.0"
                ]
            ]
        },
        {
            "name": "mypy",
            "specs": [
                [
                    "==",
                    "1.10.1"
                ]
            ]
        },
        {
            "name": "types-requests",
            "specs": [
                [
                    "==",
                    "2.32.0.20240622"
                ]
            ]
        },
        {
            "name": "django-stubs",
            "specs": [
                [
                    "==",
                    "5.0.2"
                ]
            ]
        },
        {
            "name": "billiard",
            "specs": [
                [
                    "==",
                    "4.2.1"
                ]
            ]
        },
        {
            "name": "kombu",
            "specs": [
                [
                    "==",
                    "5.4.2"
                ]
            ]
        },
        {
            "name": "importlib-metadata",
            "specs": [
                [
                    "==",
                    "8.0.0"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "django-video-transcoding"
}
        
Elapsed time: 0.44187s