Post Reply 
Upsampling MQA files to original resolution with sox
10-06-2018, 19:22 (This post was last modified: 10-06-2018 19:25 by ps3guy.)
Post: #7
RE: Upsampling MQA files to original resolution with sox
(24-05-2018 22:12)simoncn Wrote:  If you are using your ffmpeg script in place of the real ffmpeg, it is very unlikely that this approach will work because your script would need to support and implement all the ffmpeg options that MinimServer uses.
This is what I have come up with that works for custom upsampling

1. Set the following in minimserver
stream.transcode=flac:wav24;192
stream.converter=pathtocustom/ffmpeg

2. Create custom script named ffmpeg as follows:
#/bin/sh
#removed -ar 192000 to disable ffmpeg upsampling - added quotes around the input file name (between -i and -vn) they were stripped during the echo stage
FFMPEG_MOD="ffmpeg $(echo -n "$@" | sed -e 's/ -ar 192000//' | sed -e 's/-i /-i "/' | sed -e 's/ -vn/" -vn/')"

ORIG_RATE=$(ffprobe -v error -show_entries stream=sample_rate -of default=noprint_wrappers=1:nokey=1 "${FILE_NAME}")
UPSAMPLE="192000"

eval "$FFMPEG_MOD" | sox -q -D -t raw -r "${ORIG_RATE}" -c 2 -b 24 -e signed-integer --endian little - \
-t raw -e signed-integer -b 24 - vol 0.92 amplitude rate -v -b 99.0 -p 45 -a 192000 dither -S

The only thing I would like is the to be able to use flac:wav32;192 this would allow me to send 32 bit data as 24 with zero padding. Why? Some dacs will not accept 24 bit only 32 bit data. Not an issue except some renderers do not simply pad zeros but mess add dither, etc. Any chance of adding 32 bit output option?

Thanks again,
Mike
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Upsampling MQA files to original resolution with sox - ps3guy - 10-06-2018 19:22

Forum Jump:


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