Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: 'Smart' lossy encoding (Read 1388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

'Smart' lossy encoding

I've been curating a complex playlist, and formats within it vary between lossy and lossless. I've been bulk-converting to AAC every so often as it gets larger so I can listen to this playlist on the go, however I would like to cease transcoding lossy formats and instead let them 'pass-thru' with only the name changed. For example:

Artist A\Album\09. Track W.flac
Artist B\Album\05. Track X.mp3
Artist C\Album\07. Track Y.ape
Artist D\Album\11. Track Z.ogg

organised in a playlist becomes (%list_index%. %artist% - %title%)

001. Artist A - Track W.aac
002. Artist B - Track X.mp3
003. Artist C - Track Y.aac
004. Artist D - Track Z.ogg

Is there any way to get Foobar to do this automatically?

Re: 'Smart' lossy encoding

Reply #1
Unfortunately not. You can use file operations for copying/moving files using the same patterns as the converter but you'd have to filter the playlist first (CTRL+F)

%__encoding% IS lossy for copying and NOT %__encoding% IS lossy for converting.

But doing this would lose the original %list_index%.

Re: 'Smart' lossy encoding

Reply #2
Alright, thank you :)

Re: 'Smart' lossy encoding

Reply #3
You can simplify a little bit. Using https://www.foobar2000.org/components/view/foo_quicksearch and highlight the lossy files inline in the playlist with %__encoding% IS lossy, you can
(1) Copy these lossy files,
and then select all and
(2) Convert, making it fail at (instead of overwrite) those which already exist.

Also:
* Unless your portable device is picky, you would rather encapsulate AAC in MP4 container (creating .m4a files) than use raw AAC. If you have .aac, ffmpeg can put them in .m4a losslessly.
* You can convert losslessly from .ape to .flac, you hardly need both formats unless you have special considerations to make. (Like myself I use WavPack for a very few CDDA rips, namely, files with pre-emphasis - just to be sure that I handle those separately if ever needed.)

 

Re: 'Smart' lossy encoding

Reply #4
You can simplify a little bit. Using https://www.foobar2000.org/components/view/foo_quicksearch and highlight the lossy files inline in the playlist with %__encoding% IS lossy, you can
(1) Copy these lossy files,
and then select all and
(2) Convert, making it fail at (instead of overwrite) those which already exist.

Also:
* Unless your portable device is picky, you would rather encapsulate AAC in MP4 container (creating .m4a files) than use raw AAC. If you have .aac, ffmpeg can put them in .m4a losslessly.
* You can convert losslessly from .ape to .flac, you hardly need both formats unless you have special considerations to make. (Like myself I use WavPack for a very few CDDA rips, namely, files with pre-emphasis - just to be sure that I handle those separately if ever needed.)

Thanks for the tips :) I need %list_index% though, the ordering of the playlist is as important as the tracks. Otherwise I'd just sort the playlist by file type, deselect all FLACs (as you suggested, I do re-encode all of my lossless files to FLAC; APE was just to illustrate the point), copy the remainder, then undo the playlist sort.

Also, good call on the AACs, I have been encapsulating as MP4/M4A, I just haven't been using it long enough to get the extension through my head. I was turned off the format years and years ago by a misconception that AAC stood for Apple Audio Codec lol

EDIT:

Okay, I found a way to do this:
  • Copy playlist to a folder using file ops, filename pattern %list_index%. %artist% - %title%
  • Select all lossless files and put them in a playlist
  • Convert to AAC using filename pattern %filename%
  • Delete all lossless files in folder