Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
8th June 2022, 12:27 | #1 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
High quality downsampling 96kHz to 48kHz
I have this strange anime BD whose jpn audio is 96kHz 24bit 7.1 THD.
What is the best way to dither it down to 48kHz wav? I have googled a lot and I became even more confused. Dithering or not? What kind of dithering? ffmpeg native? sox? Help.
__________________
@turment on Telegram |
8th June 2022, 14:57 | #2 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
That conversion (96kHz 24bit -> 48kHz 24bit), only samplerate, don't need be dithered because are far of human ear limits (20 KHz [samplerate 40 KHz] 20 bits) and quantization errors can't be listenen.
__________________
BeHappy, AviSynth audio transcoder. |
8th June 2022, 15:34 | #3 | Link |
Registered User
Join Date: Oct 2002
Location: France
Posts: 2,309
|
Akira ?
This is the only one BD (of movie) i've encoutered with audio more than 48kHz, resulting in an around 15GB audio file size ! ... Wait... it was the 5.1 audio on Akira which was with so insane stuff, not the 7.1. Finaly maybe there is another insane audio anime... Edit My mistake, Akira is 5.1 24bit 192kHz !
__________________
My github. Last edited by jpsdr; 8th June 2022 at 15:39. |
8th June 2022, 21:21 | #4 | Link |
Acid fr0g
Join Date: May 2002
Location: Italy
Posts: 2,542
|
Ghost in the shell – Solid state society
Code:
Audio #1 ID : 4352 (0x1100) Menu ID : 1 (0x1) Format : MLP FBA / AC-3 Format/Info : Meridian Lossless Packing Format settings : Dolby Surround EX Muxing mode : Stream extension Codec ID : 131 Duration : 1 h 48 min Bit rate mode : Variable / Constant Bit rate : 640 kb/s Maximum bit rate : 6 756 kb/s Channel(s) : 8 channels / 6 channels Channel layout : L R C LFE Ls Rs Lb Rb Sampling rate : 96.0 kHz / 48.0 kHz Frame rate : 31.250 FPS (1536 SPF) Compression mode : Lossless Stream size : 498 MiB Language : Japanese Service kind : Complete Main bsid : 6 Dialog Normalization : -31 Dialog Normalization : -31 dB compr : -0.28 compr : -0.28 dB acmod : 7 lfeon : 1 dialnorm_Average : -31 dialnorm_Average : -31 dB dialnorm_Minimum : -31 dialnorm_Minimum : -31 dB dialnorm_Maximum : -31 dialnorm_Maximum : -31 dB dialnorm_Count : 1339 compr_Average : -4.24 compr_Average : -4.24 dB compr_Minimum : -8.89 compr_Minimum : -8.89 dB compr_Maximum : -0.56 compr_Maximum : -0.56 dB compr_Count : 433 format_identifier : AC-3 Source : 00005.m2ts
__________________
@turment on Telegram |
9th June 2022, 18:05 | #5 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
Quote:
ffmpeg -i "00005.m2ts" -map 0:1 -filter_complex "aresample=48000,pan=7.1|c0=c0|c1=c1|c2=c2|c3=c3|c4=c6|c5=c7|c6=c4|c7=c5" -rf64 auto -acodec pcm_s24le "7.1_Channels_R.wav" Change the samplerate to the half is a easy process and don't need a sophisticated software, or dither, to convert after the output to a lossy encode.
__________________
BeHappy, AviSynth audio transcoder. |
|
8th June 2022, 22:37 | #6 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Question for Tebasuna: what would ResampleAudio() do in this scenario?
Assuming that I can't use SSRC 'cause 96000Hz ain't supported, suppose that I do the following: Code:
video=LWLibavVideoSource("Ghost in the shell.m2ts") audio=LWLibavAudioSource("Ghost in the shell.m2ts", stream_index=1) AudioDub(video, audio) ResampleAudio(48000) The reason why I'm asking this is that I've been using this function for years and years, trusting the Avisynth implementation, to perform any kind of conversion (aside from 44 kHz <-> 48 kHz which I perform with SSRC() ) but in the wiki it doesn't say much http://avisynth.nl/index.php/ResampleAudio Perhaps a better clarification of lines 1179 onward would help users https://github.com/AviSynth/AviSynth...core/audio.cpp Then of course from line 1326 onwards it goes to assembly and I lose any clue about what is actually doing (although I'm sure you, Ferenc, Jean Philippe and others can). Last edited by FranceBB; 8th June 2022 at 23:55. |
8th June 2022, 23:58 | #7 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
JFYI,
IanB said some years back that ResampleAudio() had been re-written to be very nearly as good as SSRC(), any articles saying SSRC() is much better, is well outdated.
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
9th June 2022, 09:21 | #8 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Quote:
That's great! |
|
9th June 2022, 09:54 | #9 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Further to my prev post,
I just did a D9 search for "SSRC" by user IanB [posts not threads], and looked at the very first/earliest [date order] link from June 2005 (I dont really think this is the same link [EDIT: post] that I was referencing, but it is pertinent - I did not look at any other links) https://forum.doom9.org/showthread.p...122#post672122 Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 9th June 2022 at 10:13. |
|
9th June 2022, 18:26 | #10 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
Of course you can use SSRC, instead aresample=48000, with
ssrc --rate 48000 "7.1_Channels_R96.wav" "7.1_Channels_R48.wav" Or AviSynth: LWLibavAudioSource("00005.m2ts", stream_index=1) ConvertAudioToFloat() SSRC(48000) a=ConvertAudioTo24bit() flrc = GetChannel(a, 1, 2, 3 ,4) blr = GetChannel(a, 5, 6) slr = GetChannel(a, 7, 8) MergeChannels(flrc, slr, blr)
__________________
BeHappy, AviSynth audio transcoder. |
10th June 2022, 02:42 | #11 | Link |
Registered User
Join Date: Feb 2020
Posts: 539
|
The best resampler is still the sox resampler that can be used with ffmpeg when compiled with sox with the use of ffmpeg -i my-48000.wav -af aresample=resampler=soxr -ar 44100 my-44100.wav
https://trac.ffmpeg.org/wiki/FFmpeg%...oX%20Resampler |
11th June 2022, 09:55 | #12 | Link | |
Registered User
Join Date: Jan 2012
Posts: 272
|
Quote:
|
|
11th June 2022, 10:31 | #13 | Link | |
Registered User
Join Date: Jul 2008
Posts: 532
|
Quote:
Reminder: http://src.infinitewave.ca |
|
12th June 2022, 19:20 | #14 | Link | |
Registered User
Join Date: Feb 2020
Posts: 539
|
Quote:
>but the patch is stuck in limbo What patch, LOL? Last edited by Balling; 12th June 2022 at 19:29. |
|
13th June 2022, 16:50 | #15 | Link |
Life's clearer in 4K UHD
Join Date: Jun 2003
Location: Notts, UK
Posts: 12,219
|
__________________
| I've been testing hardware media playback devices and software A/V encoders and decoders since 2001 | My Network Layout & A/V Gear |
|
10th June 2022, 09:24 | #16 | Link |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
I don't know what is the best.
There are a comparative here And here free software to resample. Sox can be used with ffmpeg (libsoxr included in BtbN-builds and in gyan.dev_full-builds) like Balling say or with the SoX package SSRC can be used also with eac3to, than also can use r8brain. Not included in comparative but see also a more updated ReSampler
__________________
BeHappy, AviSynth audio transcoder. Last edited by tebasuna51; 10th June 2022 at 09:54. |
10th June 2022, 12:37 | #17 | Link |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
|
Well I guess I'll stick with Avisynth anyway just for the ease of use.
After all, I'm already indexing the video and/or trimming it etc, so having everything in one place makes sense, especially now that StainlessS showed me that ResampleAudio() is just as good as SSRC() ever since Ian re-wrote it. |
12th June 2022, 12:39 | #20 | Link | |
Moderator
Join Date: Feb 2005
Location: Spain
Posts: 6,890
|
I read the Resampler-Options, in ffmpeg docs, and the parameters not related with downmix, remap, async, soxr are:
Quote:
__________________
BeHappy, AviSynth audio transcoder. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|