{"id":26878155,"url":"https://github.com/idelsink/yad2ogg","last_synced_at":"2026-05-01T09:32:14.827Z","repository":{"id":42411744,"uuid":"62084690","full_name":"idelsink/yad2ogg","owner":"idelsink","description":"Yet Another dir2ogg. Convert a directory to ogg","archived":false,"fork":false,"pushed_at":"2026-04-06T18:21:25.000Z","size":182,"stargazers_count":2,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-06T20:21:15.818Z","etag":null,"topics":["bash","converter","ogg","ogg-vorbis"],"latest_commit_sha":null,"homepage":"https://github.com/idelsink/yad2ogg","language":"Shell","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/idelsink.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":"2016-06-27T20:09:49.000Z","updated_at":"2021-03-26T20:43:08.000Z","dependencies_parsed_at":"2022-09-20T20:50:59.002Z","dependency_job_id":null,"html_url":"https://github.com/idelsink/yad2ogg","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/idelsink/yad2ogg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fyad2ogg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fyad2ogg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fyad2ogg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fyad2ogg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idelsink","download_url":"https://codeload.github.com/idelsink/yad2ogg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idelsink%2Fyad2ogg/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492163,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["bash","converter","ogg","ogg-vorbis"],"created_at":"2025-03-31T12:19:40.072Z","updated_at":"2026-05-01T09:32:14.809Z","avatar_url":"https://github.com/idelsink.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yad2ogg\n\n**[yad2ogg](https://github.com/idelsink/yad2ogg)** converts all the specified\naudio files into ogg-vorbis format.  \nThis tool will process, copy and synchronize where needed\nfrom the input directory to output directory.  \nBased on the idea of [dir2ogg](http://jak-linux.org/projects/dir2ogg/).  \n\nThe name **yad2ogg** stands for: *Yet Another Directory to `ogg`*.\n\n-   [Features](#features)\n-   [Examples](#examples)\n    *   [Most basic usage](#most-basic-usage)\n    *   [Example 01: test and demonstration](#example-01--test-and-demonstration)\n    *   [Example 02: use case scenario](#example-02--use-case-scenario)\n-   [Suported filetypes](#suported-filetypes)\n-   [Installation](#installation)\n-   [Usage](#usage)\n    *   [Concurrent processing](#concurrent-processing)\n    *   [File copy](#file-copy)\n    *   [Fuzzy synchronization](#fuzzy-synchronization)\n    *   [Conversion parameters](#conversion-parameters)\n        +   [Quality](#quality)\n    *   [Extra converter parameters](#extra-converter-parameters)\n    *   [Metadata](#metadata)\n    *   [Verbosity / logging](#verbosity---logging)\n    *   [User interface](#user-interface)\n        +   [Terminal](#terminal)\n        +   [Graphical](#graphical)\n-   [Why did I make this](#why-did-i-make-this)\n-   [What does this tool need](#what-does-this-tool-need)\n    *   [Permissions](#permissions)\n    *   [Dependencies](#dependencies)\n-   [Warning](#warning)\n    *   [Lossy to lossy](#lossy-to-lossy)\n    *   [Data protection](#data-protection)\n-   [Tests](#tests)\n    *   [For Ubuntu 14 LTS](#for-ubuntu-14-lts)\n    *   [When ffmpeg is not available](#when-ffmpeg-is-not-available)\n    *   [Running test](#running-test)\n-   [Feedback](#feedback)\n-   [License](#license)\n\n## Features\n\n-   Concurrent conversion processes (use all the cores!)\n-   File copy support. Copy over files from the source directory eg. `cover.jpg`\n-   Fuzzy synchronization\n-   Keep or get rid of the metadata\n-   Logging, using [b-log](https://github.com/idelsink/b-log)\n-   Simple user interface using `dialog`\n\n## Examples\n\n### Most basic usage\n\nThe following command will convert all the supported file types\nfrom the input directory and place them in the output directory.\n\n```sh\n./yad2ogg -i input/ -o output/ -a\n# or\n./yad2ogg --input input/ --output output/ --ALL\n```\n\n### Example 01: test and demonstration\n\nTo test the tool and demonstrate it's behavior, take a look at\nthe [test script](./test/test.sh) in the [test](./test/) directory.  \nThis test will do the folowing:\n\n-   generate some sample files\n-   run the tool over these file in terminal mode\n-   run the tool over these file in GUI mode\n\n### Example 02: use case scenario\n\n1.  I have a directory containing all sorts of music of all sorts of files.\n2.  The source directory is called: `music`\n3.  The output directory is called: `music_ogg`\n4.  I want *all* files converted to `q 3`\n5.  I have a quad core CPU\n6.  I want to copy over all the `cover.jpg` files\n7.  I want files that are gone in the source, deleted in the output directory\n8.  I want to use the GUI and log to a file called: `example02.log`\n\n```sh\n#         2.        1.            4.   5.   1.  6.            7. 8. 8.\n./yad2ogg -i music/ -o music_ogg/ -q 3 -j 4 -a -c 'cover.jpg' -z -g -l example02.log\n# or in long options\n#         2.             1.                  4.          5.       1.    6.                     7.     8.    8.\n./yad2ogg --input music/ --output music_ogg/ --quality 3 --jobs 4 --ALL --copyfile 'cover.jpg' --sync --gui --logfile example02.log\n```\n\n## Suported filetypes\n\nThe supported file types at the moment are:\n\n-   wav\n-   flac\n-   alac\n-   mp3\n-   ogg\n-   m4a\n\nBecause in the core `ffmpeg` is used, a lot of file types are supported.\nThe setup for this tool is made in such a way that the converter can easily be\nswitched out and, if necessary switched out entirely on a file type basis.\n\n## Installation\n\nTo install and use this tool,\nmake sure that you've installed the necessary dependencies.\nListed [here](#dependencies).  \nAfter that, clone and `cd` into the directory.\n\n```sh\ngit clone https://github.com/idelsink/yad2ogg.git\ncd yad2ogg\n```\n\nFor starters, the test script can be run with `./test/test.sh`.\n\n## Usage\n\n```text\nUsage: yad2ogg.sh [options]\n\n    -a --ALL              Convert all supported file types\n    -c --copyfile file    Copy files over from original directory to\n                          destination directory eg. '*.cue or *.jpg'.\n    -C --command          The default convert command. (default: ffmpeg)\n                          When ffmpeg is not available, this can be set to avconv\n    -f --filetypes type   File types to convert eg. 'wav flac ...'\n    -f 'alac' --ALAC      convert files of type alac\n    -f 'flac' --FLAC      convert files of type flac\n    -f 'mp3'  --MP3       convert files of type mp3\n    -f 'm4a'  --M4A       convert files of type m4a\n    -f 'ogg'  --OGG       convert files of type ogg\n    -f 'wav'  --WAV       convert files of type wav\n    -g --gui              Use a simple UI instead of logging output to stdout. (dialog)\n    -h --help             Show usage\n    -i --input dir        Input/source directory (defaults to current directory)\n    -j --jobs n           Number of concurrent convert jobs (default is 1)\n    -l --logfile file     Log to a file\n    -m --metadata         Don't keep metadata(tags) from the original files\n    -o --output dir       Destination/output directory (defaults to input directory)\n    -p --parameters param Extra conversion parameters\n    -q --quality n        Quality switch where n is a number (default 5.0)\n    -s --syslog param     Log to syslog \"logger 'param' log-message\"\n                          For example: \"-s '-t my-awsome-tag'\" will result in:\n                          \"logger -t my-awsome-tag log-message\"\n    -v --verbose          Add more verbosity\n    -V --version          Displays the script version\n    -w --overwrite        Overwrite existing files\n    -z --sync             Synchronize the output folder to the input folder.\n                          If a file exists in the output folder but not in the\n                          input folder, it will be removed.\n                          Extensions will be ignored so that a converted file\n                          will 'match' the original file\n    -Z --sync-hidden      Same as --sync but includes hidden files/folders\n```\n\n### Concurrent processing\n\nTo speed up the conversion process, the user can specify a jobs parameter.\nWith this set, multiple instances of a converse process can be started.\nIf for example the user has an dual core processor,\nit would better to use the `-j 2` option instead of the default `-j 1`.\nThis would result in a notable decrease of run time.\n\n### File copy\n\nWhen converting a complete music library,\nit would be nice to transfer all the cover images with them.\nThis can come in handy when the cover image is not embedded in the tags.\nSo the `--copyfile file` is a command that will recursively find and copy over\nfiles matching the `file` part of the command.\nThis means however that if the user has a subdirectory in an album directory,\nlike demonstrated below:\n\n```text\nmusic/\n└── artist\n    ├── album\n    │   ├── art\n    │   │   ├──random picture.jpg\n    │   │   └──cover.jpg\n    │   ├── 01 - first song.flac\n    │   ├── 02 - second song.flac\n    │   └── cover.jpg\n```\n\nAnd the command shown below is used:\n\n```sh\n--copyfile 'cover.jpg'\n```\n\nAll the `cover.jpg` files will be copied over.\nSo the end result may look like this:\n\n```text\noutput/\n└── artist\n    ├── album\n    │   ├── art\n    │   │   └──cover.jpg\n    │   ├── 01 - first song.ogg\n    │   ├── 02 - second song.ogg\n    │   └── cover.jpg\n```\n\nIn the command wildcards can be used.\nTo copy over all the `.jpg` files, use the command:\n\n```sh\n--cover '*.jpg'\n```\n\n### Fuzzy synchronization\n\nWhen using the command demonstrated below, the output directory is checked\nfor 'counterpart' files in the input/source directory.\nThe 'counterpart' file is a file in the input/source directory\nwhich has the same *name* and *path* as the file it checks to in the\noutput directory.\nThe fuzzy part is that the extension will not be checked.\n\n```sh\n-z --sync\n# or\n-Z --sync-hidden\n```\n\nIf this 'counterpart' file cannot be found,\nthe file in the output directory is removed.  \n\n### Conversion parameters\n\n#### Quality\n\nThe quality switch for the converter.\nBy default this is `5.0`\n\n\u003e Most users agree -q 5 achieves transparency,\n\u003e if the source is the original or lossless.  \n\u003e taken from: \u003chttp://wiki.hydrogenaud.io/index.php?title=Recommended_Ogg_Vorbis\u003e\n\n```sh\n-q 5.0\n# or\n--quality 5.0\n```\n\n### Extra converter parameters\n\nTo pass extra parameters to the converter, use the command shown below.\n\n```sh\n-p '-report'\n# or\n--parameters '-report'\n```\n\nThis will result, in case of using `ffmpeg` in:\n\n```sh\nffmpeg -i \"input file\" -acodec libvorbis -aq 5.0 -report \"output file\"\n```\n\n### Metadata\n\nTo remove the metadate(tags) from the output files, use the following.\n\n```sh\n-m\n# or\n--metadata\n```\n\nThis will result in output files without any metadata from the original files.\nThis is not something that will be used by a lot of people,\nbut for completions sake this was put in.\n\n### Verbosity / logging\n\nWith the `-v` or `--verbose` flag, more verbosity can be added to the tool.\nThis can be logged into a file or syslog\nor print out to the terminal via `stdout`.  \nKeep in mind that when using the GUI, logging to `stdout` is disabled.  \nThe logging library used is [b-log](https://github.com/idelsink/b-log)\nfor the people who are interested.\n\n### User interface\n\n#### Terminal\n\nWhen running the tool over the files generated by the [test file](./test/test.sh),\nsee command below, the following output is created.\n\n```sh\n./yad2ogg.sh --input test/input/ --output test/output/ --jobs 2 -q 5.0 --ALL --overwrite --verbose\n```\n\n![UI converting files](./example/ui_converting_files.png \"UI converting files\")\n\n#### Graphical\n\nFor people that want something simple and clear,\na simple 'graphical' user interface is available.\nThis UI uses the tool `dialog`.  \nTo enable this, use the following command:\n\n```sh\n-g\n# or\n--gui\n```\n\nWhen using the GUI, logging via `stdout` is disabled.\nLogging to a file is still possible.\nWhen running the tool over the files generated by the [test file](./test/test.sh),\nsee command below, the following output is created.\n\n```sh\n./yad2ogg.sh --input test/input/ --output test/output/ --jobs 2 -q 5.0 --ALL --overwrite --verbose --gui\n```\n\n![GUI converting files](./example/gui_converting_files.png \"GUI converting files\")\n\n![GUI converting files done](./example/gui_converting_files_done.png \"GUI converting files done\")\n\n## Why did I make this\n\nI didn't found a tool to suit my needs.\nI wanted a tool to convert my music library to `ogg` for my phone etc.\nI tried `dir2ogg` and I found the idea nice, but I didn't liked the fact\nthat it put the converted files in the same directory.\nSo I made this tool.  \nI'm using it for my own library, so I want it to work!\n\n## What does this tool need\n\n### Permissions\n\nFor the input folder, read access is the minimum it needs.\nFor the output folder, it needs write access.\nThis is because it writes the converted files to that directory of course.\n\n### Dependencies\n\nAt this moment it uses the following tools:\n\n-   ffmpeg, for converting the files (or avconv if ffmpeg is not available)\n-   dialog, for the GUI (if not installed, the terminal mode is still available)\n\n## Warning\n\n### Lossy to lossy\n\n\u003e Every time you encode with a lossy encoder, the quality will decrease.\n\u003e There's no way to gain quality back even if you transcode your 128kbps MP3\n\u003e into a 320kbps MP3 (or any other high-quality compression).\n\u003e Transcoding between lossy formats is therefore generally not recommended.\n\u003e The sound quality of the result will always be worse than\n\u003e the (lossy) source file.  \n\u003e Taken from \u003chttp://wiki.hydrogenaud.io/index.php?title=Transcoding\u003e\n\n### Data protection\n\nThis tool was made to modify files.\nThe idea is that the original files will be untouched.  \nOf course, just like with every tool,\nI'm doing my best to live up to this claim.\nFor safety reasons,\nmake sure that this tool only has *read* access to the input directory.\nIf in the event anything where to happen to this tool,\nthe input files will be safe.\n\n## Tests\n\nThis tool was tested on the following systems.\n\n-   *Ubuntu 12 LTS*: ffmpeg was not supported anymore. **Not recommended**\n-   *Ubuntu 14 LTS*: Doesn't work out of the box. **See below**\n-   *Debian 7*: ffmpeg was not supported anymore. **Not recommended**\n-   *Debian 8*: Doesn't work out of the box. **missing ffmpeg, see below**\n-   *Fedora 23*: All works fine after installing the dependencies.\n-   *Fedora 24*: All works fine after installing the dependencies.\n-   *Centos 7*: All works fine after installing the dependencies.\n\n### For Ubuntu 14 LTS\n\nAdd the repository for ffmpeg,\nbut first read [this](https://launchpad.net/~mc3man/+archive/ubuntu/trusty-media).\n\n```sh\nsudo add-apt-repository ppa:mc3man/trusty-media\n```\n\nThen install it with:\n\n```sh\nsudo apt-get update\nsudo apt-get install ffmpeg\n```\n\n### When ffmpeg is not available\n\nIf `ffmpeg` is not available by default and `avconv` is available,\nThe following can be used:\n\n```sh\n-C 'avconv'\n# or\n--command 'avconv'\n```\n\nRemember that the test is based on a special feature of `ffmpeg`.\nSo if you choose the use `avconv`, the test will not work.\nThe workings of the tool itself will be fine.\n\n### Running test\n\nI tested this tool a few times on my own music collection.\nThis collection is about 450GB in mostly `flac`.\n\nThe server I tested this on has a Intel Pentium G3220 dual core processor,\nclocked at 3.00GHz.\nThe library/input sat on a NAS attached to my network\nand mounted on this server.\nThe output was a external hard drive attached to the server.\nI ran the tool once in terminal mode and once in GUI mode.\nFor the terminal I got the following results.\n\n```sh\n./yad2ogg.sh -i /mnt/music_nas/ -o /mnt/dataDrive/music_ogg/ --ALL -j 2 -c 'cover.jpg' -z -l terminal_01.log -q 3.0 -v\n```\n\nThis resulted in the following output:\n\n```text\n[2016-07-10 00:44:43.533][INFO  ][main:109] looking for files with the filetypes: wav flac alac mp3 ogg m4a\n[2016-07-10 00:44:53.582][NOTICE][process_gui:867] Elapsed time: 00:00:10 | 0% | looking for files to convert |\n...\n[2016-07-10 00:46:03.672][NOTICE][process_gui:867] Elapsed time: 00:01:20 | 0% | looking for files to convert |\n[2016-07-10 00:46:05.621][INFO  ][main:110] starting the conversion process(es)\n...\n[2016-07-10 00:46:13.874][NOTICE][process_gui:867] Elapsed time: 00:01:30 | 0% | Converting files | 12625 out of 12630 left to process.\n...\n[2016-07-10 11:54:15.364][NOTICE][main:112] yad2ogg is now done\n[2016-07-10 11:54:22.923][NOTICE][process_gui:897] yad2ogg is now done\n[2016-07-10 11:54:22.933][NOTICE][process_gui:898] Start time: 07/10/2016 00:44:43\n[2016-07-10 11:54:22.943][NOTICE][process_gui:899] End time:   07/10/2016 11:54:22\n[2016-07-10 11:54:22.957][NOTICE][process_gui:900] Time taken: 11:09:39\n```\n\nFor the GUI I got the following results.\n\n```sh\n./yad2ogg.sh -i /mnt/music_nas/ -o /mnt/dataDrive/music_ogg/ --ALL -j 2 -c 'cover.jpg' -z -l gui_01.log -q 3.0 -v --gui\n```\n\nThis resulted in the following output:\n\n```text\n[2016-07-10 12:38:45.832][INFO  ][main:109] looking for files with the filetypes: wav flac alac mp3 ogg m4a\n[2016-07-10 12:38:55.003][NOTICE][process_gui:867] Elapsed time: 00:00:10 | 0% | looking for files to convert |\n...\n[2016-07-10 12:40:45.006][NOTICE][process_gui:867] Elapsed time: 00:02:00 | 0% | looking for files to convert |\n[2016-07-10 12:40:48.955][INFO  ][main:110] starting the conversion process(es)\n...\n[2016-07-10 12:40:55.026][NOTICE][process_gui:867] Elapsed time: 00:02:10 | 0% | Converting files | 12607 out of 12630 left to process.\n...\n[2016-07-11 00:09:16.734][NOTICE][main:112] yad2ogg is now done\n[2016-07-11 00:09:17.009][NOTICE][process_gui:897] yad2ogg is now done\n[2016-07-11 00:09:17.015][NOTICE][process_gui:898] Start time: 07/10/2016 12:38:45\n[2016-07-11 00:09:17.021][NOTICE][process_gui:899] End time:   07/11/2016 00:09:16\n[2016-07-11 00:09:17.026][NOTICE][process_gui:900] Time taken: 11:30:31\n```\n\nSo with this test, I tested if it could handle my 'large' library.\nI also tested the time it took and if the usage of the GUI had any influence.\nFor the results `11:09:39` vs `11:30:31` is not a bad outcome.\nRemember that this is over the network, so your mileage may very.\n\n## Feedback\n\nFeedback is great!  \nIf you want to do anything with this tool, do it.\nClone it, modify it, break it, repair it ... whatever suits your needs.\n\nIf you liked this tool, you know where the 🌟 button is.  \n(that's a Glowing Star Unicode character,\nif it doesn't show correctly \\[U+1F31F\\])\n\n## License\n\n\u003e You can check out the full license [here](./LICENSE)\n\nThis project is licensed under the terms of the **MIT** license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidelsink%2Fyad2ogg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidelsink%2Fyad2ogg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidelsink%2Fyad2ogg/lists"}