Converting Flacs on-te-fly to 24 bit/96kHz on Linux
Jan 7, 2022 at 7:43 PM Thread Starter Post #1 of 20

BaTou069

500+ Head-Fier
Joined
Oct 30, 2013
Posts
529
Likes
76
So I decided to revive my Shozy Alien that can only play wav and flacs up to 24 bit/96kHz
If playing 24/192 you get nasty digital noise, skips, and the device can even get stuck.
I'm currently on Linux and don't want to maintain 2x my Library.
I'd love to just convert everything I copy to the SD Card while converting.
So basically choosing what to copy to an SD card and the computer converts and saves the final file to the card.
Any idea what program does this?
 
Jan 8, 2022 at 10:17 AM Post #3 of 20
Tdarr might do it but it's not on the fly. It will listen to a folder and transcode in place though
Wow i had a quick look but im not sure i understood what it does :)
Is this for streaming only or can tdarr also simply convert files?
I guess a simple converter would do the trick just the output path would be the sd card
 
Jan 8, 2022 at 11:32 AM Post #4 of 20
Wow i had a quick look but im not sure i understood what it does :)
Is this for streaming only or can tdarr also simply convert files?
I guess a simple converter would do the trick just the output path would be the sd card
This does it be replacing the files it converts. I think you can just convert on your computer thew load them.
 
Jan 9, 2022 at 11:38 AM Post #6 of 20
Jan 9, 2022 at 3:48 PM Post #7 of 20
I certainly could but the idea was to use a program like monkey media where my library is and choose certain tracks I want on the SD card to be copied there and transformed to 24/96 on the way.

Monkey media ... you mean MediaMonkey? I have not used MediaMonkey for a decade but IIRC, it allows scripts written using VBscript and JScript languages.
My guess is that you can find suitable script at least to start with by Googling it but, if not then maybe someone here forums can help you to write a script which uses flac.exe to make the conversion and copies those files to a SD card.
 
Jan 17, 2022 at 4:43 AM Post #8 of 20
ffmpeg command line

man ffmpeg
 
Jan 17, 2022 at 6:47 AM Post #9 of 20
ffmpeg command line

man ffmpeg

The idea was to have an audio player (like Amarok, Audacious, Guayadeque, Elisa...) playing songs and once I like something I can just drag and drop this file to the SD Card folder (from within the player if browsing by folders), and this will not only copy the file but also convert it to 24/96 if it's above
 
Jan 17, 2022 at 6:58 AM Post #10 of 20
I think on Linux that is going to be difficult to achieve. And it doesn't make sense to upsample FLAC. There is no advantage to that. If you want that anyway, you could look for a player with upsampling- probably also not available on Linux.
 
Jan 17, 2022 at 8:49 AM Post #11 of 20
Don't know much about Linux but most media players in Windows do have a sync option.
This is used to transfer files to a portable doing conversion on the fly (transcoding).
Would be surprised if there are no media player in the Linux world not supporting synchronizing / transcoding.
Just an example: https://community.kde.org/Amarok/Development/MediaDevice_Sync_URP
 
Jan 17, 2022 at 1:20 PM Post #12 of 20
Unless you're using a pibox as an audio appliance, it's pretty hard to justify Linux for audio. I have all *NIX boxes of various kinds but my audio appliances are all Windows. Every DAC and device manufacturer makes ASIO drivers for Windows, nobody does for Linux. Linux is not designed for audio, audio is just a hack. Too many layers, too much latency, very little support for DSD, MQA pretty much non-existent. Bit perfect is only found on specific media distros like for the piboxes and even then often not.

I guess minidlna can be set up to transcode but I'm not sure how granular that is since I don't use it. Really, if upsampling is desired then you should find a player that does that. HQPlayer is one example, but I'm not sure where all it runs. It's complicated and has a wretched, developer-centric UI.

Linux and UNIX do have good transcoding tools, but I never found a player I could tolerate. So I often rip and do other processing on *NIX and serve my music lib from a UNIX box, but all my DACs are hooked up to Windows boxes.
 
Jan 18, 2022 at 2:33 AM Post #13 of 20
I think on Linux that is going to be difficult to achieve. And it doesn't make sense to upsample FLAC. There is no advantage to that. If you want that anyway, you could look for a player with upsampling- probably also not available on Linux.
I want to downsample, not up. The reason being my Shozy Alien dap that supports max 24/96


Unless you're using a pibox as an audio appliance, it's pretty hard to justify Linux for audio. I have all *NIX boxes of various kinds but my audio appliances are all Windows. Every DAC and device manufacturer makes ASIO drivers for Windows, nobody does for Linux. Linux is not designed for audio, audio is just a hack. Too many layers, too much latency, very little support for DSD, MQA pretty much non-existent. Bit perfect is only found on specific media distros like for the piboxes and even then often not.

I guess minidlna can be set up to transcode but I'm not sure how granular that is since I don't use it. Really, if upsampling is desired then you should find a player that does that. HQPlayer is one example, but I'm not sure where all it runs. It's complicated and has a wretched, developer-centric UI.

Linux and UNIX do have good transcoding tools, but I never found a player I could tolerate. So I often rip and do other processing on *NIX and serve my music lib from a UNIX box, but all my DACs are hooked up to Windows boxes.

Well, I'd really like to have a separate pibox as a pure music server but for now I use my linux desktop pc as my main machine that I use to work from home, when going to the office I use a macbook pro. So I currently work and listen to music with this computer, I'd like to use this computer as a server for my LAN and of course (and thats what this post is about) to load flac files to a SD-Card while downsampling anything above 24/96 to 24/96 (shozy alien does not support anything above).
I asked for on the fly conversion because I don't want to have to versions of my music library and I'm not interested in keeping the file converted files on my hard drive. Once it's replaced on the SD card its gone.

Regarding Linux not being ideal for music playback I need to disagree. For Audio I use the Aune T1 straight out of USB and had no issues. Sure there were some optimizations that improved the sound and pipewire improved latency, although not a real issue for me since I don't play games...
I honestly don't care much for DSD or MQA and am happy with PCM. I think Linux is way more straight forward and it;s much clearer what audio interface you use and what can be done. afaik asio isn't the best choice anyways, no?

So what you're saying is that your music server is unix but playback is all windows?
 
Jan 18, 2022 at 3:36 AM Post #14 of 20
I want to downsample, not up. The reason being my Shozy Alien dap that supports max 24/96
Ah, I misunderstood because I think you described the proposed solution rather than the problem, but I have been working OT and could have missed it. Anyway so then I think the benefit you'll get from Linux is if you script a solution using ffmpeg. If you're stuck with GUI apps and don't want to use the command line and write shell scripts, there is not much difference from the driver's seat between Linux and Windows.

Well, I'd really like to have a separate pibox as a pure music server but for now I use my linux desktop pc as my main machine that I use to work from home, when going to the office I use a macbook pro. So I currently work and listen to music with this computer, I'd like to use this computer as a server for my LAN and of course (and thats what this post is about) to load flac files to a SD-Card while downsampling anything above 24/96 to 24/96 (shozy alien does not support anything above).
On Linux the most obvious solution is to script it using ffmpeg

I asked for on the fly conversion because I don't want to have to versions of my music library and I'm not interested in keeping the file converted files on my hard drive. Once it's replaced on the SD card its gone.
If you have a lot of high res files and you throw them away after downsampling that means you don't get what you paid for, ultimately.

Regarding Linux not being ideal for music playback I need to disagree. For Audio I use the Aune T1 straight out of USB and had no issues.
I think that means you had no issues that you were aware of. And that does not change the fact that Linux is a very poor choice for audio.

Sure there were some optimizations that improved the sound and pipewire improved latency, although not a real issue for me since I don't play games...
Very few people on this forum or in hifi generally game at all. The issue with Linux is lack of bit perfect and lack of driver support and also latency. But latency is down the list.

I honestly don't care much for DSD or MQA and am happy with PCM. I think Linux is way more straight forward and it;s much clearer what audio interface you use and what can be done.
That isn't true at all, and your use case is fine and if you're happy that's good. But again it doesn't mean Linux is a good choice for audio in the general case. It is not more clear what audio interface you're using or what you can do. Windows still wins there. And let me clarify this is coming from somebody who runs *NIX on more than a dozen server boxes and hates Windows. I just don't think it's worth fighting UNIX-like OS when it comes to music or video. Windows wins and other things to do.

afaik asio isn't the best choice anyways, no?
It is, as far as I know. It was designed by one of the top companies in audio production.

So what you're saying is that your music server is unix but playback is all windows?
Right. I have 4T 8T of ZFS mirror running on FreeBSD on a Xeon office server box on gigabit LAN. It serves music over CIFS/SAMBA and minidlna.
 
Last edited:
Jan 18, 2022 at 6:36 AM Post #15 of 20
Ah, I misunderstood because I think you described the proposed solution rather than the problem, but I have been working OT and could have missed it. Anyway so then I think the benefit you'll get from Linux is if you script a solution using ffmpeg. If you're stuck with GUI apps and don't want to use the command line and write shell scripts, there is not much difference from the driver's seat between Linux and Windows.

On Linux the most obvious solution is to script it using ffmpeg

Yes I understand. That's certainly the easiest way to convert targeted files/folders - in my case I choose the track to convert spontaneously while listening, was thinking of some kind of automation even if not end2end

If you have a lot of high res files and you throw them away after downsampling that means you don't get what you paid for, ultimately.
Well I keep for example the original 24/192 and convert to 24/96 output file to sd card
The sd card won't be huge due to the screen-less nature of the dap. The converted files on the SD card can be deleted and replaced with other songs, but the source files stays as they are

I think that means you had no issues that you were aware of. And that does not change the fact that Linux is a very poor choice for audio.

That isn't true at all, and your use case is fine and if you're happy that's good. But again it doesn't mean Linux is a good choice for audio in the general case. It is not more clear what audio interface you're using or what you can do. Windows still wins there. And let me clarify this is coming from somebody who runs *NIX on more than a dozen server boxes and hates Windows. I just don't think it's worth fighting UNIX-like OS when it comes to music or video. Windows wins and other things to do.
That's super interesting, when I switched 4y ago to Mint (and never changed since, almost never reboot) I also heard sound degradation but found some guide online, changed some settings and it improved drastically.
Why are then so many streamers unix/linux based? and isn't volumio bitperfect? There is a whole rasp pi industry with i2i addons and whatnot people swear by, how come?
I'd love to find out more about it, I'd hate to go back to windows in all honesty
 

Users who are viewing this thread

Back
Top