Jump to content

Batch Convert To FLAC (DTS, etc) BUGFIX


TheSaint
 Share

Recommended Posts

This is my latest project, which I have been working on for a few days now, so this is kind of hot off the press. However, in reality, I have been working on some element of this for years. Some of you may remember a huge project of mine (Audio DVD Producer + Chat Blog Screenshots) that I worked on a good while back? Well, this one is very much related, and very much simpler in scope. That other project by the way, has been basically stalled for a good length of time now. Not because I never finished it, but because the end result was not as great as I hoped. I may share the files for it one day. I may even start working on it again one day, though this latest project kind of makes much of it redundant for my aims.

Anyway, this project. I have a good bunch of DTS-CDs, from same or other sources (i.e. DVD). You can read more about what a DTS-CD is here, but the short of it, is that you cannot play them on a normal CD player, as you will just get noise. Many if not most DVD or Blu-ray players can play the embedded DTS data in the otherwise empty CD tracks. Further to that, a DTS-CD is essentially a compressed PCM or WAV file for all intents and purposes ... to keep things simple. So a 6 Channel (5.1) track takes up roughly the same amount of bytes as a normal stereo CD track ... so 6 channels for the price of 2.

Up until recently, the best device for me to play the DTS-CDs on, as CDs, is my PS3. It plays them faithfully (reader issues aside) and has nice visuals. It is also my most convenient DVD/Blu-ray player, so a heap of hassle to play on one of my regular players, and not much success with the Xbox 360 ... at least with burnt backup copies.

DTS-CDs are also kind of old school, and been superseded by the more superior lossless DVD Audio, Super CD and now Blu-ray Audio discs. That kind of makes them rare now and essentially irreplaceable, so being a wise man, I store them safely and only play backup discs.

Playing discs though is kind of limited, and to be honest a pain, as my PS3 spits the dummy on some days, with the reader not being what its should be ... or perhaps poorly calibrated. So for a long time now, I have been wanting to use the backup files instead. Unfortunately, while I can play them fine on my PC (foobar2000 + DTS plugin), that is not where I want to listen to them. Until recently, neither my NeoTV 550 hardware player or my Laser one, have been very good at playing the files, and the PS3 even worse with its lack of file support. Back when I first investigated all this, and tried a bunch of things, and didn't yet have the Laser (4k Android) player, I did attempt to go the FLAC route. However, I was left unsatisfied, as my NeoTV did not support CUE files and M3U playlist files are a bit of a hassle ... and no help, when I have a single album file with cue index points for each track ... which many of my DTS-CD rips were ... especially for albums that have one track running into the next ... live albums too. The other issues for me with FLAC, were the artwork (album cover) and TAGS (details for each track - Title, Artist, Album, Year, etc), which I could not get to work.

So, moving forward to recently. I played a DTS-CD on the PS3 the other day, and if there is one things I hate, it is a playing issue when I am in the midst of enjoying a nice piece of music. The PS3 is not very forgiving and just aborts play. I am not very forgiving of the PS3, so decided to investigate FLACs again. Now perhaps something has changed, since I last tried ... or I just wasn't on the ball. Anyway, to cut a long story a bit shorter, I loaded a DTS WAV file in foobar2000, and ripped it to a FLAC file. I then tried that file on my NeoTV 550 hardware player, and it played fine ... and some tags were visible, which surprised me. So I thought it was worth looking into further. I also tried the file on my Laser hardware player, with the Kodi (XBMC) Android app, but alas, while the Tags and Artwork worked well, all I got was noise ... and same for every other app I tried.

Now don't ask me why I thought to try FLAC on its own, using the FLAC Frontend program initially, but I did ... and it recognized the tracks as 5.1. With foobar2000, I'd selected the decoder for DTS files when converting to FLAC, as I thought it was required. I hadn't at that stage used flac.exe by itself, but I decided to investigate the TAG command-line options and also noticed you could embed a picture, which I was keen as mustard to try. So I set up a BAT file and gave it a whirl.

Now the results on my NeoTV 550 hardware player, were brilliant - Sound, Tags and Artwork were as I wanted. I decided to update Kodi at that point. Then, I tried my Laser hardware player again, but still no joy. I then did some online research and read about how to get it all working. Alas, I had mixed results. The foobar2000 ripped file worked, but the one I did with the BAT file did not. Not being keen to rip everything via foobar2000 menus, and wanting to code a quicker batch solution myself, I first attempted to see what command-line options I could use for foobar. That was a dismal failure, so I then revisited some of the programs I had used way back when with DTS WAV based files, and eventually discovered that 'valdec.exe' from the AC3Filter tools collection, gave the compatibility I needed. So I put my WAV or DTS files through that program first, then converted them to FLAC.

Now the files played with DTS surround sound, on both my hardware players. They also play gapless, so I split album length files into separate track files, which avoids the CUE and M3U issues. That said, a joined M3U file for something like a (separate folders) double album, plays great with Kodi. :)

So of course, I just had to whip up a program ... with drag and drop of course. ;)

And that program has steadily been growing & changing, and is where I want it now, at v1.5.

Quote

Batch Convert To FLAC v2.2.zip

(download includes source)

OLDER DOWNLOADS

Spoiler

Batch Convert To FLAC v1.5.zip  (26 downloads)

Batch Convert To FLAC v1.6.zip  (24 downloads)

Batch Convert To FLAC v1.7.zip  BUGFIXES  (35 downloads)

Batch Convert To FLAC v1.8.zip  (29 downloads)

Batch Convert To FLAC v1.9.zip  465.1 kB  (232 downloads)

Batch Convert To FLAC v2.0.zip  474.66 kB  (275 downloads)

 

Screenshots further below.

REQUIRED COMPONENTS
Most programs (if not all) can be obtained from VideoHelp, but here are some alternative sites to source them. The 'flac.exe' program is definitely required, and 'valdec.exe' if you want maximum compatibility support for a wider range of players.

[flac.exe]
https://xiph.org/flac/
https://xiph.org/flac/download.html
https://ftp.osuosl.org/pub/xiph/releases/flac/
https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.3.1-win.zip

[valdec.exe] [found in the AC3Filter tools collection]
http://www.ac3filter.net/wiki/AC3Filter_tools (Info only, downloads no longer work)
https://web.archive.org/web/*/http://www.ac3filter.net/wiki/AC3Filter_tools
https://web.archive.org/web/20130623004920/http://www.ac3filter.net:80/wiki/Download_AC3Filter_tools

If The Wayback Machine options fail, then go to VideoHelp (maybe go there anyway).
https://www.videohelp.com/software/AC3-Filter/old-versions

NOTE - The AC3Filter site has loads of information, which could help you enable other players aside from those below.

RECOMMENDED PLAYERS
PC = foobar2000 + DTS plugin component.
Android Device = Kodi (XBMC) app with DTS etc enabled with passthrough.

NOTE - foobar2000 with plugin, will play even those not processed with 'valdec.exe'. My 'NeoTV 550' hardware player does the same. My 'Laser' (Android device) with Kodi just emits noise with the FLAC files, if not processed with 'valdec.exe'.

RECOMMENDED DTS-CD RIPPERS
http://www.imgburn.com/
http://www.exactaudiocopy.de/

OTHER LINKS
This one of mine tells you a lot more about DTS-CDs, including ripping or burning.
https://forum.doom9.org/showthread.php?t=172484

SCREENSHOTS

BatchFlac_main_1-9.png.3b84ec57ad63facca2922965910cdf76.png  BatchFlac_opts_1-9.png.9e0ac516ccb7444031e1d0b6553ac86e.png 

BatchFlac_Taged_2-0.png.68cddb8f0e2d5174fe2fe743010b9994.png

Quote

NOTE - While no modifications are saved to original source CUE files, users can modify the input fields, and that text will be used during converting (i.e COMMENTS).

P.S. I made a brilliant discovery today. Whereas in the past, with PS3 etc, I could not listen to my DTS-CDs via my Surround Sound Headphones, I now can with these files. So it is well worth playing those CDs as files, just for that benefit alone. Overall though, I have future proofed my collection.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

OLDER SCREENSHOTS

Spoiler

BatchFlac_main.png.8c4d9d1c250fd0e6dbd8d1bde5dbd939.png   BatchFlac_opts.png.d25c27027acd2375e8040f1b27dbc4eb.png

BatchFlac_Taged_1-9.png.ae95e737bfcad466712fb1f2c04f5570.png

UPDATE HISTORY

(v1.5) Added an option to Query use of 'valdec.exe' if source file not reported as DTS. I have improved JOINER options for CUE files again, to take into account non program created CUE files, where non standard fields are stripped out from second CUE file now (electing for simple processing over complex).

(v1.4) Added an INFO button to see or get the information returned by 'valdec.exe' for the last or current source file. JOINER options improved, to suit the new RENAME multi disc album folder option, plus differing Comments are appended. Changed the method for message displayed in List dropfield, which now also mentions an option, of drag & drop of a multi disc album folder, for renaming. NOTE - To get the best out of the JOINER option, you should use the folder renaming option first.

(v1.3) Added a 'Source' option that can be de-selected, so that 'valdec.exe' creates the temporary WAV file in the destination folder, instead of source folder. BUGFIX for silly method of removals in CUE file lines. Added a JOINER button and process for CUE &/or M3U files. NOTE - Joining can be great, when you have just processed a multiple disc album, where each disc has its own folder, but you want a CUE file or M3U file with all tracks. ADVICE - You will probably need to rename each multiple disc album folder first, before using the JOINER process. Typically you create a single album name folder first, inside the ARTIST folder, and relocate the other folders inside it, renaming them something like 'Disc 1', 'Disc 2', etc as you go. Then click the JOINER button and follow prompts.

(v1.2) Added valdec.exe from 'AC3Filter tools' to improve broader DTS support on various hardware players and apps. Added 'Usage Advice' on first program use, with button access. Lots of improvements.

(v1.1) Improved the 'Removal' code. Changed the 'FLAC to WAV' checkbox to a dropdown combo with both 'Encode' and 'Decode' options, and adjusted program code & info to be compliant.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

FOLDER RENAMING OPTION (Drag & Drop)

The program supports the renaming of specifically named multi disc album folders.
This saves the user from having to manually do it all, especially for when desiring to join the existing CUE and M3U files within.

Here are some examples.

'CD2' can be 'CD 2', with the number being any number.
'Disc 1' can be 'Disc1' and any number.

SOURCE FOLDER = D:\MUSIC\ARTIST\ALBUM - CD2
will be renamed to
NEW FOLDER = D:\MUSIC\ARTIST\ALBUM\CD2

SOURCE FOLDER = D:\MUSIC\ARTIST\ALBUM - Disc 1
will be renamed to
NEW FOLDER = D:\MUSIC\ARTIST\ALBUM\Disc 1

Text can exist after 'CD' or 'Disc'.
First example is very specific, as (DTS) is looked for and becomes part of the ALBUM name.

SOURCE FOLDER = D:\MUSIC\ARTIST\ALBUM - CD2 (DTS)
will be renamed to
NEW FOLDER = D:\MUSIC\ARTIST\ALBUM (DTS)\CD2

These are not specific.

SOURCE FOLDER = D:\MUSIC\ARTIST\ALBUM - CD2 (Best Of)
will be renamed to
NEW FOLDER = D:\MUSIC\ARTIST\ALBUM\CD2 (Best Of)

SOURCE FOLDER = D:\MUSIC\ARTIST\ALBUM - CD2 (Rarities)
will be renamed to
NEW FOLDER = D:\MUSIC\ARTIST\ALBUM\CD2 (Rarities)

When they are renamed by the program, all content is moved to the new folder. Any existing JPG files in the root of SOURCE FOLDER, are also copied to root of the new ALBUM folder.

 

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v1.6. See first post.

No sooner than I uploaded the previous version, then I realized I forgot and overlooked a few things.

(v1.6) Added a skip option for overwriting or adding to CUE or M3U files. Added a query prompt for temporary WAV file deletion, after processing last listed track individually, when source is a single album file. Improved status updating. Checking free drive space between processing tracks, is now fully implemented, including a timed prompt to abort further processing. Bugfixes (disabling etc).

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v1.7. See first post.

(v1.7) Added support to use 'wavconv.exe' from the 'AC3Filter tools' collection, as an option to create the temporary WAV file, if 'valdec.exe' fails. Improved some message dialogs to make things clearer, give other options, etc. Bugfixes to enable an option, plus use track number and title (not Artist - Album) when decoding instead of encoding, plus horizontal scroll now enabled in selection Input field. An incremented CUE or M3U file name can now be created, if wanting to skip an existing one. Bugfix for the JOINER process, where Track Artist and Track Title were being skipped in second CUE file.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v1.8. See first post.

(v1.8)
Added a reduction (half) for drive free space, if destination drive is different to source drive, and use source for temporary WAV file is enabled.
NOTE - Default limit is less than 2 Gb, so new option makes it less than 1 Gb.
Selected entry file size is now shown.
Other minor improvements.
Bugfix for find image file with LAST button.
Disc number now automatically removed (if criteria met) from new CUE/M3U file name in JOINER process.
VIEW button added for source CUE file, plus conversion now exits if Index error detected, as such an error impacts current and following track.
ADVICE - With such an error, which could be as simple as a missing leading zero in the Index for the listed track, you can correct the track index (using Notepad) and then reload the CUE file (LAST button), and then use the 'From Selected' option to start from a specific track/entry, to continue on from the last track that was successfully converted (or just remove successful tracks from list).

Should have mentioned previously.

Quote

NOTE - While no modifications are saved to original source CUE files, users can modify the input fields, and that text will be used during converting (i.e COMMENTS).

 

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v1.9. See first post. New screenshots, including the Tag Editor.

(v1.9)
Added a FLAC TAG Editor window, accessed from a new button on the Options window.
To accommodate the FLAC TAG Editor button, the CUE FILE Example buttons have been removed and a Combo dropdown can now be used instead.
The 'metaflac.exe' file, which usually accompanies 'flac.exe', needs to be available to use the new Editor feature.
Relocated & resized some other buttons on the Options window. EXIT button now in a better location.

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v2.0. See first post. Updated screenshot of Editor.

(v2.0)
BUGFIX for file list array not always sorted.
TAG fields can now be locked in the Editor window (click the label), and generally differences will be queried, except in the case of Track Title or Number, where a specific action occurs ('(live)' added or the number incremented).
Buttons for UPPER or Title case have been added. Includes some auto text elements.
Added options to the Editor, to View, Add, Export or Remove artwork from a FLAC file (Front, Back, Leaflet, Label, etc).

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Updated to v2.2. See first post. IMPORTANT BUGFIX.

(v2.2)
BUGFIX for mixup with TRACK ARTIST, ALBUM ARTIST and ALBUMARTIST tag definitions.
Those first two TAG names are wrong. ARTIST and ALBUMARTIST are the only two correct ones.
NOTE - Updating previous processed FLAC files with the program, should correct previous incorrect values set by the program.

APOLOGY - MP3Tag showed me the error of my ways, but I still don't know how I made those two errors. Something led me astray in any case, so my apology to all those affected. I have over a thousand FLAC files to correct now for myself. IMPORTANT - This really only affects  in a significant way, albums where the track artist is different to the album artist. That said, you may wish to remove any mislabeled tags anyway.

(v2.1)
Added a 'Get TAG From CUE' button and ability to the FLAC TAG Editor window.
Browse for Artwork now has a CTRL option for selecting current FLAC folder as root.

Edited by TheSaint

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.

Spoiler

What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)

userbar.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...