FAQ  •  Register  •  Login

Tests before transcoding audio files (as exists for Video)

<<

pierrep

Streaming enthusiast

Posts: 41

Joined: Sun Jun 12, 2011 6:59 am

Location: Grenoble - France

Post Fri Jan 10, 2014 1:52 pm

Tests before transcoding audio files (as exists for Video)

Hello

I have more and more Hires Audio FLAC files: 24 bit and up to 192kHz
But all my devices are not supporting such resolutions: for example TVs are often limited to 24bit/48kHz
To solve this problem I add a transcode line in my profiles:
  Code:
<Audio targetContainer="flac" aSamplerate="48000">
      <Matches container="flac" />
</Audio>
This is a little bit stupid as I transcode every files even if not needed and with a potential loss of quality when transcoding from 44.1 to 48kHz

Is it possible, for audio files, to add tests in the "Matches" as it already exists for Video with H264: "levelGreaterThan" and "profile"
This could result with something like:
  Code:
<Matches container="flac" aSamplerate="96000" aBitDepth="24"/>
<Matches container="flac" aSamplerateGreaterThan="48000"/>

Thanks
Pierre
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jan 13, 2014 4:57 am

Re: Tests before transcoding audio files (as exists for Vide

So your device supports Flac natively?
<<

pierrep

Streaming enthusiast

Posts: 41

Joined: Sun Jun 12, 2011 6:59 am

Location: Grenoble - France

Post Mon Jan 13, 2014 7:27 am

Re: Tests before transcoding audio files (as exists for Vide

zip wrote:So your device supports Flac natively?
Some of my devices support FLAC natively

But I have also for example a Sharp TV which only supports LPCM with a maximum sample rate of 48kHz. With it I have the profile
  Code:
<Audio targetContainer="lpcm" aSamplerate="48000">
   <Matches container="asf" />
   <Matches container="mp4" />
   <Matches container="flac" />
   <Matches container="ogg" />
   <Matches container="mp3" />
</Audio>
<<

tuna26

Serviio newbie

Posts: 5

Joined: Fri Dec 08, 2017 4:50 pm

Post Fri Dec 08, 2017 5:52 pm

Re: Tests before transcoding audio files (as exists for Vide

pierrep wrote:This is a little bit stupid as I transcode every files even if not needed and with a potential loss of quality when transcoding from 44.1 to 48kHz

Sorry for digging out this old posting, but can you or anyone else tell me why there should be a loss of quality when upsampling from 44.1 to 48kHz?

I also had to drop the samplerate command into the profiles.xml to make sure that my Sony Bravia is able to play Hi-Res audio files with samplerates above 48000Hz:

  Code:
<Audio targetContainer="lpcm" aSamplerate="48000">

Now all my 88.2, 96 and 192kHz files are getting downsampled to 48kHz, but I assume that all my 44.1kHz files are getting upsampled to 48kHz. If this is correct, and it has negative effects on audio quality, I would not be happy with that solution...

Thanks for any help or advise!
<<

tuna26

Serviio newbie

Posts: 5

Joined: Fri Dec 08, 2017 4:50 pm

Post Sat Dec 09, 2017 4:23 pm

Re: Tests before transcoding audio files (as exists for Vide

I did some research on the internet and opinions are thick on the ground. Some say upsampling from 44.1 to 48kHz has major effects on audio quality and some say it hasn’t, or it depends on the process/algorithm etc… In the hydrogenaud.io community I found the following optimistic assessment:

I've done tests of re-sampling 44.1kHz to 48kHz, then back to 44.1 (so re-sampled twice) and then used audio analyzer software compare this with the original and check for any artifacts. Believe me that resulting artifacts were so low it would be completely pointless even trying to do a listening test. I was looking at graphs of added noise and harmonic/inter-modulation distortion and there was nothing above -130dB, so about 40dB below what I could even hope to try and hear. From the results I've seen I'd say that software resampling (done correctly) would be 100% inaudible (difference) to 100% of people. Yeah that's a pretty strong claim but I believe it.

Is that what Serviio (or FFmpeg) does? Or can’t this be compared because there is a difference between sample rate conversion and upsampling while transcoding? Well, call me audiophile, but this really interests me.
<<

tuna26

Serviio newbie

Posts: 5

Joined: Fri Dec 08, 2017 4:50 pm

Post Mon Dec 11, 2017 7:41 am

Re: Tests before transcoding audio files (as exists for Vide

Sorry if this is moving away from the subject a bit, but while investigating, I found another interesting statement here:

https://nucco.org/2013/08/serviio-and-h ... utput.html

It says that

Basically, aBitrate=”1620″ for LPCM means 16 bit 2 channel. The default (as of this writing) appears to be 192, which makes no sense, and gives you horrible 1-bit 2 channel LPCM.

This can't be true, can it??
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Wed Dec 13, 2017 11:38 am

Re: Tests before transcoding audio files (as exists for Vide

I'm not sure to be honest, I don't have many lossless files to test with. You can enable detailed logging and see the ffmpeg command it produces. Maybe the default bitrate of 192 shouyld be only used for mp3/aac and not lossless, but I'll need someone to give me an idea what is should be.
<<

tuna26

Serviio newbie

Posts: 5

Joined: Fri Dec 08, 2017 4:50 pm

Post Thu Dec 14, 2017 7:41 am

Re: Tests before transcoding audio files (as exists for Vide

OK thank you, I appreciate your honesty :)

I checked out detailed logging and found out, that my ALAC files are getting transcoded into LPCM 16-Bit/44.1kHz (with default settings), so no horrible 1-Bit 2 channel LPCM. Hi-Res files with sample rates above 48kHz won't play.

When I add aSamplerate="48000"> into profiles.xml, all files (also the Hi-Res ones) play with 16-Bit/48kHz.

The only thing that bugs me is, that my 24-Bit files are not getting transcoded into 24-Bit. They stay at 16-Bit. Bitrate addings into profiles.xml do not have any effect on the output... The DLNA specifications of my Sony Bravia say that the limitation is 24-Bit/48kHz. How can I force 24-Bit streaming?
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 17212

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Thu Dec 14, 2017 4:41 pm

Re: Tests before transcoding audio files (as exists for Vide

DLNA itself only supports 16bit LPCM in the standard.
<<

tuna26

Serviio newbie

Posts: 5

Joined: Fri Dec 08, 2017 4:50 pm

Post Wed Dec 20, 2017 8:13 am

Re: Tests before transcoding audio files (as exists for Vide

Right, I got it, LPCM is limited to 16-Bit, 44100Hz, 48000Hz, 1-channel, 2-channel under DLNA...

But I think decoding ALAC into WAV in 24-Bit depth with a DLNA renderer should be possible, since WAV got the riff header. If I have time, I will give it a try. My Sony Bravia should be able to handle it.

Return to Feature requests

Who is online

Users browsing this forum: No registered users and 24 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.