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.

 

Go Back   Doom9's Forum > General > Audio encoding

Reply
 
Thread Tools Search this Thread Display Modes
Old 16th October 2019, 18:06   #1  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Sox and Avisynth+ r2772 issues

Hi there,
I've been using sox for quite some time in the past, however it's been a while since the last time I used it.
Today I needed it in order to upmix the audio of a 6 seconds bumper to append it at the very beginning of a Dolby 5.1 movie.
As always, I tried to use UpSoundOnSound() however Avisynth+ crashes with an error.

This is what it happens when I try to use it with the simplest script possible:

Code:
ColorBars(1920, 1080, pixel_type="YV24")
UpSoundOnSound()

Quote:
ffmpeg version N-93674-g1e01f66 Copyright (c) 2000-2019 the FFmpeg developers
[avisynth @ 052c9980] Stream #0: not enough frames to estimate rate; consider increasing probesize
Guessed Channel Layout for Input Stream #0.1 : 5.1
Input #0, avisynth, from 'C:\Documents and Settings\l\Desktop\FranceBB\Work and
Others\Encoding\AVS_
Script.avs':
Duration: 00:00:04.87, start: 0.000000, bitrate: 0 kb/s
Stream #0:0: Video: rawvideo (444P / 0x50343434), yuv444p, 1920x1080, 29.97
fps, 29.97 tbr, 29.97 tbn, 29.97 tbc
Stream #0:1: Audio: pcm_f32le, 48000 Hz, 5.1, flt, 9216 kb/s
Output #0, wav, to 'audiosplit/01.left.wav':
Metadata:
ISFT : Lavf58.27.103
Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 48000 Hz, 5.1, flt, 9
216 kb/s
Stream mapping:
Stream #0:1 -> #0:0 (copy)
Press [q] to stop, [?] for help
[avisynth @ 052c9980] SoxFilter: (filter) Could not restart filter:

filter: Unable to make high filter

Unknown error occurred
size= 188kB time=00:00:00.13 bitrate=11527.6kbits/s speed=2.14x
video:0kB audio:188kB subtitle:0kB other streams:0kB global headers:0kB muxing o
verhead: 0.059316%
AVSMeter doesn't report anything wrong with my filter configuration:

Quote:
VersionString: AviSynth+ 0.1 (r2772, MT, i386)
VersionNumber: 2.60
File / Product version: 0.1.0.0 / 0.1.0.0
Interface Version: 6
Multi-threading support: Yes
Avisynth.dll location: C:\WINDOWS\system32\avisynth.dll
Avisynth.dll time stamp: 2018-12-20, 12:06:26 (UTC)
PluginDir2_5 (HKLM, x86): C:\Programmi\AviSynth\plugins
PluginDir+ (HKLM, x86): C:\Programmi\AviSynth+\plugins+

[C 2.5 Plugins (32 Bit)]
AviSynth+\plugins+\ffms2.dll [2.30.0.0]
AviSynth\plugins\AVSShock.dll [2008-02-23]
AviSynth\plugins\yadif.dll [1.7.0.0]

[CPP 2.5 Plugins (32 Bit)]
AviSynth+\plugins+\flash3kyuu_deband.dll [2015-05-02]
AviSynth+\plugins+\VSFilter.dll [3.0.0.306]
AviSynth\plugins\_2DCleanYUY2_for_25.dll [0.0.0.10]
AviSynth\plugins\AdaptiveMedian.dll [2005-09-15]
AviSynth\plugins\AddGrainC.dll [1.7.1.0]
AviSynth\plugins\adjust.dll [2003-11-10]
AviSynth\plugins\AGC.dll [2006-09-10]
AviSynth\plugins\AllColors.dll [2005-12-30]
AviSynth\plugins\anisotools-26.dll [1.0.5.0]
AviSynth\plugins\Antiflicker.dll [2003-03-04]
AviSynth\plugins\ApplyEvery.dll [2005-07-30]
AviSynth\plugins\ArcFuns.dll [2011-10-26]
AviSynth\plugins\asharp.dll [0.9.5.0]
AviSynth\plugins\atc.dll [2003-01-18]
AviSynth\plugins\AudioLimiter.dll [2006-03-14]
AviSynth\plugins\AutoCrop.dll [2005-01-03]
AviSynth\plugins\AVCMatrices.dll [2005-10-30]
AviSynth\plugins\Average.dll [2007-12-16]
AviSynth\plugins\AviShader.dll [2004-12-28]
AviSynth\plugins\AvsFilterNet.dll [1.0.0.1]
AviSynth\plugins\avstp.dll [1.0.3.0]
AviSynth\plugins\badframes.dll [2.0.0.0]
AviSynth\plugins\bandremoval.dll [2013-01-03]
AviSynth\plugins\BassAudio.dll [2008-03-14]
AviSynth\plugins\Befa_for_25.dll [0.3.0.2]
AviSynth\plugins\bifrost.dll [2013-11-09]
AviSynth\plugins\blockbuster.dll [2003-02-04]
AviSynth\plugins\BT709ToBT601.dll [0.1.0.0]
AviSynth\plugins\CelBackground_23Sep05B.dll [2005-09-23]
AviSynth\plugins\ChromaShift.dll [2003-11-04]
AviSynth\plugins\cnr2.dll [2.6.1.0]
AviSynth\plugins\colormatrix.dll [2.6.0.0]
AviSynth\plugins\ContinuityFixer.dll [2015-05-15]
AviSynth\plugins\Convolution3DYV12.dll [1.0.0.5]
AviSynth\plugins\DctFilter_test.dll [0.0.1.5]
AviSynth\plugins\Deathray.dll [2016-07-28]
AviSynth\plugins\debicubic.dll [2013-08-31]
AviSynth\plugins\debilinear.dll [2012-07-25]
AviSynth\plugins\deblock.dll [1.2.0.0]
AviSynth\plugins\declick.dll [2003-04-27]
AviSynth\plugins\Decrawl.dll [0.5.1.0]
AviSynth\plugins\DeDup.dll [2004-11-07]
AviSynth\plugins\Deen.dll [2003-01-19]
AviSynth\plugins\defreq.dll [2006-04-28]
AviSynth\plugins\DeGrainMedian.dll [2018-08-13]
AviSynth\plugins\descratch.dll [1.1.0.0]
AviSynth\plugins\despot.dll [3.6.1.0]
AviSynth\plugins\dfttest.dll [1.9.4.0]
AviSynth\plugins\DGAVCDecode.dll [1.0.9.0]
AviSynth\plugins\DGDecode.dll [1.5.8.0]
AviSynth\plugins\Displace.dll [2011-11-16]
AviSynth\plugins\dither.dll [2015-12-30]
AviSynth\plugins\eDeen.dll [2003-01-19]
AviSynth\plugins\EEDI2.dll [0.9.2.0]
AviSynth\plugins\ExpLabo.dll [2006-02-21]
AviSynth\plugins\FFT3dGPU.dll [0.8.2.0]
AviSynth\plugins\FrameDbl.dll [0.0.9.1]
AviSynth\plugins\GamMac.dll [2017-08-22]
AviSynth\plugins\GamMatch.dll [2016-10-27]
AviSynth\plugins\Ghostbuster.dll [2012-03-02]
AviSynth\plugins\gradfun2db.dll [2006-03-15]
AviSynth\plugins\graintools.dll [1.0.1.0]
AviSynth\plugins\GRunT.dll [2008-09-27]
AviSynth\plugins\GScript.dll [2009-12-06]
AviSynth\plugins\GuavaComb.dll [2003-08-01]
AviSynth\plugins\HDRCore.dll [2016-06-21]
AviSynth\plugins\HDRMatrix.dll [2016-06-21]
AviSynth\plugins\HDRNoise.dll [2016-06-21]
AviSynth\plugins\HDRSharp.dll [2016-06-21]
AviSynth\plugins\hqdn3d.dll [2005-01-25]
AviSynth\plugins\Hqdn3dY.dll [2016-06-21]
AviSynth\plugins\LGhost.dll [0.3.0.1]
AviSynth\plugins\LMFlicker.dll [2004-10-08]
AviSynth\plugins\LSMASHSource.dll [2015-03-16]
AviSynth\plugins\medianblur.dll [0.8.4.1]
AviSynth\plugins\MosquitoNR.dll [2013-03-14]
AviSynth\plugins\MP_Pipeline.dll [2014-04-06]
AviSynth\plugins\MSharpen.dll [2003-04-08]
AviSynth\plugins\Multidecimate.dll [2016-06-02]
AviSynth\plugins\NicAudio.dll [2008-04-09]
AviSynth\plugins\PeachSmoother.dll [2003-08-01]
AviSynth\plugins\Perspective.dll [2008-08-23]
AviSynth\plugins\pop.dll [2004-10-06]
AviSynth\plugins\ReduceFlickerSSE3.dll [2005-09-15]
AviSynth\plugins\removeblend.dll [2006-04-06]
AviSynth\plugins\RemoveGrain.dll [2013-01-03]
AviSynth\plugins\Repair.dll [2005-05-01]
AviSynth\plugins\resamplehqx86.dll [1.0.0.7]
AviSynth\plugins\RSharpen.dll [2007-10-24]
AviSynth\plugins\SidSource.dll [2005-11-08]
AviSynth\plugins\SimpleResize.dll [0.3.3.0]
AviSynth\plugins\SoundOut.dll [1.1.1.0]
AviSynth\plugins\soxfilter.dll [2006-01-02]
AviSynth\plugins\SplineResize.dll [2009-09-12]
AviSynth\plugins\SSETools.dll [2005-04-11]
AviSynth\plugins\SSIM.dll [0.23.0.0]
AviSynth\plugins\svpflow1.dll [2.0.3.0]
AviSynth\plugins\svpflow2.dll [2.0.2.0]
AviSynth\plugins\TComb.dll [2.0.0.0]
AviSynth\plugins\TDeint.dll [1.1.0.0]
AviSynth\plugins\TMM.dll [1.0.0.0]
AviSynth\plugins\Toon-v1.1.dll [2008-08-24]
AviSynth\plugins\TUnsharp.dll [0.9.3.0]
AviSynth\plugins\unblend.dll [2003-06-06]
AviSynth\plugins\unblock.dll [1.0.0.0]
AviSynth\plugins\UnFilter.dll [0.0.1.5]
AviSynth\plugins\unsharpHQ_v05_x86.dll [2012-12-17]
AviSynth\plugins\VagueDenoiser.dll [0.35.1.0]
AviSynth\plugins\variableblur.dll [2012-05-24]
AviSynth\plugins\VerticalCleanerSSE2.dll [2008-02-28]
AviSynth\plugins\VScope.dll [2004-05-16]
AviSynth\plugins\WarpSharp.dll [2005-10-31]
AviSynth\plugins\zoom.dll [2005-01-22]

[CPP 2.6 Plugins (32 Bit)]
AviSynth+\plugins+\ConvertStacked.dll [2018-07-02]
AviSynth+\plugins+\DePan.dll [2.13.1.4]
AviSynth+\plugins+\DePanEstimate.dll [2.10.0.3]
AviSynth+\plugins+\DirectShowSource.dll [2018-07-02]
AviSynth+\plugins+\fft3dfilter.dll [2.5.0.0]
AviSynth+\plugins+\ImageSeq.dll [2018-07-02]
AviSynth+\plugins+\Info2.dll [2019-06-30]
AviSynth+\plugins+\masktools2.dll [2.2.18.0]
AviSynth+\plugins+\mvtools2.dll [2.7.41.0]
AviSynth+\plugins+\plugins_JPSDR.dll [3.1.0.0]
AviSynth+\plugins+\Shibatch.dll [2018-07-02]
AviSynth+\plugins+\TimeStretch.dll [2018-07-02]
AviSynth+\plugins+\VDubFilter.dll [2018-07-02]
AviSynth+\plugins+\vscube.dll [2018-08-16]
AviSynth\plugins\AutoAdjust.dll [2.6.0.0]
AviSynth\plugins\AvsMotion.dll [2014-07-21]
AviSynth\plugins\avss_26.dll [2.0.0.13]
AviSynth\plugins\checkmate.dll [2013-12-19]
AviSynth\plugins\DeNoise.dll [2015-11-22]
AviSynth\plugins\Dup.dll [2015-11-19]
AviSynth\plugins\eedi3.dll [0.9.2.1]
AviSynth\plugins\FQSharp.dll [2015-07-21]
AviSynth\plugins\fturn-26.dll [2016-06-14]
AviSynth\plugins\MDEC2_26.dll [2015-03-30]
AviSynth\plugins\Nirmalam.dll [2015-10-05]
AviSynth\plugins\RawSource26.dll [2013-08-25]
AviSynth\plugins\RgTools.dll [0.98.0.0]
AviSynth\plugins\RoboCrop26.dll [2016-06-14]
AviSynth\plugins\SangNom2.dll [2013-11-30]
AviSynth\plugins\ShowChannels26.dll [2015-03-30]
AviSynth\plugins\SmoothAdjust.dll [3.2.0.0]
AviSynth\plugins\TCPDeliver.dll [2.6.1.0]
AviSynth\plugins\TIVTC.dll [1.0.11.0]
AviSynth\plugins\xNLMeans.dll [2016-03-24]
AviSynth\plugins\yadifmod2.dll [2016-03-20]

[Scripts (AVSI)]
AviSynth+\plugins+\colors_rgb.avsi [2016-07-05]
AviSynth+\plugins+\FFMS2.avsi [2018-04-25]
AviSynth+\plugins+\LSFmod.avsi [2019-09-20]
AviSynth\plugins\AAA.avsi [2016-10-10]
AviSynth\plugins\AdaptDBMC_beta.avsi [2016-10-11]
AviSynth\plugins\AnimeIVTC.avsi [2016-10-14]
AviSynth\plugins\avss.avsi [2013-01-13]
AviSynth\plugins\BicubicSharp.avsi [2016-02-14]
AviSynth\plugins\blah.avsi [2015-01-11]
AviSynth\plugins\BlockKiller.avsi [2016-04-08]
AviSynth\plugins\blowup.avsi [2015-03-06]
AviSynth\plugins\blurH.avsi [2015-01-11]
AviSynth\plugins\Chroma_rep.avsi [2016-09-17]
AviSynth\plugins\ChromaRecostructor.avsi [2016-12-05]
AviSynth\plugins\ChubbyRain2.avsi [2015-11-30]
AviSynth\plugins\cmfull2.avsi [2016-04-06]
AviSynth\plugins\Cmx7Mod.avsi [2016-11-09]
AviSynth\plugins\colors_rgb.avsi [2015-03-30]
AviSynth\plugins\ContrastMask.avsi [2017-08-22]
AviSynth\plugins\daa.avsi [2016-06-14]
AviSynth\plugins\daa3.avsi [2016-06-14]
AviSynth\plugins\daa3mod.avsi [2016-06-14]
AviSynth\plugins\DDComb.avsi [2016-12-23]
AviSynth\plugins\deblend.avsi [2016-06-09]
AviSynth\plugins\Deblock_QED.avsi [2015-12-21]
AviSynth\plugins\Dehalo_alpha_MT2.avsi [2014-07-16]
AviSynth\plugins\DfttestMC.avsi [2016-12-23]
AviSynth\plugins\dither.avsi [2015-12-30]
AviSynth\plugins\Dmix5Dpl2.avsi [2018-04-08]
AviSynth\plugins\FastLineDarken 1.4x MT MOD.avsi [2012-04-10]
AviSynth\plugins\FilmGrain.avsi [2016-02-05]
AviSynth\plugins\FineSharp.avsi [2013-09-04]
AviSynth\plugins\FixBlendIVTC.avsi [2015-10-21]
AviSynth\plugins\FixChromaBleedingMod.avsi [2015-10-21]
AviSynth\plugins\FranceBB_DeHaloing.avsi [2015-12-21]
AviSynth\plugins\GradFun2DBmod.v1.5.avsi [2017-01-20]
AviSynth\plugins\GrainFactory3mod_v1.2.avsi [2012-04-06]
AviSynth\plugins\HDR-sources.avsi [2016-01-14]
AviSynth\plugins\HighlightLimiter.avsi [2017-08-22]
AviSynth\plugins\Hysteria.avsi [2013-08-27]
AviSynth\plugins\iip.avsi [2015-03-06]
AviSynth\plugins\InterFrame2.avsi [2015-05-21]
AviSynth\plugins\KenBurnsEffect.avsi [2015-09-06]
AviSynth\plugins\LCE.avsi [2017-08-22]
AviSynth\plugins\LineDarkenToon.avsi [2016-04-28]
AviSynth\plugins\LumaDB_v0.7.avsi [2012-04-06]
AviSynth\plugins\LUTDeCrawl-20081003.avsi [2015-09-06]
AviSynth\plugins\maa2.avsi [2016-06-14]
AviSynth\plugins\MCBob.avsi [2008-05-19]
AviSynth\plugins\MCLS_16.avsi [2016-10-16]
AviSynth\plugins\mfToon.avsi [2006-04-17]
AviSynth\plugins\mt_xxpand_multi.avsi [2010-09-11]
AviSynth\plugins\nnchromaupsubsampling.avsi [2017-10-28]
AviSynth\plugins\nnedi3_resize16_v3.3.avsi [2017-08-15]
AviSynth\plugins\NonlinUSM.avsi [2015-01-11]
AviSynth\plugins\PSharpen.avsi [2014-05-26]
AviSynth\plugins\QTGMC.avsi [2016-12-06]
AviSynth\plugins\ReCon.avsi [2013-09-04]
AviSynth\plugins\Remation.avsi [2016-10-10]
AviSynth\plugins\RemoveDirt.avsi [2016-10-10]
AviSynth\plugins\ResizersPack4.5.avsi [2015-09-21]
AviSynth\plugins\ResizeX_v1.0.1.avsi [2016-10-10]
AviSynth\plugins\RKS.avsi [2015-08-30]
AviSynth\plugins\s_ExLogo.avsi [2010-09-15]
AviSynth\plugins\SeeSaw.avsi [2013-09-04]
AviSynth\plugins\SharpenComplex2.avsi [2015-01-11]
AviSynth\plugins\SlowMo.avsi [2016-12-06]
AviSynth\plugins\SMDegrain.avsi [2016-12-23]
AviSynth\plugins\SoundONSound.avsi [2016-05-19]
AviSynth\plugins\Srestore.avsi [2015-10-21]
AviSynth\plugins\Stabilization Tools Pack v2.1.avsi [2015-09-16]
AviSynth\plugins\TemporalDegrain.avsi [2016-10-10]
AviSynth\plugins\TextSub16 v1.1.avsi [2017-09-06]
AviSynth\plugins\TGMCmod.avsi [2010-01-05]
AviSynth\plugins\upaction.avsi [2016-05-19]
AviSynth\plugins\UpDialog.avsi [2016-05-19]
AviSynth\plugins\UpFarina.avsi [2016-05-19]
AviSynth\plugins\UpGerzen.avsi [2016-05-19]
AviSynth\plugins\UpMultisonic.avsi [2016-05-19]
AviSynth\plugins\VideoTek.avsi [2018-07-21]
AviSynth\plugins\Vinverse.avsi [2009-02-20]
AviSynth\plugins\VinverseD.avsi [2009-02-20]
AviSynth\plugins\vmToon-v0.74.avsi [2006-01-21]
AviSynth\plugins\Zoom.avsi [2015-09-06]
AviSynth\plugins\zzz_denoise.avsi [2016-04-08]

[Uncategorized DLLs (32 Bit)]
AviSynth\plugins\AvsRecursion.dll [2005-09-13]
AviSynth\plugins\bass.dll [2.4.4.0]
AviSynth\plugins\bass_aac.dll [2.4.2.0]
AviSynth\plugins\bass_ac3.dll [2.4.0.2]
AviSynth\plugins\bass_alac.dll [2.4.1.0]
AviSynth\plugins\bass_ape.dll [2.4.0.4]
AviSynth\plugins\bass_cda.dll [2.4.2.0]
AviSynth\plugins\bass_flac.dll [2.4.0.3]
AviSynth\plugins\bass_midi.dll [2.4.4.1]
AviSynth\plugins\bass_mpc.dll [2.4.1.0]
AviSynth\plugins\bass_ofr.dll [2.4.0.2]
AviSynth\plugins\bass_spx.dll [2.4.0.0]
AviSynth\plugins\bass_tta.dll [2.4.0.0]
AviSynth\plugins\bass_wma.dll [2.4.3.0]
AviSynth\plugins\bass_wv.dll [2.4.1.3]
AviSynth\plugins\ILUT.dll [0.1.7.8]
AviSynth\plugins\libfaac.dll [2010-05-25]
AviSynth\plugins\libmfxsw32.dll [7.15.10.28]
AviSynth\plugins\libsndfile-1.dll [2006-08-31]
AviSynth\plugins\OptimFROG.dll [1.2.0.0]

[Uncategorized files]
AviSynth+\plugins+\ffmsindex.exe [2.30.0.0]
AviSynth\plugins\addgrain.avs [2011-10-27]
AviSynth\plugins\iSharpenMD.avs [2017-01-10]
AviSynth\plugins\K-mfToon.avs [2003-06-16]
AviSynth\plugins\MP_Pipeline.dll.slave.exe [2014-04-06]
AviSynth\plugins\record.txt [2018-08-21]
AviSynth\plugins\srestore.avs [2009-11-18]
This happens both on my Windows XP x86 machine and on my Windows 7 Enterprise x64 machine, both running the same version of Avisynth+ x86.
Is it only me that it's facing this problem or is it an Avisynth+ bug/incompatibility with sox?
FranceBB is offline   Reply With Quote
Old 16th October 2019, 20:04   #2  |  Link
Emulgator
Big Bit Savings Now !
 
Emulgator's Avatar
 
Join Date: Feb 2007
Location: close to the wall
Posts: 1,531
I see lots of plugins, maybe try to rename existing plugin folder away and try with only necessary plugins.
Then I would try Assumefps().

Then I would try upmixing using internal AviSynth functions.

Or Jenyok's function itself: this is the old version, you may have to adapt "GetLeft.../GetRight" to channel numbers 1 and 2
Code:
# STEREO to 5.1 audio convertion
#
function UpSoundOnSound(clip clp)
{
# Sound On Sound Profile
# SOS approach Profile with 20ms delay and some attenuation on surround

  a    = KillVideo(clp)
  back = a.soxfilter("filter 100-7000")
  fl   = a.GetLeftChannel()
  fr   = a.GetRightChannel()
  cc   = mixaudio(a.GetRightChannel(), a.GetLeftChannel(), 0.5, 0.5)
  lfe  = ConvertToMono(a).SoxFilter("lowpass 120", "vol -0.5")
  sl   = mixaudio(back.GetLeftChannel(),  back.GetRightChannel(), 0.668, -0.668)
  sr   = mixaudio(back.GetRightChannel(), back.GetLeftChannel(),  0.668, -0.668)
  sl   = DelayAudio(sl, 0.02)
  sr   = DelayAudio(sr, 0.02)

  return (MergeChannels(fl, fr, cc, lfe, sl, sr))
}
I found only an old stereo4.avsi where the location of sox is hardcoded "C:\PROGRAM FILES\AVISYNTH 2.5\PLUGINS\SOXFILTER_11\soxfilter.dll")
and I don't have that folder anymore since I am switching AviSynth versions anyway with Groucho's tool.
__________________
"To bypass shortcuts and find suffering...is called QUALity" (Die toten Augen von Friedrichshain)
"Data reduction ? Yep, Sir. We're that issue working on. Synce invntoin uf lingöage..."

Last edited by Emulgator; 16th October 2019 at 20:13.
Emulgator is offline   Reply With Quote
Old 17th October 2019, 09:34   #3  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
Quote:
Originally Posted by Emulgator View Post
...and I don't have that folder anymore...
SoxFilter can be downloaded here: https://forum.doom9.org/showthread.p...154#post761154

EDIT:
Seems than SoxFilter don't work with Avs+, this script:
Quote:
ColorBars(1920, 1080, pixel_type="YV24").Assumefps(25).Trim(0,9999)
a = KillVideo()
fl = a.GetLeftChannel()
fr = a.GetRightChannel()
cc = mixaudio(fl, fr, 0.5, 0.5)
lfe = ConvertToMono(a).SoxFilter("lowpass 120", "vol -0.5")
back = a.SoxFilter("filter 100-7000")
#lfe = ConvertToMono(a).Amplify(0.5)
#back = a.Amplify(0.7)
sl = mixaudio(back.GetLeftChannel(), back.GetRightChannel(), 0.668, -0.668)
sr = mixaudio(back.GetRightChannel(), back.GetLeftChannel(), 0.668, -0.668)
sl = DelayAudio(sl, 0.02)
sr = DelayAudio(sr, 0.02)
MergeChannels(fl, fr, cc, lfe, sl, sr)
SoundOut()
Crash with Avs+ 32bits but work with AviSynth 2.60.
Without SoxFilter (the commented lines) work fine.
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 17th October 2019 at 10:24. Reason: Add info
tebasuna51 is offline   Reply With Quote
Old 2nd December 2022, 14:18   #4  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,883
Has there been any progress on getting SoxFilter working in the new Avisynth+?
'cause in the current version of Avisynth+ it's still broken.
I have to upmix some stuff that I have to send to a cinema and I don't really feel like using ConverttoMono().Amplify() for LFE, 'cause that would honestly create A LOT of basses.



As result, I've temporarily killed LFE.
It's better not to send anything than to send non low pass filtered frequencies...

Code:
a = last
fl = a.GetLeftChannel()
fr = a.GetRightChannel()
cc = mixaudio(fl, fr, 0.5, 0.5)
lfe = ConvertToMono(a).Normalize(0.00)
back = a.Amplify(0.7)
sl = mixaudio(back.GetLeftChannel(), back.GetRightChannel(), 0.668, -0.668)
sr = mixaudio(back.GetRightChannel(), back.GetLeftChannel(), 0.668, -0.668)
sl = DelayAudio(sl, 0.02)
sr = DelayAudio(sr, 0.02)
MergeChannels(fl, fr, cc, lfe, sl, sr)


Last edited by FranceBB; 2nd December 2022 at 14:27.
FranceBB is offline   Reply With Quote
Old 2nd December 2022, 16:51   #5  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Have you tried the x64 version: https://forum.doom9.org/showthread.php?t=181566 ? tebasuna51 says it works.
Reel.Deel is offline   Reply With Quote
Old 2nd December 2022, 19:02   #6  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 6,890
With soxfilter.dll v64 bits the same error hapen:

Quote:
SoxFilter: (filter) Could not restart filter:

filter: Unable to make high filter
But there are a workaround. The original code in function:

Code:
  back = a.soxfilter("filter 100-7000")
  fl   = a.GetLeftChannel()
  fr   = a.GetRightChannel()
  cc   = mixaudio(a.GetRightChannel(), a.GetLeftChannel(), 0.5, 0.5)
  lfe  = ConvertToMono(a).SoxFilter("lowpass 120", "vol -0.5")
  sl   = mixaudio(back.GetLeftChannel(),  back.GetRightChannel(), 0.668, -0.668)
  sr   = mixaudio(back.GetRightChannel(), back.GetLeftChannel(),  0.668, -0.668)
  sl   = DelayAudio(sl, 0.02)
  sr   = DelayAudio(sr, 0.02)

  return (MergeChannels(fl, fr, cc, lfe, sl, sr))
replaced with:
Quote:
back = a#.soxfilter("filter 100-7000")
fl = a.GetLeftChannel()
fr = a.GetRightChannel()
cc = mixaudio(a.GetRightChannel(), a.GetLeftChannel(), 0.5, 0.5)
lfe = ConvertToMono(a).SoxFilter("lowpass 120", "vol -0.5")
sl = mixaudio(back.GetLeftChannel(), back.GetRightChannel(), 0.668, -0.668)
sr = mixaudio(back.GetRightChannel(), back.GetLeftChannel(), 0.668, -0.668)
sl = DelayAudio(sl, 0.02).soxfilter("filter 100-7000")
sr = DelayAudio(sr, 0.02).soxfilter("filter 100-7000")

return (MergeChannels(fl, fr, cc, lfe, sl, sr))
work fine.

Seems the sox high filter does not support multichannel audio (with avs+) maybe because the know issue:
Quote:
* If one filter doesn't support multichannel audio the entire chain is converted to mono filters, this might affect some filters like "earwax". Use multiple filter instaces instead.
Of course I recommend send a empty lfe, for instance:

lfe = fl.Amplify(0.0)

Also never use Normalize() with sox filters, it need 2 pass and restart the filters can cause troubles.

Use the ffmpeg filters instead avisynth for the upmix. I can recommed:

ffmpeg.exe" -i "input 2.0" -af "surround=lfe_out=0" -acodec pcm_f32le "output 5.1"
__________________
BeHappy, AviSynth audio transcoder.

Last edited by tebasuna51; 3rd December 2022 at 01:40. Reason: Add info
tebasuna51 is offline   Reply With Quote
Old 2nd December 2022, 19:15   #7  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by tebasuna51 View Post
With soxfilter.dll v64 bits the same error hapen:...
Ahh thanks for the info. I saw in the x64 thread that you linked back to this thread and said it worked with the sample here so I assumed it was fine.
Reel.Deel is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:29.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.