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: Wishlist for new foobar functions (Read 3703 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Wishlist for new foobar functions

Hi,

1. It would be great if Foobar was capable of bitstream passthrough. A checkbox allowing us to choose what to decode to PCM and what to passthrough via HDMI to AV Receiver would be excellent feature. This should apply to Dolby Digital (and newer True HD or even Atmos and other kinds of Dolby signals) and DTS (and DTS96/24, DTS HD MA and other kinds of DTS signals).

We already have an option to play files containing those formats (DVD, Bluray...), even with video (using foo_youtube or foo_mpv) and subtitles. The only thing missing is being able to pass undecoded bitstream to AVR. There is more and more music (meaning studio albums) available on Bluray and it is sometimes coded as DTSHDMA or Atmos (UK's Blurays have only stereo DTSHDMA sound, no PCM) plus when in multichannel, music can't (except for very few and very expensive multichannel DACs) be passed via USB to DAC but must be via HDMI to AVR, which could easily decode all those bitstreams and apply needed effects (dialog normalization, Atmos decoding, room correction etc.). I know it all can be "substituted" by just decoding it to PCM in foobar but the outcome is not the same. It would be really great feature.


2. Second feature would be ability to losslessly decode and output of 32 bit integer audio (and 64 bit fp). I know there is consensus that it has no audible benefits but as some people already noticed, music isn't only listening to final product but that product has to be produced. And modern DAWs produce 32 bit integer (or 64 bit fp) files just to give the producer "room" to change them in a manner that would not affect the final 24bit product. Also modern DAC are capable of 32 bits. 
 
PS. I wanted to split 192kHz 32bit integer wavpack file containing an album to single songs using cue file. But foobar told me it can't do it losslessly because it has to convert it to 32bit fp. I also tried DBPoweramp - well it could convert losslessly between 32bit integer wavpack and wav but it couldn't split the file to tracks.

This second feature (32bit integer and 64bit fp) may seem unneeded but I assume it will become a standard in music production and conversion (or it even is nowadays) and the need of it in foobar will grow.



Re: Wishlist for new foobar functions

Reply #1
* First: you have had 32-bit float on DAWs for a while now - are you saying they are ditching 32-bit float (which is sensible for the purpose) for 32-bit integer? Srsly?
If they are - and please provide a bunch of URLs for evidence - it might be a cause. Discussion thread at https://hydrogenaud.io/index.php?topic=121171.0 , where Peter asked for any reason to support it.
For the time being, fb2k is a 32-bit application, which AFAIUnderstand means that dependence between foobar2000 and components will be broken if fb2k goes 64-bit. (Though far back in the day, fifteen years ago or something, there was 64 bit support? 0.8 or something? If so, a portable install ... if that even existed ...)

* Do those DAWs actually produce cuesheets? That would also be a valid point.

* The WavPack reference decoder cannot split by .cue ... not tried any of the following, but
shntools with cuebreakpoints; see https://hydrogenaud.io/index.php?topic=112637.msg933565#msg933565 on how it apparently needs three decimals in the cuesheet for hi-rez. 
ffmpeg can split (but I don't know if it can handle cuesheets) and supports wavpack;
Going by way of 32-bit .wav you have more options. You can even wvunpack to wav and refalac to ALAC and split by cuepoints.

* Finally: modern DACs can read 32 bits, but will just decimate down to something they can convert. Indeed they cannot make anything but randomness out of the 24th bit either.

Re: Wishlist for new foobar functions

Reply #2
* First: you have had 32-bit float on DAWs for a while now - are you saying they are ditching 32-bit float (which is sensible for the purpose) for 32-bit integer? Srsly?
If they are - and please provide a bunch of URLs for evidence - it might be a cause. Discussion thread at https://hydrogenaud.io/index.php?topic=121171.0 , where Peter asked for any reason to support it.
For the time being, fb2k is a 32-bit application, which AFAIUnderstand means that dependence between foobar2000 and components will be broken if fb2k goes 64-bit. (Though far back in the day, fifteen years ago or something, there was 64 bit support? 0.8 or something? If so, a portable install ... if that even existed ...)

* Do those DAWs actually produce cuesheets? That would also be a valid point.

* The WavPack reference decoder cannot split by .cue ... not tried any of the following, but
shntools with cuebreakpoints; see https://hydrogenaud.io/index.php?topic=112637.msg933565#msg933565 on how it apparently needs three decimals in the cuesheet for hi-rez. 
ffmpeg can split (but I don't know if it can handle cuesheets) and supports wavpack;
Going by way of 32-bit .wav you have more options. You can even wvunpack to wav and refalac to ALAC and split by cuepoints.

* Finally: modern DACs can read 32 bits, but will just decimate down to something they can convert. Indeed they cannot make anything but randomness out of the 24th bit either.

To make it more precise:

1. bitstream passthrough - I think it is important and assume many users would like to see it and would benefit from it. Probably some of us would stop using any other audio/video players for good if foobar had it.
2. I know it is very, very niche and probably with not much of demand for it but I pressume it might (just might) be needed in future.

Re: Wishlist for new foobar functions

Reply #3
We already have an option to play files containing those formats (DVD, Bluray...), even with video (using foo_youtube or foo_mpv) and subtitles. The only thing missing is being able to pass undecoded bitstream to AVR. There is more and more music (meaning studio albums) available on Bluray and it is sometimes coded as DTSHDMA or Atmos (UK's Blurays have only stereo DTSHDMA sound, no PCM) plus when in multichannel, music can't (except for very few and very expensive multichannel DACs) be passed via USB to DAC but must be via HDMI to AVR, which could easily decode all those bitstreams and apply needed effects (dialog normalization, Atmos decoding, room correction etc.). I know it all can be "substituted" by just decoding it to PCM in foobar but the outcome is not the same. It would be really great feature.
DTSHDMA and TrueHD are lossless. So "outcome" is always the same.
If you are talking about music, not movies, what dialog normalization has to do with it?
Room correction can be done even more precise by software on PC side than on receiver.

I wanted to split 192kHz 32bit integer wavpack file containing an album to single songs using cue file. But foobar told me it can't do it losslessly because it has to convert it to 32bit fp. I also tried DBPoweramp - well it could convert losslessly between 32bit integer wavpack and wav but it couldn't split the file to tracks.
You can do this manually with wvunpack.exe. It can decode file from given time (or sample) and to given time (or sample).

Re: Wishlist for new foobar functions

Reply #4
We already have an option to play files containing those formats (DVD, Bluray...), even with video (using foo_youtube or foo_mpv) and subtitles. The only thing missing is being able to pass undecoded bitstream to AVR. There is more and more music (meaning studio albums) available on Bluray and it is sometimes coded as DTSHDMA or Atmos (UK's Blurays have only stereo DTSHDMA sound, no PCM) plus when in multichannel, music can't (except for very few and very expensive multichannel DACs) be passed via USB to DAC but must be via HDMI to AVR, which could easily decode all those bitstreams and apply needed effects (dialog normalization, Atmos decoding, room correction etc.). I know it all can be "substituted" by just decoding it to PCM in foobar but the outcome is not the same. It would be really great feature.
DTSHDMA and TrueHD are lossless. So "outcome" is always the same.
If you are talking about music, not movies, what dialog normalization has to do with it?
Room correction can be done even more precise by software on PC side than on receiver.

I wanted to split 192kHz 32bit integer wavpack file containing an album to single songs using cue file. But foobar told me it can't do it losslessly because it has to convert it to 32bit fp. I also tried DBPoweramp - well it could convert losslessly between 32bit integer wavpack and wav but it couldn't split the file to tracks.
You can do this manually with wvunpack.exe. It can decode file from given time (or sample) and to given time (or sample).

1. If I listen to PCM or DTSHDMA tracks from the same disk they sound the same when DTS is passedthrough as DTS and PCM as PCM (which is not suprising) but when I listen to DTS decoded by foobar to PCM it sounds different to DTS passed through (but with another program because foobar can't passthrough).  It can mean that another program produces different sound or that DTS decoding by foobar (ffmpeg) is not the same as dedicated decoding by AVR. I assume that vocals in music are to some point equivalent to dialog. Or another way - what is in Center channel can be processed in different way than what is in front channels. Maybe I'm wrong but to me PCM is 2 (in stereo) or 6 (in 5.1) discrete tracks with given informatin what is in every one of them so decoding is always the same whereas DTS/Dolby is 1 "track" of bitstream with additional information what to do with it and how to "place it" in each speaker so here "specialized" processing is needed. Most AVR have their own microphones for calibration and very many functions to properly produce sound (speaker distance, delays of sound between different channels, each speaker capabilities (freq response, bass management and so on). Foobar and ffmpeg codecs just do not know what AVR I have and all those other infos. It just changes DTS/Dolby to PCM with no additional "bespoke" processing. So (maybe wrongly) I assume it will produce different outcome (meaning what I hear) even if it would be the same bits (meaning what we can measure).  There probably are plugins for foobar that make different processing but I do not want to use them, I do not want to place any DSP in my chain and let it all be done by AVR. Hence passthrough is needed. Plus for people having Atmos/DTS:X AVRs - decoding to PCM in PC disables all additional information.

2. If there are ways to manually split or convert such 32bit integer files it would be great if all this could be done automatically by foobar - especially for people who are not fluent in command line programs etc or just for our comfort and convienience.

To sum it up. I know all of this can be done with different players and programs but it would be nice to be able to make it with foobar too. It would make foobar even better than it is now.

Re: Wishlist for new foobar functions

Reply #5
So the wvunpack command options are
--skip=[-][sample|hh:mm:ss.ss] = start decoding at specified sample/time, where a minus sign indicates relative to end of file, and 
--until=[+|-][sample|hh:mm:ss.ss] = stop decoding at specified sample/time, minus as previous and plus sign indicating track length.

AFAIUnderstand, it has to be passed once for each track to split into.


it would be great if all this could be done automatically by foobar - especially for people who are not fluent in command line programs etc or just for our comfort and convienience.
Then someone needs to set up a foo_run command that traverses the cuesheet and calls wvunpack for every track ... anyone?
You need to be aware that foobar2000's file conversion will not pass a file to an encoder, it will decode it and pass the decoded stream to the encoder (and possibly transfer things afterwards). For example, if you want to put an .aac file in an MP4 container for an .m4a, then it is easy to do so losslessly by just transferring the stream - but not by fb2k's converter as that is a tool for decoding and then re-encoding.
Also WavPack can compress DSD files, but you cannot use fb2k's converter for that; it will decode, and that's not what you want (presuming you want to keep DSD at all ...)

(Not saying I would object to fb2k getting an extended file processing feature ... but there is more than a "convert" to that!)

Re: Wishlist for new foobar functions

Reply #6
Bitstream parsing does not allow for any modifications of the data, such as volume scaling, ReplayGain included. Or DSPs. Or allowing the OS to generate audio at the same time.

Re: Wishlist for new foobar functions

Reply #7
Bitstream parsing does not allow for any modifications of the data, such as volume scaling, ReplayGain included. Or DSPs. Or allowing the OS to generate audio at the same time.
That is exactly what is needed. No modifications. Just passing unaltered signal to AVR in order to decode it in there. Volume management is done by the knob on the appliance. No other activities on the PC/foobar side - it serves only as a player ("transport" for files just like "old times" optical CD players or DVD players or BR players).

Re: Wishlist for new foobar functions

Reply #8
It can mean that another program produces different sound or that DTS decoding by foobar (ffmpeg) is not the same as dedicated decoding by AVR
I don't know what does you AVR produce (and you don't know it too), but it is easy to verify that ffmpeg/fb2k's DTS decoder does produce bit-perfect results when decoding DTSHDMA to PCM. And using WASAPI exclusive output, PCM will be delivered bit-perfect to AVR.

 

Re: Wishlist for new foobar functions

Reply #9
* First: you have had 32-bit float on DAWs for a while now - are you saying they are ditching 32-bit float (which is sensible for the purpose) for 32-bit integer? Srsly?
If they are - and please provide a bunch of URLs for evidence - it might be a cause. Discussion thread at https://hydrogenaud.io/index.php?topic=121171.0 , where Peter asked for any reason to support it.
For the time being, fb2k is a 32-bit application, which AFAIUnderstand means that dependence between foobar2000 and components will be broken if fb2k goes 64-bit. (Though far back in the day, fifteen years ago or something, there was 64 bit support? 0.8 or something? If so, a portable install ... if that even existed ...)

* Do those DAWs actually produce cuesheets? That would also be a valid point.

* The WavPack reference decoder cannot split by .cue ... not tried any of the following, but
shntools with cuebreakpoints; see https://hydrogenaud.io/index.php?topic=112637.msg933565#msg933565 on how it apparently needs three decimals in the cuesheet for hi-rez. 
ffmpeg can split (but I don't know if it can handle cuesheets) and supports wavpack;
Going by way of 32-bit .wav you have more options. You can even wvunpack to wav and refalac to ALAC and split by cuepoints.

* Finally: modern DACs can read 32 bits, but will just decimate down to something they can convert. Indeed they cannot make anything but randomness out of the 24th bit either.

Yes, a lot of modern DAWs allow output to 32bit integer (I'm not sure why). Reaper.fm allows this. I am not aware of any DAW that will produce a .cue sheet.

Also, your comment regarding modern DACs and 32 bit... I'm not sure is correct. I've seen some measurements from new DACs that are greater than 24bits (I think it was audiosciencereview).

Edit, yes it was. And its not very expensive either - Topping D90SE https://www.audiosciencereview.com/forum/index.php?threads/topping-d90se-review-balanced-dac.24235/

Edit 2, no I'm wrong. But it's extremely close at ~130dB dynamic range

Re: Wishlist for new foobar functions

Reply #10
Going by way of 32-bit .wav you have more options. You can even wvunpack to wav and refalac to ALAC and split by cuepoints.
Actually, refalac works as a .wav cue splitter too, without going by way of ALAC.

refalac -D wavfilecuesheet.cue will split the referenced .wav image into single .wav files.
("-D" is the option to "decode", but for cuesheet splitting it doesn't even need to encode. @wojak, this close enough?)

Re: Wishlist for new foobar functions

Reply #11
Quote
Actually, refalac works as a .wav cue splitter too, without going by way of ALAC
Actually, refalac works as a WavPack cue splitter too!

refalac just needs to know the 64-bit WavPack dll file (if it doesn't, download from https://github.com/dbry/WavPack/releases/download/5.4.0/wavpack-5.4.0-dll.zip and put it in the same folder as refalac.exe ); then then
refalac -D MyNiceWVFileWithEmbeddedCuesheet.wv
or
refalac -D CuesheetPointingToWV.cue
will output to .wav files split by the cuesheet.

Dropping -D converts to ALAC instead, but still split by .cue it seems. (Edit: "it seems" -> I am new to refalac.  Not using ALAC for anything but testing, I don't even know how to make an image with cuesheet into a chaptered MP4 image.)