{ "info": { "author": "Hudson Bailey", "author_email": "hudsondiggsbailey@gmail.com", "bugtrack_url": null, "classifiers": [ "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# tubedreams\n\ntubedreams is part of [material browsing history](https://hudsonbailey.org/projects/material-history/), an experiment in self-quantification and imagining different ways of engaging with computation, privacy, consumption and personal data.\n\ntubedreams is a command line program that concatenates random pieces of local or online videos with the intention of making collages of videos you have viewed. In its default settings, tubedreams turns your YouTube viewing history into new video content. Unrelated sequences of images and sound are recombined in playful or nightmarish ways that could only be produced via your own uniquely-curated media consumption. It can also be adapted for other purposes of making quick video collages (see [examples](#examples)).\n\n## Dependencies\n\n- [python 3](https://www.python.org/downloads/)\n\n- [ffmpeg](https://ffmpeg.org/)\n\n- [SoX](https://sox.sourceforge.net/)\n\nAs well as a few python packages, which should automatically get installed when this package is installed:\n\n- [youtube-dl](https://github.com/rg3/youtube-dl) -- for grabbing videos from YouTube or another site.\n\n- [moviepy](https://github.com/Zulko/moviepy) -- for cutting video (uses ffmpeg as a backend).\n\n- [pysox](https://github.com/rabitt/pysox), a python wrapper for SoX -- for audio effects\n\n## Installation\n\n```\npip install tubedreams\n```\n\n## Setup\n\nBy default, tubedreams attempts to access your YouTube history as a playlist via youtube-dl. In order for youtube-dl to access your history like your browser does, you need to configure your login information in one of three ways:\n\n- Setup the `.tubedreams.conf` file in the package directory (tubedreams looks for this by default).\n\n- Add your login information to a .netrc file (and pass the `--netrc` argument):\n\n ```\n touch ~/.netrc\n chmod 600 ~/.netrc\n echo \"machine youtube login LOGIN password PASSWORD\" >> ~/.netrc\n\n # verify that the login information is correct\n tubedreams --netrc --number 1 --length 5 --minmax 5 --fresh --output test.mp4\n ```\n\n- Or pass your login information manually via the `--login USERNAME PASSWORD` argument.\n\n_note: If you have two-factor authentication set-up with your YouTube/Google account, you will be required to manually authenticate since youtube-dl does not support interfacing with the YouTube developer API._\n\nFor public playlists, searches or individual videos, you can pass the argument `--nologin` to avoid having to setup authentication.\n\n## Options\n\n```\n\nusage: tubedreams [-h] [-v] [-dd] [-s [[...]]] [-p ] [-f] [-o ] [-k] [-u ]\n [-n ] [-da] [-N] [-L [[...]]] [-nl] [-l ] [-m [[...]]]\n [-fc ] [-g] [-x] [-r [[...]]] [-c ] [-a ] [-oa] [-dp] [-vf ]\n\ncreate dream-sequences from your video browsing history\n\noptional arguments:\n -h, --help show this help message and exit\n -v, --version show program's version number and exit\n -dd, --dontdownload don't download any videos or connect to youtube-dl.\n will only use local videos from source directories.\n -s [ [ ...]], --source [ [ ...]]\n specify directories to draw raw footage from. the\n first directory listed also specifies the location for\n new videos to download\n -p [], --pattern [] only use videos from input directories which contain a\n given string. note: will still download raw videos\n that do not match pattern.\n -f, --fresh only include videos downloaded this run\n -o [], --output [] specify file name and directory for final video output\n -k, --keep keep raw downloaded videos after processing is\n completed\n\nyoutube-dl options:\n -u [], --url [] the url of the playlist, search page, or video to\n download from. default is to grab history from\n https://www.youtube.com/feed/history\n -n [], --number [] number of videos to download\n -da, --downloadall download all videos in playlist. overrides -n\n -N, --netrc use .netrc file for login instead of .tubedreams.conf\n -L [ [ ...]], --login [ [ ...]]\n username and password for accessing YouTube or other\n site via youtube-dl.\n -nl, --nologin do not log into an account to access site\n\nvideo output options:\n -l [], --length [] total length of video to output\n -m [ [ ...]], --minmax [ [ ...]]\n minimum and maximum length of each clip. one input\n fixes a static clip length. two inputs sets range.\n -fc [], --finalclip []\n specify length of final clip\n -g, --grow scale length of clips so that they gradually get\n longer or shorter to match finalclip. must use with\n finalclip.\n -x, --exponential makes length scaling exponential. must use with grow.\n -r [ [ ...]], --resolution [ [ ...]]\n select dimensions to output to. one input specifies y\n dimension for 12:9 ratio. for two inputs, the smaller\n specifies y and the larger specifies x. default is\n 480p.\n -c [], --codec [] choose codec for uncommon video format or override\n default codec. defaults are included for mp4\n (libx264), mkv (libx264), webm (libvpx), ogv\n (libvorbis) and avi (png).\n -a [], --setaudio [] add path to audio track to use\n -oa, --onlyaudio only export to mp3 audio, no video.\n -dp, --dontprocessaudio\n keep raw audio and do not apply sox filters.\n -vf [], --videofilters []\n add ffmpeg video filters to output video.\n\n```\n\n## Filters\n\nSee the [ffmpeg documentation](https://ffmpeg.org/ffmpeg-filters.html) for a list of native ffmpeg filters and usage syntax. You can invoke ffmpeg video filters in tubedreams with `-vf` just as you would with ffmpeg:\n\n```\n-vf eq=brightness=.3:contrast=2:gamma=.6:saturation=0,fade=in:0:60\n```\n\nComplex filters and audio filters are not currently supported.\n\n## Downloading Videos\n\nSee [this list](https://rg3.github.io/youtube-dl/supportedsites.html) for sites currently supported by youtube-dl. Note that not all of these supported sites will necessarily have playlist features fully implemented. For non-YouTube sites, it could be necessary to create a work-around to capture videos in history or playlists even if they appear in this list.\n\n## Examples\n\nDownload five random videos from your YouTube history, keep them, and chop and recombine into a 20 second clip:\n\n```\ntubedreams --number 5 --fresh --keep --length 20 --minmax 1 3 --output test.mp4\n```\n\nA random 10 second clip from your YouTube history:\n\n```\ntubedreams --number 1 --fresh --length 10 --minmax 10 --dontprocessaudio --output 10sec.avi\n```\n\nDownload your entire YouTube history and turn it into a 5-hour-long sound collage for an art exhibition:\n\n```\ntubedreams --downloadall --onlyaudio --length 18000 --minmax .2 10 --output experimental.mp3\n```\n\nCut clips from local video files and make into black-and-white:\n\n```\ntubedreams --dontdownload --source ~/Videos/movies/ ~/Videos/shows/ --videofilters \"eq=saturation=0:gamma=.5:contrast=2:brightness=.2\" --length 120 --minmax 10 --output bw.mkv\n```\n\nThe news in 30 seconds:\n\n```\ntubedreams --url \"https://www.youtube.com/results?search_query=news\" --nologin --downloadall --fresh --length 30 --minmax .1 .5 --videofilters eq=saturation=5:contrast=2,random --dontprocessaudio --output news.ogv\n```\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/hdbhdb/tubedreams", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "tubedreams", "package_url": "https://pypi.org/project/tubedreams/", "platform": "", "project_url": "https://pypi.org/project/tubedreams/", "project_urls": { "Homepage": "https://github.com/hdbhdb/tubedreams" }, "release_url": "https://pypi.org/project/tubedreams/0.3.0/", "requires_dist": [ "sox (>=1.3.3)", "youtube-dl (>=2018.5.18)", "ez-setup (>=0.9)", "moviepy (>=0.2.3.5)" ], "requires_python": "", "summary": "create dream-sequences from your video browsing history", "version": "0.3.0" }, "last_serial": 4303051, "releases": { "0.2.5": [ { "comment_text": "", "digests": { "md5": "0c07adfcad94fd13322bd99d97cf77f0", "sha256": "c7493373537f8aff003248dc853eb49b20a3ca78767bcaf53764b5cf8b650a72" }, "downloads": -1, "filename": "tubedreams-0.2.5-py3-none-any.whl", "has_sig": false, "md5_digest": "0c07adfcad94fd13322bd99d97cf77f0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11136, "upload_time": "2018-07-05T21:51:03", "url": "https://files.pythonhosted.org/packages/49/11/768d9e46c138e07a27052f7e6ddc94100947d9ea84f57cbeb5134c1160d3/tubedreams-0.2.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "799ebd34ceb5f12e93a9e1b09c97dd4f", "sha256": "afd5a3eb211c04f9dd0dce5631b30364e472d4c35f7c15742e8215bbe6c35752" }, "downloads": -1, "filename": "tubedreams-0.2.5.tar.gz", "has_sig": false, "md5_digest": "799ebd34ceb5f12e93a9e1b09c97dd4f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10063, "upload_time": "2018-07-05T21:51:04", "url": "https://files.pythonhosted.org/packages/a9/98/ab2a6e2db018e7e3849f82a2fafaf4c1d1f7013c4de285cd32afcde2badd/tubedreams-0.2.5.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "c3f5912b257e758843152f747594a873", "sha256": "7cd56d875357dc5434087a14d5f7a20fa32d435cadaa6cbc57e8b1d7ef049cc8" }, "downloads": -1, "filename": "tubedreams-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3f5912b257e758843152f747594a873", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10753, "upload_time": "2018-09-23T21:18:35", "url": "https://files.pythonhosted.org/packages/1d/b8/585847db68d8d96d8a534cd2c1b27deed690247e37c649ba9c7d47e6d689/tubedreams-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a8883110db2f02021d543c56ff5e282", "sha256": "5bf5f7ec2c4e58cb202d0d64f662568301d5f9b8d8b6a2170814799c6712d649" }, "downloads": -1, "filename": "tubedreams-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5a8883110db2f02021d543c56ff5e282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9621, "upload_time": "2018-09-23T21:18:37", "url": "https://files.pythonhosted.org/packages/e0/f9/c8cae8a4944ce44711a175a294c55775e567a9615950a33ea5d26c07a640/tubedreams-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c3f5912b257e758843152f747594a873", "sha256": "7cd56d875357dc5434087a14d5f7a20fa32d435cadaa6cbc57e8b1d7ef049cc8" }, "downloads": -1, "filename": "tubedreams-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c3f5912b257e758843152f747594a873", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10753, "upload_time": "2018-09-23T21:18:35", "url": "https://files.pythonhosted.org/packages/1d/b8/585847db68d8d96d8a534cd2c1b27deed690247e37c649ba9c7d47e6d689/tubedreams-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5a8883110db2f02021d543c56ff5e282", "sha256": "5bf5f7ec2c4e58cb202d0d64f662568301d5f9b8d8b6a2170814799c6712d649" }, "downloads": -1, "filename": "tubedreams-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5a8883110db2f02021d543c56ff5e282", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9621, "upload_time": "2018-09-23T21:18:37", "url": "https://files.pythonhosted.org/packages/e0/f9/c8cae8a4944ce44711a175a294c55775e567a9615950a33ea5d26c07a640/tubedreams-0.3.0.tar.gz" } ] }