{"id":15373835,"url":"https://github.com/binwiederhier/submonkey","last_synced_at":"2025-07-21T18:31:10.695Z","repository":{"id":64304685,"uuid":"405711024","full_name":"binwiederhier/submonkey","owner":"binwiederhier","description":"submonkey is a tool to generate videos from Reddit 🙈","archived":false,"fork":false,"pushed_at":"2021-09-18T19:09:41.000Z","size":30,"stargazers_count":9,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T15:11:37.861Z","etag":null,"topics":["downloader","go","golang","reddit","video"],"latest_commit_sha":null,"homepage":"https://heckel.io/submonkey","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binwiederhier.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}},"created_at":"2021-09-12T17:40:33.000Z","updated_at":"2024-11-30T07:21:40.000Z","dependencies_parsed_at":"2023-01-15T10:15:41.414Z","dependency_job_id":null,"html_url":"https://github.com/binwiederhier/submonkey","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/binwiederhier/submonkey","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binwiederhier%2Fsubmonkey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binwiederhier%2Fsubmonkey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binwiederhier%2Fsubmonkey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binwiederhier%2Fsubmonkey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binwiederhier","download_url":"https://codeload.github.com/binwiederhier/submonkey/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binwiederhier%2Fsubmonkey/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266352494,"owners_count":23915764,"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","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["downloader","go","golang","reddit","video"],"created_at":"2024-10-01T13:56:30.285Z","updated_at":"2025-07-21T18:31:10.585Z","avatar_url":"https://github.com/binwiederhier.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# submonkey 🙈\n\nsubmonkey is a tool to generate videos from Reddit. It downloads videos from one or more subreddits, and concatenates\nand scales them. Under the hood, it uses the powers of [youtube-dl](https://youtube-dl.org/) and [FFmpeg](https://ffmpeg.org/)\n\nI made this just for fun, mainly so I can generate an endless stream of animal videos for my son from \n[r/AnimalsBeingBros](https://www.reddit.com/r/AnimalsBeingBros) and [r/AnimalsBeingDerps](https://www.reddit.com/r/AnimalsBeingDerps).\n\n## Usage\nAfter [installing submonkey](#installation), you may run it like this.\n\n_Example 1:_ Generate a video from the 5 _hottest_ posts on [r/AnimalsBeingBros](https://www.reddit.com/r/AnimalsBeingBros) and \n[r/AnimalsBeingDerps](https://www.reddit.com/r/AnimalsBeingDerps), within the last week, as 360p video (bad quality):\n```\n$ submonkey animals.mp4\n2021/09/13 09:42:09 Retrieving hot posts for subreddit(s) AnimalsBeingBros+AnimalsBeingDerps ...\n2021/09/13 09:42:11 Downloading up to 5 video(s) ...\n2021/09/13 09:42:12 - Downloaded pmzcar (1/5), https://v.redd.it/myh6xa96j4n71 ...\n2021/09/13 09:42:14 - Downloaded pn3o1m (2/5), https://v.redd.it/53zirs95p5n71 ...\n2021/09/13 09:42:16 - Downloaded pndyvs (3/5), https://v.redd.it/09lxtrl1g9n71 ...\n2021/09/13 09:42:18 - Downloaded pnczrp (4/5), https://v.redd.it/xe2lcvc739n71 ...\n2021/09/13 09:42:21 - Downloaded pmv292 (5/5), https://v.redd.it/ewiopd5ie3n71 ...\n2021/09/13 09:42:21 Generating video animals.mp4 ...\n2021/09/13 09:42:40 Done.\n```\n\n_Example 2:_ Generate a video from the 3 _top_ posts on [r/funny](https://www.reddit.com/r/funny), within the last 24 hours, \nas 720p video:\n```\n$ submonkey \\\n  --sort top \\\n  --time day \\\n  --filter funny \\\n  --limit 3 \\\n  --size 720p \\\n  funny.mp4 \n2021/09/13 09:43:07 Retrieving top posts for subreddit(s) funny ...\n2021/09/13 09:43:08 Downloading up to 3 video(s) ...\n2021/09/13 09:43:09 - Downloaded pn04w9 (1/3), https://v.redd.it/u6gakr7oq4n71 ...\n2021/09/13 09:43:11 - Downloaded pmti5s (2/3), https://v.redd.it/jnwu323nz2n71 ...\n2021/09/13 09:43:13 - Downloaded pmtuez (3/3), https://i.redd.it/pyjom9l933n71.gif ...\n2021/09/13 09:43:13 Generating video funny.mp4 ...\n2021/09/13 09:44:05 Done.\n```\n\n## Installation\nBefore installing submonkey, please install [youtube-dl](https://youtube-dl.org/) and [FFmpeg](https://ffmpeg.org/) first.\nIf you're on Linux, you only need to install `youtube-dl` manually. `ffmpeg` is installed as a package dependency.\n\nBinaries can be found on the [releases page](https://github.com/binwiederhier/submonkey/releases). \n\n**Debian/Ubuntu** (*from a repository*)**:**   \n```bash\n# Dependencies: youtube-dl doesn't have a package in the repos\nsudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl\n\n# Add repository and install submonkey\ncurl -sSL https://archive.heckel.io/apt/pubkey.txt | sudo apt-key add -\nsudo apt install apt-transport-https\nsudo sh -c \"echo 'deb [arch=amd64] https://archive.heckel.io/apt debian main' \u003e /etc/apt/sources.list.d/archive.heckel.io.list\"  \nsudo apt update\nsudo apt install submonkey\n```\n\n**Debian/Ubuntu** (*manual install*)**:**\n```bash\n# Dependencies: youtube-dl doesn't have a package in the repos\nsudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl\n\n# Install submonkey from deb file, and ffmpeg\nwget https://github.com/binwiederhier/submonkey/releases/download/v0.1.0/submonkey_0.1.0_amd64.deb\ndpkg -i submonkey_0.1.0_amd64.deb\napt-get install -f\n```\n\n**Fedora/RHEL/CentOS:**\n```bash\n# Dependencies: youtube-dl doesn't have a package in the repos\nsudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl\n\n# Install submonkey from rpm file\nrpm -ivh https://github.com/binwiederhier/submonkey/releases/download/v0.1.0/submonkey_0.1.0_amd64.rpm\n```\n\n**Docker:**   \nSince submonkey generates files, you should pass `-u` to ensure that you run it with your own user and group, and \nto mount the `/submonkey` directory wherever you want the output files to be using `-v`. You may also mount \n`/.cache/submonkey` if you like to keep the download cache around.\n\nPlease note that the performance of encoding videos using FFmpeg inside of Docker is **orders of magnitudes slower**,\nlikely due to the fact that you cannot use the GPU.\n\n```bash\nmkdir output\ndocker run \\\n  -u \"$(id -u):$(id -g)\" \\\n  -v \"$(pwd)/output:/submonkey\" \\\n  -it binwiederhier/submonkey \\\n  video.mp4\n```\n\n**Go:**\n```bash\n# Dependencies: youtube-dl doesn't have a package in the repos\nsudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/bin/youtube-dl\napt-get install ffmpeg # or similar ...\n\n# Get submonkey\ngo get -u heckel.io/submonkey\n```\n\n**Manual install** (*any x86_64-based Linux*)**:**\n```bash\nwget https://github.com/binwiederhier/submonkey/releases/download/v0.1.0/submonkey_0.1.0_linux_x86_64.tar.gz\nsudo tar -C /usr/bin -zxf submonkey_0.1.0_linux_x86_64.tar.gz submonkey\n```\n\n## Command-line help\n```bash \n$ submonkey --help\nNAME:\n   submonkey - Create videos from Reddit posts\n\nUSAGE:\n   submonkey [OPTIONS..] OUTFILE.mp4\n\nGLOBAL OPTIONS:\n   --filter value, -f value      source subreddit(s) to be used for videos (default: \"AnimalsBeingBros+AnimalsBeingDerps\")\n   --sort value, -s value        sort posts [hot, top, rising, new, controversial] (default: \"hot\")\n   --time value, -t value        time period to sort posts by [hour, day, week, month, year, all] (default: \"week\")\n   --limit value, -l value       number of posts to include in the video (default: 5)\n   --nsfw, -n                    include NSFW content (default: false)\n   --size value, -S value        dimensions of the output video [360p, 720p, 1080p, WxH] (default: \"360p\")\n   --cache-dir value, -C value   cache directory for video downloads (default: \"/home/pheckel/.cache/submonkey\")\n   --cache-keep value, -K value  duration after which to delete cache entries (default: \"1d\")\n\nTry 'submonkey COMMAND --help' for more information.\n\nsubmonkey 0.1.0 (930324d), runtime go1.17, built at 2021-09-13T13:35:10Z\nCopyright (C) 2021 Philipp C. Heckel, distributed under the Apache License 2.0\n``` \n\n## Building\n```\nmake build-simple\n# Builds to dist/submonkey_linux_amd64/submonkey\n``` \n\nTo build releases, I use [GoReleaser](https://goreleaser.com/). If you have that installed, you can run `make build` or \n`make build-snapshot`.\n\n## Contributing\nI welcome any and all contributions. Just create a PR or an issue.\n\n## License\nMade with ❤️ by [Philipp C. Heckel](https://heckel.io), distributed under the [Apache License 2.0](LICENSE).\n\nThird party libraries:\n* [github.com/urfave/cli/v2](https://github.com/urfave/cli/v2) (MIT) is used to drive the CLI\n* [go-reddit](https://github.com/vartanbeno/go-reddit) (MIT) is used to talk to Reddit\n* [FFmpeg](https://ffmpeg.org/) (LGPL 2.1) is used to generate videos\n* [youtube-dl](https://ffmpeg.org/) (LGPL 2.1) is used to generate videos\n* [GoReleaser](https://goreleaser.com/) (MIT) is used to create releases \n\nCode and posts that helped:\n* [FFmpeg filtering introduction](https://ffmpeg.org/ffmpeg-filters.html#Filtering-Introduction)\n* [How to concat videos of different sizes](https://stackoverflow.com/a/48853654/1440785)\n* [How to use anullsrc to add a silent audio track](https://stackoverflow.com/questions/46057412/ffmpeg-concat-multiple-videos-some-with-audio-some-without/46058429#46058429)\n* [Figure out if video has audio](https://stackoverflow.com/a/21447100/1440785)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinwiederhier%2Fsubmonkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinwiederhier%2Fsubmonkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinwiederhier%2Fsubmonkey/lists"}