{"id":21424136,"url":"https://github.com/gaeqs/javayoutubedownloader","last_synced_at":"2025-07-14T08:31:37.503Z","repository":{"id":37096577,"uuid":"192745693","full_name":"gaeqs/JavaYoutubeDownloader","owner":"gaeqs","description":"A simple but powerful Youtube Download API for Java.","archived":false,"fork":false,"pushed_at":"2022-06-17T09:35:52.000Z","size":117,"stargazers_count":35,"open_issues_count":3,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-08T05:13:36.511Z","etag":null,"topics":["downloader","java","video","youtube"],"latest_commit_sha":null,"homepage":"https://gaeqs.github.io/projects/JavaYoutubeDownloader/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gaeqs.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":"2019-06-19T14:12:25.000Z","updated_at":"2025-04-06T20:45:09.000Z","dependencies_parsed_at":"2022-06-24T13:15:35.482Z","dependency_job_id":null,"html_url":"https://github.com/gaeqs/JavaYoutubeDownloader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gaeqs/JavaYoutubeDownloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaeqs%2FJavaYoutubeDownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaeqs%2FJavaYoutubeDownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaeqs%2FJavaYoutubeDownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaeqs%2FJavaYoutubeDownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gaeqs","download_url":"https://codeload.github.com/gaeqs/JavaYoutubeDownloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gaeqs%2FJavaYoutubeDownloader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265262612,"owners_count":23736429,"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":["downloader","java","video","youtube"],"created_at":"2024-11-22T21:19:50.307Z","updated_at":"2025-07-14T08:31:37.071Z","avatar_url":"https://github.com/gaeqs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JavaYoutubeDownloader\nA simple but powerful Youtube Download API for Java.\n\n\u003ch2\u003e\u003cb\u003eWhat is JYD?\u003c/b\u003e\u003c/h2\u003e\nJavaYoutubeDownloader is a small and simple Youtube Stream downloader \nthat allows you to download or use any video on the platform in a\nfew lines.\n\n\u003ch2\u003e\u003cb\u003eInstallation\u003c/b\u003e\u003c/h2\u003e\n\nYou can easily install JYD using maven:\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003eio.github.gaeqs\u003c/groupId\u003e\n        \u003cartifactId\u003eJavaYoutubeDownloader\u003c/artifactId\u003e\n        \u003cversion\u003eLATEST\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\n\u003ch2\u003e\u003cb\u003eUsage\u003c/b\u003e\u003c/h2\u003e\n\nUsing JYD is very easy! This is an example of a method that downloads a video and saves the option with\nthe best video quality into a file:\n\n```java\npublic static boolean download(String url, File folder) {\n\t//Extracts and decodes all streams.\n\tYoutubeVideo video = JavaYoutubeDownloader.decodeOrNull(url, MultipleDecoderMethod.AND, \"html\", \"embedded\");\n\t//Gets the option with the greatest quality that has video and audio.\n\tStreamOption option = video.getStreamOptions().stream()\n\t\t.filter(target -\u003e target.getType().hasVideo() \u0026\u0026 target.getType().hasAudio())\n\t\t.min(Comparator.comparingInt(o -\u003e o.getType().getVideoQuality().ordinal())).orElse(null);\n\t//If there is no option, returns false.\n\tif (option == null) return false;\n\t//Prints the option type.\n\tSystem.out.println(option.getType());\n\t//Creates the file. folder/title.extension\n\tFile file = new File(folder, video.getTitle() + \".\" + option.getType().getContainer().toString().toLowerCase());\n\t//Creates the downloader.\n\tStreamDownloader downloader = new StreamDownloader(option, file, null);\n\t//Runs the downloader.\n\tnew Thread(downloader).start();\n\treturn true;\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaeqs%2Fjavayoutubedownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgaeqs%2Fjavayoutubedownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgaeqs%2Fjavayoutubedownloader/lists"}