Post Reply 
transcoding help for Raspberry Pi 4?
07-09-2022, 11:57 (This post was last modified: 07-09-2022 16:57 by dvdr.)
Post: #1
Question transcoding help for Raspberry Pi 4?
Hello
after reading several posts and the user guide, I still do not fully understand the transcoding options - sorry, if I missed important info...
I have not yet installed MinimServer2, since maybe, my goal can't be achieved - I kindly ask for your help to figurethings out.

My music should run off a Raspberry Pi 4 with 4 GB RAM. It consists of a wide variety: mostly .flac, some .mp3 and .wav, a greater number of .dsf, some .aiff. Source quality: ripped CDs in 44.1/16, HiRes downloads ranging from 44.1/24 to 192/24, DSD 64/128

The goal: I would like to transcode every file to 176.4/24 or 192/24 wav, depending on the original sampling frequency (44.1/88.2 -> 176.4, 48/96 -> 192, 176.4/192 untouched, but all files transcoded to 24bit).
As far as I understood, there is no need to install additional software for .flac-files, but for everything else, there is special transcoding software like ffmpeg needed, right?

I wonder, whether the RPi4 is able to handle that, and if so: what do I need, are there installation-guides for additional transcoding software? Also: as far as I understood, I will have to write a pretty extensive set of transcoding instructions for every file type, right - could you give me an example, please?

Thansk for helping in the matter!
Find all posts by this user
Quote this message in a reply
07-09-2022, 17:58 (This post was last modified: 07-09-2022 22:03 by simoncn.)
Post: #2
RE: transcoding help for Raspberry Pi 4?
You are correct that you will need to specify detailed transcoding instructions for each file type. Here is a first pass at what I think you will need to specify in stream.transcode, broken down by each file type and resolution in your library.

flac(44):wav24;176
flac(48):wav24;192
flac(88):wav24;176
flac(96):wav24;192
flac(176):wav24;176
flac(192):wav24;192
mp3:wav24;176
wav(44):wav24;176
wav(48):wav24;192
wav(88):wav24;176
wav(96):wav24;192
wav(<24;176):wav24;176
wav(<24;192):wav24;192
dsf:wav24;176
aiff(44):wav24;176
aiff(48):wav24;192
aiff(88):wav24;176
aiff(96):wav24;192
aiff(176):wav24;176
aiff(192):wav24;192

All the above lines need to be concatenated into a single string, separated by commas.

You will need to install ffmpeg on your RPi4. See the FFmpeg Downloads page for details of standard FFmpeg packages. You might be able to use sudo apt to install a standard FFmpeg package on your RPi4. If this is not available, you will need to download a static build for FFmpeg and copy the ffmpeg executable into the MinimServer opt/bin folder as described in this section.

I think the RPi4 will have enough power to handle all the above transcoding combinations but it might possibly struggle with DSD128 .dsf files.
Find all posts by this user
Quote this message in a reply
07-09-2022, 21:31
Post: #3
RE: transcoding help for Raspberry Pi 4?
(07-09-2022 17:58)simoncn Wrote:  Here is a first pass … I think the RPi4 will have enough power to handle all the above transcoding combinations but it might possibly struggle with DSD128 .dsf files.
WOW! Big Grin Thank you so much for your detailed answer. I will try to follow your instructions. Looking forward to the results!
Find all posts by this user
Quote this message in a reply
10-09-2022, 19:14
Post: #4
RE: transcoding help for Raspberry Pi 4?
(07-09-2022 17:58)simoncn Wrote:  You will need to install ffmpeg on your RPi4.
Simon
Again, thanks for your help - I installed ffmpeg via upload and commandline commands on the RPi and got resampling working!

Now, reading a bit more about ffmpeg, there seem to be various quality settings. Could you be so kind and suggest an optimal sound quality setting for my user-case and how/where to enter it?
Thanks so much for your support!
Find all posts by this user
Quote this message in a reply
10-09-2022, 22:06
Post: #5
RE: transcoding help for Raspberry Pi 4?
I'm pleased to hear you have got this working.

I haven't used any of the FFmpeg transcoding quality options myself, so I'll defer to other forum members to provide advice on this.
Find all posts by this user
Quote this message in a reply
15-02-2023, 03:59 (This post was last modified: 18-02-2023 21:45 by dvdr.)
Post: #6
RE: transcoding help for Raspberry Pi 4?
(07-09-2022 17:58)simoncn Wrote:  I think the RPi4 will have enough power to handle all the above transcoding combinations but it might possibly struggle with DSD128 .dsf files.
Following up on your great advice, I have a surprising remark and a question.

- My question: why is the transcoding setting for m4a not allowing any sample rate input (like m4a(44):wav24;176 etc.)? I do get an error message in Minimserver, when I want to add that to the streaming options. Apple Lossless uses either m4a or mp4 as a container, so that imho would make sense for m4a as well. btw.: mp3(44) and mp3(48) are not allowed, as well.

- The RPi handles the transcoding up to dsd512 (!!!!) flawlessly, using ffmpeg and the following setting, that I got from forum member 'mm2'
Code:
convOut=-af aresample=resampler=soxr:precision=32

Can you imagine???
So thanks again for helping me with the list of transcoding options! I expanded it a bit, maybe it's helpful for someone out there...
Code:
flac(44):wav24;176,flac(48):wav24;192,flac(88):wav24;176,flac(96):wav24;192,flac​(176):wav24;176,flac(192):wav24;192,flac(352):wav24;176,flac(384):wav24;192,wav(​44):wav24;176,wav(48):wav24;192,wav(88):wav24;176,wav(96):wav24;192,wav(<24;176):wav24;176,wav(<24;192):wav24;192,wav(352):wav24;176,wav(384):wav24;192,dsf:wav24;176,aiff(44​):wav24;176,aiff(48):wav24;192,aiff(88):wav24;176,aiff(96):wav24;192,aiff(176):w​av24;176,aiff(192):wav24;192,mp4(44):wav24;176,mp4(48):wav24;192,mp4(88):wav24;1​76,mp4(96):wav24;192,mp4(176):wav24;176,mp4(192):wav24;192,mp4(352):wav24;176,mp​4(384):wav24;192,mp3:wav24;176,alac(44):wav24;176,alac(48):wav24;192,alac(88):wa​v24;176,alac(96):wav24;192,alac(176):wav24;176,alac(192):wav24;192,alac(352):wav​24;176,alac(384):wav24;192
Find all posts by this user
Quote this message in a reply
15-02-2023, 09:10
Post: #7
RE: transcoding help for Raspberry Pi 4?
For both .m4a and .mp4 files, you need to specify mp4(44), not m4a(44).
Find all posts by this user
Quote this message in a reply
15-02-2023, 09:31
Post: #8
RE: transcoding help for Raspberry Pi 4?
(15-02-2023 09:10)simoncn Wrote:  For both .m4a and .mp4 files, you need to specify mp4(44), not m4a(44).
Thanks for your quick answer and clarifying that - my error was, that for Apple Lossless files ("alac"), that I have and that are using the m4a-container, I had to create a separate entry in the format alac(44):wav24;176 etc.
I wrongly had assumed, that the transcoding options were about the file ending and not the codec used.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)