I have a large collection of FLAC losslessly encoded music (CD and Hi-Res) on my home server, this is great when listening at home, but I want to listen on my phone offline and when traveling, I use Foobar2000 for this purpose.
I have a 256GB MicroSD card in my phone, so I looked at ways to convert the FLAC files to OPUS. Foobar2000 has a built-in convert method, but if changes are made to the FLAC’s then work is involved to get them back in sync.
FLACtoOPUS
FLACtoOPUS converts a “FLAC” lossless files folder to an “OPUS” lossy files folder by converting and syncing the files even though they have a different extension. To save space the artwork can be removed from the OPUS files and, if available, the folder.jpg is copied and converted to a max of 400×400. The top image is one folder from my collection, the bottom is what it looks like after conversion and syncing.
Download
1.3.16 (29 Jun 2021
- re-added opusenc.exe to confirm it is version 1.3.1 rather than 1.3 (minor changes).
- added a trial for 1 day and max of 50 tracks.
1.3.11 (08 Jun 2021)
- Added to Microsoft Store.
1.2 (22 Aug 2020)
- Advanced Setting: if folder.jpg (default) was saved, it was saved with ‘(default)’ text included, this caused issues.
- Speeded up the file count, the introduction of additional Album Art filenames slowed it down considerably.
1.1 (17 Aug 2020)
- Advanced option to include other album art along with folder.jpg. folder.png, cover.jpg and cover.png can now be synced. All jpg/png files are reduced to 400×400.
Feature added for comments user IMPERIAL.
1.0 (26 Jul 2020)
- First official release
0.97.3 (14 Dec 2019)
- File count for the progress indicator is shown once known rather than waiting for result.
- Cancel button now indicates it is cancelling when button is pressed.
0.97.2
- Fixed – Bitrate setting not saving correctly due to change in 0.97, defaults to 128 on restart if previously saved value from dropdown box.
- Added feature to sync using FLAC and OPUS modified dates, if the FLAC is changed then the OPUS file will be re-encoded (WARNING: be careful if you are already syncing a large collection, all OPUS files will be re-encoded on the first sync with this option on).
0.97.1
- Changed Codec dropdown (was fixed to .opus) to File Extension, can now select .opus or .ogg (useful for old versions of Android)
0.97
- Added ability to type bitrate or select common values from the dropdown list.
- Added a Advanced Encoding Settings textbox (EXPERTS ONLY)
0.96
- Add 416, 448, 480 and 512 to max out the bitrate for OPUS
- Fixed bug when a long-running OPUS encode or Cleanup would still show encodes on other cores as in progress (ie not reset to CPUX – Idle) while waiting to finish.
0.95
- Added checkbox to create a OPUS_{Bitrate} subfolder, useful if you want to test different bitrates.
0.94
- File Count is Quicker
- Cleanup happens during sync rather than before
- UI Responsiveness improvements
- Settings are now saved correctly and updated on version change.
0.93
- Added count of files after cleanup
- New ko-fi.com donate button.
0.92
- Added 244, 288 and 352 in bitrates.
0.91
- Released as beta.
** If any issues are found, please report in the comments **
Inside the zip there are 2 files, the FLACtoOPUS.exe and opusenc.exe this is version 1.3 from opustools.
- Run the FLACtoOPUS.exe program.
- Select the source folder of FLAC files.
- Select the destination folder of where you want to put the Opus file, make sure the folder is empty, and not with the source folder.
- Select the bitrate required, transparency is achieved at 144 for most people so 160 is a good choice. If you have good quality folder.jpg artwork tick remove images (this stops the program embedding the artwork in the Opus files, which uses a lot more space on a large collection).
- Check the ‘Create Subfolder for bitrate’ if you want to maintain multiple folders with different bitrates.
- Select how many processor cores you want to use for conversion, if you are not working on the machine this can be set to the maximum available.
- Press the convert button.
Notes:
- Files that are not to be synced in the destination folder will be deleted, it is best to select an empty folder.
- Hidden folders and folders beginning with (.) ie .nomedia or .sync will not be deleted from the destination during cleanup.
- Folders created with the Create Subfolder for bitrate option, starting with OPUS_, are not deleted from the destination during cleanup.
- If you press stop, files currently being processed will be completed.
- If the modified date of the source FLAC file is greater than the modified date of the OPUS file then the file is deleted and re-synced.
- There is no warning if the destination path will be greater than the Windows 260 limit, after you do your first sync in Powershell run the following command, this will list all files > 260, I will add a check in the future to flag up this issue.
In Powershell
cmd /c dir /s /b |? {$_.length -gt 260}
Playback
Foobar2000 is a good choice for Opus playback, both on desktop and mobile, I am using Android to play the Opus files.
Getting the OPUS files on your phone
SDCard
You could insert your SDCard into your computer and sync direct to it, this is probably the quickest way.
Resilio Sync
Resilio Sync can be used to sync the converted files folder to your phone, I am currently drafting a guide on how to set this up, this is the method I use as Resilio Sync runs in the background so it runs until finished and does not stop when phone sleeps.
The guide is delayed until a bug with the Android version is fixed, this stops any folders or file with a % (percent symbol) from being synced. In my collection, this affects 2 albums (out of 2723) because the % is in the folder, and 2 tracks in an album as it is only in the filename.
Ginger Wildheart100%
Will Young85% Proof
Cashier No9To The Death Of Fun10 – Cashier No9 – 6%.flac
The Beautiful SouthGaze9 – The Beautiful South – 101% Man.flac
Hi there,
I just found you FLACtoOPUS tool and would like to say thank you for this! Exactly the tool I needed.
PS. If I could make a tiny suggestion, it would be nice to be able to put custom command line options as an option, so I could set more specific settings like bitrates inbetween, encoding complexity and framesize etcetera. That would make it the absolute perfect tool!
Thanks!
Hi Ferry, the suggestions have been added in 0.97 beta, glad you like the program and find it useful.
Wonderful! Thank you so much! I will take a look a.s.a.p.
Hi Ferry
Please could you download 0.97.2, this fixes an issue selecting a bitrate from the dropdown list, on restarting the program it is reset back to 128, this started in 0.97 when i added the ability to type in a value. Other beta features have been added in 0.97.1 and 0.97.2, see the change log on the post.
Hello !
It’s a wonderful piece of code you wrote here, thank you.
I would love the possibility to change the output extensions from .opus to .ogg, that’s because Android will not import .opus files into the library for all media player depending on MediaScanner, but if you rename it to .ogg it just works.
For now I have to rename all my files with another software aha.
Thank you!
@NavaVal Thanks for the feedback and I am glad you like the software.
I have updated to 0.97.1, you can now select .opus or .ogg in the File Extension dropdown box, I added quickly because if you forget to change the extensions back before syncing later the software would see the .ogg files as extra files and delete them and you would have to start again. Hope this change helps
I’ve never seen a dev updating his app that fast after a feedback, nice one!
Thank you so much! I will try ASAP. In the meantime enjoy your coffee 🙂
Hi again, I did not have a lot of spare time the last week. Had a quick check and all seems to be fine. Thank you!
Pleased the changes seem fine, thank you the coffee.
Hi, thanks for this. Ive used it and it works great. My suggestion though would be to copy album artwork titled cover.jpg or .png filles. Thanks.
Thank you for your comment, glad you like the software.
The music programs I use Kodi, Foobar and Groove all look for folder.jpg (dont know about folder.png)
I think that it is important that images are reduced in size when copied, scanned jpgs in my collection can be up to 5mb and pngs would be larger, I could add a dropdown to select 1 image folder.jpg (default)/folder.png/cover.jpg/cover.png to be converted and copied to the opus folder, is that what you need?
This feature has been added in version 1.1, please let me know if the change is ok.