{ "info": { "author": "Geoffrey GUERET", "author_email": "geoffrey@stocka.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Framework :: Pelican", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Multimedia :: Video :: Conversion", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Pelican-dashify\n===============\n\n[![License](https://img.shields.io/pypi/l/pelican-dashify.svg)](https://github.com/ggueret/pelican-dashify/blob/master/LICENSE)\n[![Supported Python Versions](https://img.shields.io/pypi/pyversions/pelican-dashify.svg)](https://pypi.org/project/pelican-dashify/)\n[![Build Status](https://img.shields.io/travis/ggueret/pelican-dashify/master.svg)](https://travis-ci.org/ggueret/pelican-dashify)\n\n\nPelican-dashify let you convert proper MPEG-DASH content generated from your videos with Pelican.\n\n\nFeatures\n--------\n\n-\tSupport for MPEG-DASH live and on-demand profiles, and even [more](https://gpac.wp.imt.fr/mp4box/dash/).\n-\tTranscode a video stream in multiple qualities, customizable with settings.\n-\tCallable from any article or page metadata, by using the tag `{dashify}`.\n-\tSeamless integration with Pelican, dashify does not include any HTML or JS extra code.\n\n### DASHwhat?\n\nMany notable streming providers uses this [standard](https://tools.ietf.org/html/rfc6983), like YouTube or Netflix. MPEG-DASH let client adapt to changing network conditions and provide high quality playback with fewer stalls or re-buffering events. He is widely used on devices like Internet-connected televisions, TV set-top boxes, desktop computers, smartphones, tablets, etc. to consume multimedia content (video, TV, radio, etc.) delivered via the Internet.\n\n\nInstallation\n------------\n\nUnder the hood, dashify call for external binaries, which are [ffprobe](https://www.ffmpeg.org/download.html) to get input file info like resolution and metainfo. [ffmpeg](https://www.ffmpeg.org/download.html) is used to transcode the representations and [MP4Box](https://gpac.wp.imt.fr/downloads/gpac-nightly-builds/) to pack everything for delivery. Tests will be added to cover supported versions list, for now `4.x` of ff[mpeg/probe] and `0.7.x` of GPAC are fine.\n\nInstall the latest release from PyPi :\n```sh\npip install pelican-dashify\n```\n\n\nQuickstart\n----------\n\nEnable dashify for your Pelican project into the `pelicanconf.py` config file :\n```python\nPLUGINS = ('pelican_dashify',)\n```\n\nDownload a video like the [Big Bunny](http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4) into the content directory, assuming path to be `content/videos/BigBuckBunny.mp4`. \nEdit a dummy article, with a \"DASHified\" version of the `BigBuckBunny.mp4` attached :\n\n\n```restructuredtext\nBig Buck Bunny\n==============\n\n:date: 2018-11-12 23:00\n:summary: This is a MPEG-DASH compliant sample of the Big Buck Bunny\n:video: {dashify}videos/BigBuckBunny.mp4\n```\n\nThat's it, the site can be generated.\n```\nmake html\n```\n\n### Generated files\n\nTranscoded representations are stored in a cache-like directory to avoid a re-transcoding on every site generation.\n\n```sh\noutput/videos/BigBuckBunny.mp4/.cache/1280x720_2211k.mp4\noutput/videos/BigBuckBunny.mp4/.cache/640x360_552k.mp4\noutput/videos/BigBuckBunny.mp4/.cache/320x180_138k.mp4\noutput/videos/BigBuckBunny.mp4/.cache/audio_128k.mp4\n```\n\nSince these files are stored in the Pelican output directory by default, they will be removed on cleaning, which leads to re-transcode. To avoid this behavior, set `DASHIFY_CACHE_PATH` outside the output scope.\n\nJust after, on packing phase, representations are segmented by MP4Box and placed in the output directory.\nFrom `BigBuckBunny.mp4`, using the default DASH profile 'onDemand', following files have been generated :\n\n```sh\noutput/videos/BigBuckBunny.mp4/manifest.mpd\noutput/videos/BigBuckBunny.mp4/1280x720_2211k_dash_track1_init.mp4\noutput/videos/BigBuckBunny.mp4/640x360_552k_dash_track1_init.mp4\noutput/videos/BigBuckBunny.mp4/320x180_138k_dash_track1_init.mp4\noutput/videos/BigBuckBunny.mp4/audio_128k_dash_track1_init.mp4\n```\n\nTo serve representations using the `onDemand` profile, the HTTP server must support range requests. As a workaround, the `live` profile can be used.\n\n### Video displaying\n\nNow the content has been generated, but Pelican doesn't know how and where to display the video. To do this, a modification of your template is required.\nYou can use any DASH player to read your converted video, for this example, we choose video.js for less code as possible.\n\nInto `article.html` :\n```jinja\n{% extends \"base.html\" %}\n...\n\n{% block content %}\n
\n ...\n
\n {% if article.video %}\n \n
{{ article.video.duration|timedelta_as_string }}
\n {% endif %}\n\n {{ article.content }}\n
\n
\n\n{% endblock %}\n```\n\nThe `timedelta_as_string` are provided by Pelican-dashify.\n\n\nSettings\n--------\n\nSettings can be defined globaly into `pelicanconf.py` or per video using a specific JSON file.\nTo define a video configuration, like a custom DASH profile for `BigBuckBunny.mp4`, create a file named `BigBuckBunny.mp4.dashify.config` with the following content :\n\n```json\n{\n\t\"DASHIFY_DASH_PROFILE\": \"live\"\n}\n```\n\n### General\n\n**DASHIFY_EXTRACT_TAGS**\n:\tInject the original video tags into the template variable `{{ .tags }}`. Default to `False`.\n\n**DASHIFY_CACHE_PATH**\n:\tUse a custom path to store the representations transcoded from the original video.\n\tBy default, dashify will store them into the content directory. Default to `None`.\n\n**DASHIFY_FFMPEG_BIN**\n:\tSpecific path to use for the ffmpeg binary, libav can be used. Default to `ffmpeg`.\n\n**DASHIFY_FFPROBE_BIN**\n:\tSpecific path to use for the ffprobe binary. Default to `ffprobe`.\n\n**DASHIFY_MP4BOX_BIN**\n:\tSpecific path to use for the MP4Box binary. Default to `MP4Box`.\n\n**DASHIFY_METATAG**\n:\tTag used to prefix video to be DASHified. Default to `{dashify}`.\n\n### Transcoding\n\n**DASHIFY_RESOLUTION_DIVISOR**\n:\tThe divisor used to downscale the resolution of representations. Default is `2`. \n\tFor a 720p formatted input, the 1280x720, 640x360 and 320x180 will be generated with `DASHIFY_VIDEO_REPRESENTATIONS` set to 3.\n\n**DASHIFY_VIDEO_REPRESENTATIONS**\n:\tHow many representations to generate. Default to `3`.\n\n**DASHIFY_SEGMENT_DURATION**\n:\tThe time of a DASH segment in seconds, used to switch between the different video/audio qualities. \n\tDashify will compute the ffmpeg keyint accordingly. Default to `4`.\n\n**DASHIFY_BITS_PER_PIXEL**\n:\tThe BPP used to compute the bitrate for a given resolution. Default to `0.1`.\n\n**DASHIFY_DASH_PROFILE**\n:\tChoices are : `onDemand`, `live`, `main`, `simple`, `full`, `dashavc264:live`, `dashavc264:onDemand`. \n\tDefault to `onDemand`.\n\n### Video\n\n**DASHIFY_FRAMERATE**\n:\tThe frames per second to use on representations. Default to `24`fps.\n\n**DASHIFY_X264_PRESET**\n:\tPreset used by ffmpeg on transcoding. Default to `slow` for a better rendering. \n\tChoices are : `ultrafast`, `superfast`, `veryfast`, `faster`, `fast`, `medium`, `slow`, `slower`, `veryslow`. \n\tFor more info check the [ffmpeg wiki](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset).\n\n**DASHIFY_VIDEO_STREAM_INDEX**\n:\tSelect a given stream from the input container. Default to `0` for the first available one.\n\n**DASHIFY_VIDEO_MAX_WIDTH**\n:\tSkip representation if computed width is greater then value. Default to `7680` (8K).\n\n**DASHIFY_VIDEO_MAX_HEIGHT**\n:\tSkip representation if computed height is greater then value. Default to `4320` (8K).\n\n**DASHIFY_VIDEO_MAX_BITRATE**\n:\tSkip representation if computed bitrate is greater then value. Default to `79626` (8K w/ 0.1 BPP @ 24fps).\n\n**DASHIFY_VIDEO_MIN_WIDTH**\n:\tSkip representation if computed width is lower then value. Default to `128`.\n\n**DASHIFY_VIDEO_MIN_HEIGHT**\n:\tSkip representation if computed height is lower then value. Default to `72`.\n\n**DASHIFY_VIDEO_MIN_BITRATE**\n:\tSkip representation if computed bitrate width is lower then value. Default to `22`.\n\n### Audio\n\n**DASHIFY_AUDIO_STREAM_INDEX**\n:\tSelect a given stream from the input container. Default to `0` for the first available one.\n\n**DASHIFY_AUDIO_CODEC**\n:\tCodec to use on audio transcoding. Default to `aac`.\n\n**DASHIFY_AUDIO_CHANNELS**\n:\tNumber of audio channels. Default to `2`.\n\n**DASHIFY_AUDIO_BITRATE**\n:\tDefault to `128`k.\n\n**DASHIFY_AUDIO_DISABLE**\n:\tDisable audio. Default to `False`.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ggueret/pelican-dashify", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pelican-dashify", "package_url": "https://pypi.org/project/pelican-dashify/", "platform": "", "project_url": "https://pypi.org/project/pelican-dashify/", "project_urls": { "Homepage": "https://github.com/ggueret/pelican-dashify" }, "release_url": "https://pypi.org/project/pelican-dashify/0.1.2/", "requires_dist": [ "pelican (>=3.7)" ], "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "summary": "Pelican-dashify let you to convert proper MPEG-DASH content generated from your videos with Pelican.", "version": "0.1.2" }, "last_serial": 5226612, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f358bb18e12ca172d56843f6a3e8c37f", "sha256": "398718fef6401b03e4b856ad67a5b7b9c4fd45014a91f467e2a081dce67c6590" }, "downloads": -1, "filename": "pelican_dashify-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f358bb18e12ca172d56843f6a3e8c37f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 10083, "upload_time": "2018-12-07T02:08:13", "url": "https://files.pythonhosted.org/packages/67/c6/747a1f0d2d20bf02c895d209b68c550d3db9683085c140c151dc832c6fed/pelican_dashify-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2b11dfb1504c610db5f13e5121063b4", "sha256": "78c20889ffccc0d59e2c3f3ff4815cc6c1a27bc9b4051f5a3abb4ba6fe318435" }, "downloads": -1, "filename": "pelican-dashify-0.1.0.tar.gz", "has_sig": false, "md5_digest": "e2b11dfb1504c610db5f13e5121063b4", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 9313, "upload_time": "2018-12-07T02:08:15", "url": "https://files.pythonhosted.org/packages/05/64/78dd2b05a4099ccabadae08fda9c929ab6102493f3c0b17c259e543e4657/pelican-dashify-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "0a7a6f3b4d385cdcc873e1028c19eaba", "sha256": "be96b52b3e770aa483c689b3e478175dd3eaea7abd1704ab81ec2d7e399ab93d" }, "downloads": -1, "filename": "pelican_dashify-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0a7a6f3b4d385cdcc873e1028c19eaba", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10353, "upload_time": "2019-04-28T22:15:58", "url": "https://files.pythonhosted.org/packages/e2/67/d4506c5e7c8b628385c54fb456a8b9b7160f8a87c078cb6c7b8b8ba04017/pelican_dashify-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "25e33f6de2895e862d1bdb990f892306", "sha256": "4a919c73aa888b95412734e5dce8d39d91458cc4016743b93b8d9d9fb1334dcb" }, "downloads": -1, "filename": "pelican-dashify-0.1.1.tar.gz", "has_sig": false, "md5_digest": "25e33f6de2895e862d1bdb990f892306", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10444, "upload_time": "2019-04-28T22:16:01", "url": "https://files.pythonhosted.org/packages/a8/5e/25febdb7305a4d12a4a67786def2e3995d67f271ac6313b9d8330a4c77a2/pelican-dashify-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "8598bec5d3e39d84b8931ccfd35ab7da", "sha256": "ec83a2f39b46661ef201c5a492a455ef2b3276248471f4fac9604f74700150e3" }, "downloads": -1, "filename": "pelican_dashify-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8598bec5d3e39d84b8931ccfd35ab7da", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10387, "upload_time": "2019-05-04T21:01:22", "url": "https://files.pythonhosted.org/packages/22/ce/7e292e1cdaaf4758c5b2e19060554728827f33460ee30f4d7cde75a73339/pelican_dashify-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a7ba2668f6f20accc8011c7054ea9d7", "sha256": "f25af6bde4c76db1b445e66bb9e16487cae6e834b279b3a2f8d3b689ea76e7d6" }, "downloads": -1, "filename": "pelican-dashify-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5a7ba2668f6f20accc8011c7054ea9d7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10490, "upload_time": "2019-05-04T21:01:24", "url": "https://files.pythonhosted.org/packages/a9/db/8f0d567313e9bd17a24e3dbb670b8150bf5ee60edb0fb3cf0b53626b9a7d/pelican-dashify-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8598bec5d3e39d84b8931ccfd35ab7da", "sha256": "ec83a2f39b46661ef201c5a492a455ef2b3276248471f4fac9604f74700150e3" }, "downloads": -1, "filename": "pelican_dashify-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "8598bec5d3e39d84b8931ccfd35ab7da", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10387, "upload_time": "2019-05-04T21:01:22", "url": "https://files.pythonhosted.org/packages/22/ce/7e292e1cdaaf4758c5b2e19060554728827f33460ee30f4d7cde75a73339/pelican_dashify-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a7ba2668f6f20accc8011c7054ea9d7", "sha256": "f25af6bde4c76db1b445e66bb9e16487cae6e834b279b3a2f8d3b689ea76e7d6" }, "downloads": -1, "filename": "pelican-dashify-0.1.2.tar.gz", "has_sig": false, "md5_digest": "5a7ba2668f6f20accc8011c7054ea9d7", "packagetype": "sdist", "python_version": "source", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "size": 10490, "upload_time": "2019-05-04T21:01:24", "url": "https://files.pythonhosted.org/packages/a9/db/8f0d567313e9bd17a24e3dbb670b8150bf5ee60edb0fb3cf0b53626b9a7d/pelican-dashify-0.1.2.tar.gz" } ] }