{"id":48357180,"url":"https://github.com/thingsiplay/tochd","last_synced_at":"2026-04-05T11:33:56.620Z","repository":{"id":43194683,"uuid":"469417962","full_name":"thingsiplay/tochd","owner":"thingsiplay","description":"Convert game ISO and archives to CD/DVD CHD for emulation on Linux.","archived":false,"fork":false,"pushed_at":"2024-06-08T05:12:06.000Z","size":129,"stargazers_count":62,"open_issues_count":1,"forks_count":9,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-06-08T06:25:36.633Z","etag":null,"topics":["cd","chd","chdman","cli","converter","dvd","emulation","iso","linux","python3","retroarch"],"latest_commit_sha":null,"homepage":"","language":"Python","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/thingsiplay.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"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}},"created_at":"2022-03-13T15:51:35.000Z","updated_at":"2024-06-08T06:25:40.843Z","dependencies_parsed_at":"2024-06-08T06:25:40.341Z","dependency_job_id":"43e25369-ed61-4570-b6bd-4e7fed111327","html_url":"https://github.com/thingsiplay/tochd","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/thingsiplay/tochd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ftochd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ftochd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ftochd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ftochd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thingsiplay","download_url":"https://codeload.github.com/thingsiplay/tochd/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thingsiplay%2Ftochd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31434624,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T08:13:15.228Z","status":"ssl_error","status_checked_at":"2026-04-05T08:13:11.839Z","response_time":75,"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":["cd","chd","chdman","cli","converter","dvd","emulation","iso","linux","python3","retroarch"],"created_at":"2026-04-05T11:33:56.537Z","updated_at":"2026-04-05T11:33:56.607Z","avatar_url":"https://github.com/thingsiplay.png","language":"Python","readme":"# tochd\n\nConvert game ISO and archives to CD/DVD CHD for emulation.\n\n- Author: Tuncay D.\n- Website: [tochd-converter](https://thingsiplay.game.blog/tochd-converter)\n- Source: [Github](https://github.com/thingsiplay/tochd)\n- Releases: [Github Releases](https://github.com/thingsiplay/tochd/releases)\n- Issue Tracker: [Github Issues](https://github.com/thingsiplay/tochd/issues)\n- Forum: [Github Discussions](https://github.com/thingsiplay/tochd/discussions)\n- Update Notes: [CHANGES](CHANGES.md)\n- License: [MIT License](LICENSE)\n\n## What is this program for and what are CHD files?\n\nAutomation script written in Python as a frontend to `7z` and `chdman` for\nconverting CD like formats into CD or DVD CHD.\n\nWhen you are playing CD based games on RetroArch or possibly on any emulator\nwhich supports CHD files, then you might want to convert your ISO and CUE+BIN\nor GDI files into the CHD format. It has the advantage good compression and\nproduces a single file for each CD. This saves a lot of space and makes\norganization easier.\n\nTo achieve this, the separate program `chdman` from the MAME tools is invoked,\nwhich introduced the CHD format in the first place. Often you need to extract\nthose various CD formats from archives such as .7z or .zip files too. The\nprogram `7z` is used to extract those files, before handing them over for\nconversion.\n\n## Requirements\n\nThe script was originally written for Python 3.10 for Linux. No other Python\nmodule is required. The following external applications are required to run\nthe script:\n\n```bash\n7z\nchdman\n```\n\nOn my Archlinux-based distribution, the programs are available in the\npackages: `p7zip mame-tools`\n\n### Installation\n\n#### Manual installation\n\nNo special installation setup is required, other than the above base\nrequirements. Give `tochd.py` the executable bit, rename the script to exclude\nfile extension and put it into a directory found in the systems `$PATH` . To\nautomate these steps, an installation script is provided, but not required. If\nyou cannot install from AUR, then use following commands to install newest\nversion manually:\n\n```bash\ngit clone https://github.com/thingsiplay/tochd\ncd tochd\nbash suggested_install.sh\ntochd --help\n```\n\n#### AUR: Install with package manager on Archlinux\n\nThe package is available in the Arch User Repository:\n[AUR Package Details](https://aur.archlinux.org/packages/tochd)\n\n- `yay -S tochd`\n- `pamac install tochd`\n\n## Usage\n\n```bash\nusage: tochd [OPTIONS] [FILE ...]\n\nusage: tochd [-h] [--version]\n             [--list-examples] [--list-formats] [--list-programs]\n             [--7z CMD] [--chdman CMD]\n             [-d DIR] [--temp-dir TEMP_DIR]\n             [-R] [-p] [-t NUM] [-c NUM] [-m DISC] [-H BYTES]\n             [-q] [-n] [-s] [-E] [-X]\n             [-] [file ...]\n```\n\nThis is a commandline application without a graphical interface. The most basic\noperation is to give it a filename, a list of files or directories to work on.\nThe default behaviour is to convert .iso and .cue+bin and .gdi files to .chd\nfiles with same basename in their original folders. Archives such as .7z and\n.zip are extracted and searched for files to convert. The progress information\nfrom `7z` and `chdman` are printed to stdout.\n\n### How to use the commandline options\n\nOptions start with a dash and everything else is a file or folder. In example\n`tochd .` will search current working directory for files to convert. Use\noption `-X` like in `tochd -X .` to list files without processing them. The\noption `-d DIR` specifies a directory to output all created .chd files into. In\nexample `tochd -q -d ~/new_chds ~/Downloads` will process all files it can find\nin the \"Downloads\" directory and save the created .chd files in a folder named\n\"new_chds\" under users home. The `-q` option means \"quiet\" and will hide\nprogress information from `7z` and `chdman`, but still output current job\ninformation from this script itself.\n\nYou can also specify filenames directly or use shell globbing `*` in example to\ngive a list of files over. Usually that is not a problem, but if any filename\nstarts with a dash `-`, then the filename would be interpreted as an option. To\nprevent that, you can use double dash option `--` to indicate that anything\nfollowing the double dash is a filename and not an option. In example\n`tochd -q -- -name_starting_with_dash.iso` would recognize `-q` as an option\nand `-name_starting_with_dash.iso` as a filename.\n\nUse `tochd --help` to list all options and their brief description.\n\n### Examples\n\n```bash\ntochd --help\ntochd -q .\ntochd --quiet --stats --names ~/Downloads\ntochd -p -- *.7z\ntochd -m dvd -- psp/\n```\n\n### Example output\n\nThe following is an output from some files I used to test the program. The\nfailing jobs are supposed to fail, for one or another reason. \"Completed\" jobs\nare files that are successfully created. \"Failed\" jobs point to the path that\nwould have been created.\n\n```bash\n$ tochd -q cue iso gdi unsupported .\nJob 1     Started:    /home/tuncay/Downloads/cue/Vampire Savior (English v1.0).7z\nJob 1   Completed:    /home/tuncay/Downloads/cue/Vampire Savior (English v1.0).chd\nJob 2     Started:    /home/tuncay/Downloads/cue/3 x 3 Eyes - Sanjiyan Hensei (ACD, SCD)(JPN).zip\nJob 2      Failed:    /home/tuncay/Downloads/cue/3 x 3 Eyes - Sanjiyan Hensei (ACD, SCD)(JPN).chd\nJob 3     Started:    /home/tuncay/Downloads/cue/Simpsons Wrestling, The (USA).7z\nJob 3   Completed:    /home/tuncay/Downloads/cue/Simpsons Wrestling, The (USA).chd\nJob 4     Started:    /home/tuncay/Downloads/cue/Shining Wisdom (USA) (DW0355).rar\nJob 4   Completed:    /home/tuncay/Downloads/cue/Shining Wisdom (USA) (DW0355).chd\nJob 5     Started:    /home/tuncay/Downloads/iso/Parodius_Portable_JPN_PSP-Caravan.iso\nJob 5   Completed:    /home/tuncay/Downloads/iso/Parodius_Portable_JPN_PSP-Caravan.chd\nJob 6     Started:    /home/tuncay/Downloads/iso/Bust_A_Move_Deluxe_USA_PSP-pSyPSP.iso\nJob 6   Completed:    /home/tuncay/Downloads/iso/Bust_A_Move_Deluxe_USA_PSP-pSyPSP.chd\nJob 7     Started:    /home/tuncay/Downloads/gdi/[GDI] Metal Slug 6.7z\nJob 7   Completed:    /home/tuncay/Downloads/gdi/[GDI] Metal Slug 6.chd\nJob 8     Started:    /home/tuncay/Downloads/gdi/[GDI] Virtua Striker 2 (US).7z\nJob 8   Completed:    /home/tuncay/Downloads/gdi/[GDI] Virtua Striker 2 (US).chd\nJob 9     Started:    /home/tuncay/Downloads/gdi/GigaWing 2.zip\nJob 9   Completed:    /home/tuncay/Downloads/gdi/GigaWing 2.chd\nJob 10    Started:    /home/tuncay/Downloads/unsupported/Dragon_Ball_Z_Shin_Budokai_USA_PSP-DMU.rar\nJob 10     Failed:    /home/tuncay/Downloads/unsupported/Dragon_Ball_Z_Shin_Budokai_USA_PSP-DMU.chd\nJob 11    Started:    /home/tuncay/Downloads/unsupported/ActRaiser 2 (USA) (MSU1) [Hack by Conn \u0026 Kurrono v4].7z\nJob 11     Failed:    /home/tuncay/Downloads/unsupported/ActRaiser 2 (USA) (MSU1) [Hack by Conn \u0026 Kurrono v4].chd\nJob 12    Started:    /home/tuncay/Downloads/missingfiles.gdi\nJob 12     Failed:    /home/tuncay/Downloads/missingfiles.chd\n```\n\nPSP games should be using the `dvd` format option.\n\n```bash\n$ tochd -qs -m dvd Tactics*.iso\nFiles in queue: 1\n\nJob 1     Started:      /home/tuncay/Desktop/Tactics Ogre Let Us Cling Together (USA).iso\nJob 1   Completed:      /home/tuncay/Desktop/Tactics Ogre Let Us Cling Together (USA).chd\n\nStarted: 1\nSkipped: 0\nFailed: 0\nCompleted: 1\nElapsed time: 0:00:17\n```\n\n### Cancel jobs\n\nAt default `Ctrl+c` in the terminal will abort current job and start next one.\nTemporary folders and files are removed automatically, but it can't hurt to\ncheck manually for confirmation. When option `-E` is in effect and `Ctrl+c` is\nused in the terminal, then script will stop ALL jobs and exit, while removing\nthe temporary folders as well. (Unlike before, where option `-E` caused to\nleave temporary files.)\n\n### Multiprocessing support\n\nAt default all files are processed sequential, only one at a time. Use option\n`-p` (short for `--parallel`) to activate multithreading with 2 threads. This\nenables the processing of multiple jobs at the same time. Set number of max\nthreads with option `-t` (short for `--threads`).\n\n#### Drawbacks with multiprocessing / parallel option\n\n- live progress bars and stderror messages of invoked processes from `7z` and\n  `chdman` cannot be provided anymore, as they would have been overlapping on\n  the terminal, but stdout messages such as statistics are still output\n- user input won't be allowed and is automated as much as possible, because\n  overlapping messages could lead to stuck on waiting for input and losing the\n  context to what file it belongs to are potential problems\n\n## Additional notes, workarounds and quirks\n\n### Forcefully terminating script could leave unfinished files\n\n- If you forcefully terminate the entire script while working, then unfinished\n  files and especially temporary folders cannot be removed anymore. These files\n  and folders can take up huge amount of space! Hidden subfolders with a\n  starting dot are created in the same directory as the input files, when no\n  path is given with option `--temp-dir` . Make sure these files are deleted.\n  The regular `Ctrl+c` in the terminal to abort current job is a controlled\n  termination, _not forced_ one (even with option `-E` in effect).\n\n### Files and archives that need special preparation before converting\n\n- Some archives contain multiple folders, each with ISO files of same name. These\n  are usually intended to copy and overwrite files in a main folder as a meaning\n  of patching. However, the script has no understanding and knowledge about this\n  and would try to convert each .iso file on it's own. As a workaround all .iso\n  files in the archive are ignored when a sheet type such as CUE or GDI files are\n  found.\n- There are cases where the audio files can be a different format than what the\n  .cue (or .gdi) files expect. In example there are cases where the audio files\n  are in .ape format and need to be converted to .wav first. If you are unsure\n  about this, then look into any provided readme file or the .cue sheet itself.\n  Then convert them before handing it over to .chd conversion.\n\n### Automatic renaming output files based on archive filename\n\n- Sometimes .cue or .iso files found in an archive have a different name than the\n  archive filename itself. Sometimes one of them lack important information and\n  you need to determine which of them is \"correct\". In example translations could\n  have important information encoded in the filename of the .cue, which would be\n  lost, as the .CHD file is automatically renamed to match the .zip or .7z\n  archive in example. Use in such situations option `-R` (short for\n  `--no-rename`) to prevent that and leave the original files name found inside\n  the archive.\n\n### Use DVD format for certain emulators instead\n\n- Some emulators don't work well with standard CD format, because their\n  disc format is not CD. Especially the developers of PPSSPP emulator\n  recommends converting with `chdman createdvd` instead `chdman createcd`,\n  which are the internally used commands of `tochd`. `tochd` will use\n  `-m cd` at default, so make sure to change this option to `-m dvd` for PSP\n  games. You can also use `-m auto`, to determine the format based on filesize\n  with a 750 MB threshold. But be careful, in my own testings DVD format on\n  PS2 games did not work to play with PCSX2 core in RetroArch.\n\n### Buggy GDI files causes to not process any other file too\n\n- There is a bug with .gdi files, but normally this shouldn't be a problem.\n  When a .gdi file contains lines that points to non existing files or are\n  corrupt otherwise, then the program might stop processing any file. In such\n  situation, exclude these .gdi and its associated .gdi files, so it does not\n  get in the way.\n\n### Stats counting with parallel option does not work\n\n- At the moment counting a Job finish state (such as \"Completed\" or \"Skipped\")\n  is thread unsafe. This is an oversight and rookie mistake by me. Therefore\n  until a solution is found, the program will simply exclude the counter such\n  as \"Skipped: 0\" and others from final result, when `-p` and `-s` options are\n  combined.\n\n## Contributors\n\nWhile this project is mainly written and tested by myself, there are other\nmajor contributors who deserve a special recognition. Thank you to:\n\n- [AlexanderRavenheart](https://github.com/AlexanderRavenheart)\n\nAlso visit:\n[Contributors](https://github.com/thingsiplay/tochd/graphs/contributors)\nfor a more complete list and stats.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ftochd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthingsiplay%2Ftochd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthingsiplay%2Ftochd/lists"}