Skip to main content

Notice

If you are using a Hotmail or Outlook email address, please change it now, as Microsoft is rejecting all email from our service outright.
Topic: Batch-create copy of existing directory, converting lossless files only (Read 1121 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Batch-create copy of existing directory, converting lossless files only

Hi, I am wondering how to set up Converter to create an all-mp3 mirror of my music directory as follows. Let's say my existing directory is A and mirror directory is B.

About 70% of the tracks in directory A are FLAC or APE. I want those tracks converted to mp3 320Kbps in directory B. The remaining 30% of files in A are mp3 of various bitrates. I don't want those converted because they already are 320 Kbps or less, but I still want them copied over to B.

In summary, at the end of this batch process A and B should have the same files in the same directory structure, the only difference being that all files in B would be mp3s, and therefore capped at 320 Kbps. In other words this batch process should be able to (a) copy directory structure, (b) convert all lossless files to 320 Kbps, (c) copy all lossy files over without processing.

I was able to duplicate the directory structure with the string
Code: [Select]
$substr($directory_path(%path%),3,256)\%filename%

I know there is a command to filter on lossless files, but I could not figure a way to copy all the files over while converting only some of them. Hopefully this makes sense. My directory A is 365GB and contains approx 23,000 files in 2,300 folders. Any pointers are appreciated!

Re: Batch-create copy of existing directory, converting lossless files only

Reply #1
In Preferences > Media Library > Album List > Views

Make a new one or modify whichever one you use and add this at the beginning:
Code: [Select]
%codec%|

Now the entire album list will be sorted by codec first. So you can run a convert on your lossless, and use a "File operations > copy" on the lossy stuff.

Re: Batch-create copy of existing directory, converting lossless files only

Reply #2
%__encoding% (with double underscore) returns "lossless" or "lossy". (Or something else for synthetic waveform formats IIRC?)

High Voltage socket-nose-avatar

Re: Batch-create copy of existing directory, converting lossless files only

Reply #3
In Preferences > Media Library > Album List > Views

Make a new one or modify whichever one you use and add this at the beginning:
Code: [Select]
%codec%|

Now the entire album list will be sorted by codec first. So you can run a convert on your lossless, and use a "File operations > copy" on the lossy stuff.

Thank you! Here is what I did: I sorted my playlist by bitrate, then I selected files up to 320 bitrate and copied them, and when all selected files were copied I then selected files with bitrates above 320 and converted them. I just wanted to confirm this is the process you had in mind?

It did work and it's easy enough. Ideally I was hoping for a way to batch the process so it could be let run overnight unattended. Is this doable?

I copied about 350 files as a test and it worked fine, but is there a known limit on how many files can be processed at once?

Re: Batch-create copy of existing directory, converting lossless files only

Reply #4
%__encoding% (with double underscore) returns "lossless" or "lossy". (Or something else for synthetic waveform formats IIRC?)
Most, if not all by now, of my synthesizer components should say "synthesized" here, and VGMStream displays the confusing "lossy/lossless" because it hasn't undergone the complicated process of flagging which of its hundreds of formats are lossless PCM or lossy ADPCM or lossy perceptual codecs. They're flagged by strings, but nothing which could be automatically decided to identify lossy or lossless at this point. Maybe a chore for the future?

Re: Batch-create copy of existing directory, converting lossless files only

Reply #5
Thank you! Here is what I did: I sorted my playlist by bitrate, then I selected files up to 320 bitrate and copied them, and when all selected files were copied I then selected files with bitrates above 320 and converted them. I just wanted to confirm this is the process you had in mind?

It did work and it's easy enough. Ideally I was hoping for a way to batch the process so it could be let run overnight unattended. Is this doable?

When I do what I described it looks like this:



Then you can just right click on FLAC and convert, and right click on the others and "File Operations".

Your way should work too, although if there are any low-bitrate lossless files in there you might end up with some lossless files in your new directory.

Quote
I copied about 350 files as a test and it worked fine, but is there a known limit on how many files can be processed at once?
I don't know but I don't think there is.

 
SimplePortal 1.0.0 RC1 © 2008-2021