Request maximum FLAC compression level

Archive of historical feature requests.
Please use the GitHub link above to report issues.
Forum rules
*******************************
Please be aware we are now using GitHub for issue tracking and feature requests.
- This section of the forum is now closed to new topics.

*******************************
Post Reply
lyy1992
Posts: 4
Joined: Mon Oct 13, 2014 3:42 am

Request maximum FLAC compression level

Post by lyy1992 »

Hi, I'm newbie here. I've been using Handbrake for weeks and I love it in many ways, especially the audio encoding options. But is that possible to make the FLAC compression level adjustable so that I can save space to store loseless audio with maximum compression level? I noticed that the current default level is 5, but I'm not sure that whether level 8 can do more space saving since the CPU nowadays can do it as fast as level 5 compression. I've no idea how much space it can save with level 8 compared to level 5, hopefully the compression is significant. Any suggestions or comments will be much appreciated. Thanks.
Deleted User 11865

Re: Request maximum FLAC compression level

Post by Deleted User 11865 »

Using HandBrakeCLI, there is an --audio-compression option.

On 99% of sources, 8 instead of 5 will save you a few kilobytes (like 1-3%) on the audio track, so like maybe 1% of the overall file size.
lyy1992
Posts: 4
Joined: Mon Oct 13, 2014 3:42 am

Re: Request maximum FLAC compression level

Post by lyy1992 »

Thanks, Rodeo, seems like the effect is minuscule. Anyway, my true intention is to convert a video with DTS 5.1 1507kbps audio, which took 33% of the overall file size (1.07GB), that's too unnecessary. So I've been thinking of downmixing it with Dolby Pro Logic ii in FLAC(since I try not to loose information form the source), trying to maintain the quality on my headphone, and the results is quite promising which took only 450MB space, and I can hear some sound which I never heard before in its original file. I then mux the audio with the video since the video quality is good enough. Is that a good way to maintain the sound quality while reducing the audio file size?
Deleted User 11865

Re: Request maximum FLAC compression level

Post by Deleted User 11865 »

If you want to keep the 5.1, I would go with the latest Beta and use AAC (FDK encoder under Windows & Linux, Core Audio encoder under OS X). You should be able good results around 384 Kbps (about a quarter of the DTS file size).

But mixing down to 2-channel and encoding to FLAC 16-bit might give you nicer results, I guess it depends on your ears.
lyy1992
Posts: 4
Joined: Mon Oct 13, 2014 3:42 am

Re: Request maximum FLAC compression level

Post by lyy1992 »

Yeah, but 5.1 is practically better than stereo since the data is not messed up. I tried to convert to AAC 5.1 but some artifacts still can be heard (that's the older version of GUI). FDKAAC is a good option, I found out that if FDKAAC is used with VBR, it can produce quality with virtually no filter applied, but I have no idea how to change the VBR setting in the GUI, and I also have no idea how to install the CLI version.
moneymatt4life
Veteran User
Posts: 440
Joined: Fri Mar 09, 2012 5:26 am

Re: Request maximum FLAC compression level

Post by moneymatt4life »

handbrake doesn't support fdkaac vbr yet, something about errors with certain mixdowns/frequencies/something back then, i dunno...
fdk was last updated on Aug1st, it can encode up to 96kHz now. i don't know if it would fix any of the issues that the devs encountered though, they'd have to update fdk and see what happens when they want to retest it (^^',)

i don't think the GUI ever had the ability for vbr audio (well besides flac, but no compression option obviously)... i would like it to since video can be abr or vbr, so why not audio(although fdk is cbr/vbr), but that's for s55(i think?) to decide if he wants to rework how the audio tab is. it's a not big issue though, just would be nice. i'm getting better with cli, handbrake still needs some more experience with though...
you download the cli and run the exe via command prompt (assuming you're on windows). i don't know how it works in linux as i've only used the GUI, i think terminal? i don't have a mac, so...
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Request maximum FLAC compression level

Post by JohnAStebbins »

moneymatt4life wrote:i don't think the GUI ever had the ability for vbr audio (well besides flac, but no compression option obviously)
For vbr audio we have a audio "quality" setting. It should be available in the GUI, but I have not looked at how the windows GUI implements it. It is currently only available for vorbis, and lame because these are the only encoders that support vbr. fdk-aac vbr is seriously broken. I tried to enable it once and it's just a mess https://reviews.handbrake.fr/r/514/
moneymatt4life
Veteran User
Posts: 440
Joined: Fri Mar 09, 2012 5:26 am

Re: Request maximum FLAC compression level

Post by moneymatt4life »

there is no implementation in the WinGUI from what i can tell...
is there any specific reason as to why lame is 3.98.4 instead of 3.99.5?
... i was testing the various mixdowns/frequencies that had errors with the standalone fdkaac.exe (from nu774) and i never had issues... if updating fdk to the newest version doesn't help anything, it must be something else between av/fdk... but i don't know the technical stuff, so i'm likely wrong (^^',)
lyy1992
Posts: 4
Joined: Mon Oct 13, 2014 3:42 am

Re: Request maximum FLAC compression level

Post by lyy1992 »

Anyway, I will try to install CLI version. That will be nice if VBR option available in GUI, hopefully can be as good as H.264 settings coz for me, a video is considered satisfactory only if audio is good. CLI should be able to set those options, will try it out 1st.
Deleted User 11865

Re: Request maximum FLAC compression level

Post by Deleted User 11865 »

JohnAStebbins wrote:
moneymatt4life wrote:i don't think the GUI ever had the ability for vbr audio (well besides flac, but no compression option obviously)
For vbr audio we have a audio "quality" setting. It should be available in the GUI, but I have not looked at how the windows GUI implements it. It is currently only available for vorbis, and lame because these are the only encoders that support vbr. fdk-aac vbr is seriously broken. I tried to enable it once and it's just a mess https://reviews.handbrake.fr/r/514/
I disagree, Core Audio AAC VBR works fine too - of course it's only available to Mac users… :P
User avatar
JohnAStebbins
HandBrake Team
Posts: 5726
Joined: Sat Feb 09, 2008 7:21 pm

Re: Request maximum FLAC compression level

Post by JohnAStebbins »

Rodeo wrote:I disagree, Core Audio AAC VBR works fine too - of course it's only available to Mac users… :P
I always have to double check which encoders have this enabled. And since I don't use a Mac...
User avatar
s55
HandBrake Team
Posts: 10360
Joined: Sun Dec 24, 2006 1:05 pm

Re: Request maximum FLAC compression level

Post by s55 »

I'll look into adding quality/compression to the WinGui after the next release is out. Not a priority at the moment.
randomreuben
Veteran User
Posts: 468
Joined: Mon Nov 02, 2009 2:18 pm

Re: Request maximum FLAC compression level

Post by randomreuben »

I'd asked this question myself some time ago, which led me to search for this link. http://members.home.nl/w.speek/comparison.htm It seems that space saved from compression level 5 to 8 is negligible, while the encode time goes through the roof. Mind you, HB uses libav instead of flac, so it may be faster than the flac encoder.
Post Reply