{"id":13405422,"url":"https://github.com/ben-xo/dir2cast","last_synced_at":"2026-01-23T19:15:10.707Z","repository":{"id":998551,"uuid":"809858","full_name":"ben-xo/dir2cast","owner":"ben-xo","description":"Turn a directory of MP3s into a podcast - automatically.","archived":false,"fork":false,"pushed_at":"2025-11-01T13:55:17.000Z","size":844,"stargazers_count":179,"open_issues_count":15,"forks_count":28,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-14T02:41:16.953Z","etag":null,"topics":["automatic","folder","itunes","mp3","mp3-files","php","podcast","podcast-generator","podcasting","podcasts","rss","rss-feed","rss-feed-generator","rss-generator"],"latest_commit_sha":null,"homepage":"http://www.ben-xo.com/dir2cast","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ben-xo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.txt","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"patreon":"benxo","custom":["https://www.paypal.me/benxo"]}},"created_at":"2010-07-31T22:33:18.000Z","updated_at":"2026-01-05T00:58:22.000Z","dependencies_parsed_at":"2024-10-26T00:40:42.827Z","dependency_job_id":"ba04d7c6-4c85-48df-b1fd-e76825572190","html_url":"https://github.com/ben-xo/dir2cast","commit_stats":null,"previous_names":[],"tags_count":48,"template":false,"template_full_name":null,"purl":"pkg:github/ben-xo/dir2cast","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-xo%2Fdir2cast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-xo%2Fdir2cast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-xo%2Fdir2cast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-xo%2Fdir2cast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ben-xo","download_url":"https://codeload.github.com/ben-xo/dir2cast/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ben-xo%2Fdir2cast/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28698468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T17:25:48.045Z","status":"ssl_error","status_checked_at":"2026-01-23T17:25:47.153Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["automatic","folder","itunes","mp3","mp3-files","php","podcast","podcast-generator","podcasting","podcasts","rss","rss-feed","rss-feed-generator","rss-generator"],"created_at":"2024-07-30T19:02:01.668Z","updated_at":"2026-01-23T19:15:10.699Z","avatar_url":"https://github.com/ben-xo.png","language":"PHP","readme":"[![Testing dir2cast](https://github.com/ben-xo/dir2cast/actions/workflows/testing.yml/badge.svg)](https://github.com/ben-xo/dir2cast/actions/workflows/testing.yml)\r\n\r\n\r\ndir2cast by Ben XO v1.38 (2023-01-05)\r\n================================================================================\r\n\r\nhttps://github.com/ben-xo/dir2cast/\r\n\r\n\r\nINTRODUCTION\r\n================================================================================\r\n\r\nHello!\r\n\r\ndir2cast is designed to turn a directory of MP3s into a podcast - automatically.\r\nPerfect for, say, radio shows - upload the MP3s to a folder, and use dir2cast.php\r\nas your PodCast URL.\r\n\r\nFeatures:\r\n\r\n* For 99% of things, NO CONFIGURATION IS NECESSARY. All you have to do is upload\r\n  dir2cast to your web server, then start uploading media files, and it will\r\n  pick up most of the podcast text straight from the tags in the file (such as\r\n  the artist, title and comment tags.)\r\n\r\n* supports MP3, MP4, M4A and M4B files\r\n\r\n* dir2cast will automatically use the ID3 fields from your files for the Author,\r\n  Title, etc. ID3v2 is supported, as are the usual tags found in MP4 / M4A / M4B\r\n  files. (Uses getID3, which is bundled with dir2cast.)\r\n\r\n* dir2cast will automatically use the cover art embedded in your file as well.\r\n\r\n* The generated feed is cached (in the supplied 'temp' folder, or anywhere else\r\n  that you want) and only updated if something in the directory changes - so\r\n  the feed will load fast and put minimal strain on your web server. It only\r\n  regenerates the feed when a new episode is uploaded.\r\n\r\n* Comprehensive support for iTunes podcast tags.\r\n\r\n* iTunes 'image' supported: just drop a file called itunes_image.jpg in the same\r\n  folder as your media files.\r\n\r\n* RSS Description, iTunes Subtitle and iTunes Summary can be set by dropping\r\n  files named description.txt, itunes_subtitle.txt and itunes_summary.txt \r\n  in the same folder as dir2cast.php - but they are not required. (You can\r\n  also set these in the config).\r\n\r\n* You can set a per-file iTunes Summary by creating a text file with the same\r\n  name as the media file (e.g. for file.mp3, create file.txt).\r\n\r\n\r\nQUICK HOW TO GUIDES\r\n================================================================================\r\n\r\nHere are links to a couple of guides on how to set up a podcast, using dir2cast.\r\nThanks to the people who wrote these guides!\r\n\r\n* https://sys.re/files/itunes/ (by nilicule)\r\n* https://www.reddit.com/r/selfhosted/comments/ae37kf/ (by u/wagesj45)\r\n\r\n\r\nREQUIREMENTS\r\n================================================================================\r\n\r\ndir2cast requires PHP 5.4 minimum. It requires the XML extension to be enabled.\r\n\r\nIt has been tested up to PHP 8. Please file a bug if you find any PHP version\r\nspecific problems: https://github.com/ben-xo/dir2cast/issues\r\n\r\ndir2cast makes use of getID3 by James Heinrich \u0026 Allan Hansen, although it does\r\nnot require the whole thing. A cut down version of getID3 is supplied at\r\nhttps://github.com/ben-xo/dir2cast/. You will need to download this and \r\ninstall it with dir2cast.php. The full version of getID3 is available at \r\nhttp://getid3.sourceforge.net/ .\r\n\r\n\r\nINSTALLATION\r\n================================================================================\r\n\r\nPlease note: the config file will make more sense if you read all of this `README`\r\nbefore trying the installation instructions.\r\n\r\ndir2cast is quite flexible but the general idea is that you add cover art and\r\ntags to your media files (mp3, mp4, m4a and m4b currently supported) and then the\r\npodcast that it generates uses the tags from your files.\r\n\r\n1. Edit `dir2cast.ini` to your taste.\r\n2. Upload `dir2cast.php` and `dir2cast.ini` to the web server.\r\n3. Upload `getID3` to a folder called '`getID3`'. (You can download getID3 from\r\n   the same place as dir2cast.)\r\n4. Upload a media file to the same folder as `dir2cast.php`\r\n5. Go to the URL for `dir2cast.php `- e.g. http://example.com/dir2cast.php\r\n6. This is your podcast! Check it's valid at https://podba.se/validate/\r\n   You may need to edit dir2cast.ini some more to get the text you want.\r\n   The generated feed is cached. It will regenerate if you add a new media\r\n   file, but if you want to force a regeneration delete the files from \r\n   the \"`temp`\" folder that is created.\r\n\r\n\r\nUNDERSTANDING HOW THE CACHING WORKS\r\n================================================================================\r\n\r\ndir2cast caches the feed so that it only has to renegerate the content when\r\nsomething changes. It does this by looking at the file-modification times of\r\nthe media content, and of `dir2cast.php` and `dir2cast.ini`.\r\n\r\n* The feed will be updated no more than once every 5 seconds (`MIN_CACHE_TIME`)\r\n  This is to prevent high load if the feed is hammered by clients.\r\n* The feed will be updated when a media file that is newer than the cache file\r\n  appears in the folder, as long as the media file was not updated in the last\r\n  30 seconds (`MIN_FILE_AGE`). This is so that it doesn't accidentally include\r\n  files which are still being uploaded.\r\n* Empty media files are ignored (nobody enjoys listening to them anyway)\r\n* The feed will be updated when `dir2cast.php` or `dir2cast.ini` are newer\r\n  than the cache file as a convenience when upgrading.\r\n\r\n**Notes**:\r\n* Files in the feed appear in order of their modification times (most recent\r\n  first). This is usually the order in which you copy them into the folder, but\r\n  some methods of copying preserve the original times from your upload source.\r\n  If you aren't seeing what you expect, check that these times are in the right\r\n  order. On Linux, you can use the command `touch` to update the modification\r\n  time of a file.\r\n* Extra files (such as the images and .txt descriptions) are NOT checked. If you\r\n  modify these and need to refresh the feed, either delete the cache folder or\r\n  use the `?force=\u003cpassword\u003e` URL (see `dir2cast.ini` `FORCE_PASSWORD`)\r\n\r\n\r\nTIPS\r\n================================================================================\r\n\r\n\r\nCASTING SEVERAL FOLDERS FROM ONE DIR2CAST.PHP\r\n--------------------------------------------------------------------------------\r\n\r\nIf you have more than one folder of MP3s that you are casting, you can serve\r\nthem all from a single install of dir2cast.php, and customise dir2cast.ini for\r\neach individual folder.\r\n\r\nAssuming the following:\r\n* your web root folder is called `htdocs/` and this maps to http://www.mysite.com/\r\n* you installed dir2cast to the folder `htdocs/dir2cast`\r\n* you have two podcasts, and the MP3s live in `htdocs/dir2cast/cast1` and\r\n  `htdocs/dir2cast/cast2`\r\n\r\n1. Make 2 extra copies of `dir2cast.ini` (one for each cast), and then edit\r\n   to taste. (Any settings not specified will be taken from the main\r\n   `dir2cast.ini` - the one that is in the same folder as `dir2cast.php`).\r\n2. Upload these additional dir2cast.ini files to the `htdocs/dir2cast/cast1/`\r\n   and `htdocs/dir2cast/cast2/` folders, respectively.\r\n\r\nThe podcast URLs will now be:\r\n\r\nhttp://www.mysite.com/dir2cast/dir2cast.php?dir=cast1 and\r\nhttp://www.mysite.com/dir2cast/dir2cast.php?dir=cast2 .\r\n\r\n\r\n\"PRETTY\" URLS FOR YOUR PODCASTS\r\n--------------------------------------------------------------------------------\r\n\r\n### If Your Web Server is Apache\r\n\r\nI assume you already have PHP working with Apache.\r\n\r\nThis hint requires your web server to be Apache with '`mod_rewrite`' enabled.\r\n\r\nFrom the example above, your podcast URL will be:\r\n\r\n    http://www.mysite.com/dir2cast/dir2cast.php?dir=cast1\r\n\r\n...but much nicer would be something along the lines of\r\n\r\n    http://www.mysite.com/dir2cast/cast1/rss\r\n\r\nTo achieve this, you must configure apache with a rewrite rule such as:\r\n\r\n    RewriteEngine on\r\n    RewriteRule (.+)/rss$ dir2cast.php?dir=$1 [L]\r\n\r\nPut this in your `VHOST` configuration (inside a `\u003cLocation\u003e` block) or in a\r\n`.htaccess` file alongside `dir2cast.php` .\r\n\r\nPLEASE NOTE: just to check that you understand this section... \r\n* If you use the `RewriteRule` supplied, `dir2cast.php` must be in the folder above\r\n  the MP3 folders. (If this is not the case, you will have to set MP3_BASE in\r\n  the ini file, and change the rule for your circumstance.)\r\n\r\n\r\n### If Your Web Server is NGINX\r\n\r\nI assume you already have PHP working on NGINX\r\n\r\nFrom the example above, your podcast URL would be:\r\n\r\n    http://www.mysite.com/dir2cast/dir2cast.php?dir=cast1\r\n\r\nAdd some configuration like the following to your sites conf\r\n\r\n    location = /dir2cast/rss {\r\n      rewrite ^(/dir2cast)/rss $1/dir2cast.php last;\r\n    }\r\n\r\nThis assumes the URL you want is /dir2cast/rss, and that the URL of dir2cast.php\r\nis /dir2cast/dir2cast.php\r\n\r\n\r\nTESTING\r\n================================================================================\r\n\r\nTo run the unit tests:\r\n1. make sure you have xdebug installed. (`pecl install xdebug`)\r\n2. make sure you have composer installed. (`brew install composer # (or similar)`)\r\n3. `cd test \u0026\u0026 composer install`\r\n4. `./run.sh`\r\n\r\n\r\nCOPYRIGHT \u0026 LICENSE\r\n================================================================================\r\n\r\nCopyright (c) 2008-2021, Ben XO (me@ben-xo.com).\r\n\r\nThe software is released under the BSD License.\r\n\r\nAll rights reserved.\r\n\r\nRedistribution and use in source and binary forms, with or without modification,\r\nare permitted provided that the following conditions are met:\r\n\r\n  * Redistributions of source code must retain the above copyright notice,\r\n    this list of conditions and the following disclaimer.\r\n  * Redistributions in binary form must reproduce the above copyright notice,\r\n    this list of conditions and the following disclaimer in the documentation\r\n    and/or other materials provided with the distribution.\r\n  * Neither the name of dir2cast nor the names of its contributors\r\n    may be used to endorse or promote products derived from this software \r\n    without specific prior written permission.\r\n\r\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\nLIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r\nA PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\r\nCONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r\nEXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\r\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\r\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\r\nLIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\nNEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\r\nSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r\n\r\n\r\nHISTORY\r\n================================================================================\r\n\r\nSee CHANGELOG.txt\r\n","funding_links":["https://patreon.com/benxo","https://www.paypal.me/benxo"],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fben-xo%2Fdir2cast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fben-xo%2Fdir2cast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fben-xo%2Fdir2cast/lists"}