BestAudioSource

From Avisynth wiki
(Difference between revisions)
Jump to: navigation, search
m (Description)
(r1 update, remove dead links)
 
(9 intermediate revisions by one user not shown)
Line 1: Line 1:
{{FilterCat|External_filters|Plugins_x64|Source_filters}}
+
{{FilterCat4|External_filters|Plugins|Plugins_x64|Source_filters}}
 
{{Filter3
 
{{Filter3
 
|1={{Author/Myrsloik}}
 
|1={{Author/Myrsloik}}
|2=test3
+
|2=r1
|3=[https://www.dropbox.com/s/cl5nudu1bud2nct/bestaudiosource-test3.7z?dl=1 bestaudiosource-test3.7z]
+
|3=[https://github.com/vapoursynth/bestaudiosource/releases bas-r1.7z]
 
|4=Source filters  
 
|4=Source filters  
|5=Open source
+
|5=[https://github.com/vapoursynth/bestaudiosource/blob/master/COPYING MIT]
 
|6=[https://forum.doom9.org/showthread.php?t=177337 Doom9 Thread]}}
 
|6=[https://forum.doom9.org/showthread.php?t=177337 Doom9 Thread]}}
  
 
== Description ==
 
== Description ==
A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth+. No indexing required and only available in 64-bit.
+
A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth. No indexing is required.
 
<br>
 
<br>
 
<br>
 
<br>
  
 
== Requirements ==
 
== Requirements ==
* [x64] [[AviSynth+]]
+
* [x86]: [[AviSynth+]] or [https://sourceforge.net/projects/avisynth2/ AviSynth 2.6]
 +
* [x64]: [[AviSynth+]]
  
 
<br>
 
<br>
  
 
== [[Script variables|Syntax and Parameters]] ==
 
== [[Script variables|Syntax and Parameters]] ==
:{{Template:FuncDef|BestAudioSource (string "source", int "track", int "adjustdelay", bool "exactsamples", string "varprefix")}}
+
:{{Template:FuncDef|BestAudioSource (string "source", int "track", int "adjustdelay", bool "exactsamples", bool "enable_drefs", bool "use_absolute_path", float "drc_scale", string "varprefix")}}
 
<br>
 
<br>
 
::{{Par2|source|string| }}
 
::{{Par2|source|string| }}
Line 28: Line 29:
 
<br>
 
<br>
 
::{{Par2|adjustdelay|int|-1}}
 
::{{Par2|adjustdelay|int|-1}}
:::Delay adjustment.
+
:::Delay adjustment; not yet implemented.
 
<br>
 
<br>
 
::{{Par2|exactsamples|bool|false}}
 
::{{Par2|exactsamples|bool|false}}
 
:::Set to true if you want opening files to be really slow but for some reason need a completely sample exact length.
 
:::Set to true if you want opening files to be really slow but for some reason need a completely sample exact length.
 +
<br>
 +
::{{Par2|enable_drefs|bool|false}}
 +
:::Enable loading of external tracks, disabled by default.
 +
<br>
 +
::{{Par2|use_absolute_path|bool|false}}
 +
:::Allows loading of external tracks via absolute paths, disabled by default.
 +
<br>
 +
::{{Par2|drc_scale|float|0.0}}
 +
:::Dynamic Range Scale Factor. The factor to apply to dynamic range values from the AC-3 stream. This factor is applied exponentially.
 +
:::The default value is 0. There are 3 notable scale factor ranges:
 +
:::*<code>drc_scale == 0</code> <br> DRC disabled. Produces full range audio.
 +
:::*<code>0 < drc_scale <= 1</code> <br> DRC enabled. Applies a fraction of the stream DRC value. Audio reproduction is between full range and full compression.
 +
:::*<code>drc_scale > 1</code> <br> DRC enabled. Applies drc_scale asymmetrically. Loud sounds are fully compressed. Soft sounds are enhanced.
 
<br>
 
<br>
 
::{{Par2|varprefix|string|""}}
 
::{{Par2|varprefix|string|""}}
:::
+
:::Works the same as [[FFMS2]].
 +
:::*<code>"BASCHANNEL_LAYOUT"
 +
:::*"BASVALID_BITS"</code>
 
<br>
 
<br>
  
 
== Examples ==
 
== Examples ==
  BestAudioSource("blah.ac3", track=-1, adjustdelay=-1, exactsamples=false, varprefix="")
+
  BestAudioSource("blah.mp4", track=-1, adjustdelay=-1, exactsamples=false, enable_drefs=false, use_absolute_path=false, drc_scale=0)
 
<br>
 
<br>
 +
 
== Changelog ==
 
== Changelog ==
 
  Version        Date            Changes<br>
 
  Version        Date            Changes<br>
 +
r1            2021/09/11      - First release. Everything except automatic delay adjustment implemented.
 +
test8          2021/08/17      - Updated with several new options, including drc_scale.
 +
test7          2020/08/02      - VapourSynth: update for V4 api again; fixed all known bugs and should be fairly stable
 +
test6          2020/06/23      - Fixes clips with more than 2^31 samples in VS and adds 24 bit output to AviSynth.
 +
test5          2020/06/13      - Properly export the number of bits per sample
 +
test4          2020/06/09      - Update for latest audio api revision
 
  test3          2020/01/26      - Fixes the channel mask variable that was previously almost always wrong in AviSynth.
 
  test3          2020/01/26      - Fixes the channel mask variable that was previously almost always wrong in AviSynth.
 
                                 - Also add VapourSynth support.
 
                                 - Also add VapourSynth support.
Line 47: Line 70:
 
  test1          2020/01/07      - Initial release
 
  test1          2020/01/07      - Initial release
 
<br>
 
<br>
 +
== Archived Downloads ==
 +
{| class="wikitable" border="1"; width="700px"
 +
|-
 +
!!width="100px"| Version
 +
!!width="200px"| Download
 +
!!width="200px"| Mirror
 +
|-
 +
!test8
 +
|[https://www.dropbox.com/s/6a65wt49r7fck15/BestAudioSource-test8.7z?dl=1 BestAudioSource-test8.7z]
 +
|
 +
|}
 +
<br>
 +
 
== External Links ==
 
== External Links ==
 
*[https://github.com/vapoursynth/bestaudiosource GitHub] - Source code repository.
 
*[https://github.com/vapoursynth/bestaudiosource GitHub] - Source code repository.

Latest revision as of 05:15, 12 September 2021

Abstract
Author Myrsloik
Version r1
Download bas-r1.7z
Category Source filters
License MIT
Discussion Doom9 Thread

Contents

[edit] Description

A new sample accurate but somewhat slow FFmpeg based audio source filter for AviSynth. No indexing is required.

[edit] Requirements


[edit] Syntax and Parameters

BestAudioSource (string "source", int "track", int "adjustdelay", bool "exactsamples", bool "enable_drefs", bool "use_absolute_path", float "drc_scale", string "varprefix")


string  source =
Path to audio file. Path can be omitted if the script is in the same folder as the audio file.


int  track = -1
Positive track numbers refer to the FFmpeg given stream number. Negative numbers refer to the nth audio track with -1 being the first.


int  adjustdelay = -1
Delay adjustment; not yet implemented.


bool  exactsamples = false
Set to true if you want opening files to be really slow but for some reason need a completely sample exact length.


bool  enable_drefs = false
Enable loading of external tracks, disabled by default.


bool  use_absolute_path = false
Allows loading of external tracks via absolute paths, disabled by default.


float  drc_scale = 0.0
Dynamic Range Scale Factor. The factor to apply to dynamic range values from the AC-3 stream. This factor is applied exponentially.
The default value is 0. There are 3 notable scale factor ranges:
  • drc_scale == 0
    DRC disabled. Produces full range audio.
  • 0 < drc_scale <= 1
    DRC enabled. Applies a fraction of the stream DRC value. Audio reproduction is between full range and full compression.
  • drc_scale > 1
    DRC enabled. Applies drc_scale asymmetrically. Loud sounds are fully compressed. Soft sounds are enhanced.


string  varprefix = ""
Works the same as FFMS2.
  • "BASCHANNEL_LAYOUT"
  • "BASVALID_BITS"


[edit] Examples

BestAudioSource("blah.mp4", track=-1, adjustdelay=-1, exactsamples=false, enable_drefs=false, use_absolute_path=false, drc_scale=0)


[edit] Changelog

Version        Date            Changes
r1 2021/09/11 - First release. Everything except automatic delay adjustment implemented. test8 2021/08/17 - Updated with several new options, including drc_scale. test7 2020/08/02 - VapourSynth: update for V4 api again; fixed all known bugs and should be fairly stable test6 2020/06/23 - Fixes clips with more than 2^31 samples in VS and adds 24 bit output to AviSynth. test5 2020/06/13 - Properly export the number of bits per sample test4 2020/06/09 - Update for latest audio api revision test3 2020/01/26 - Fixes the channel mask variable that was previously almost always wrong in AviSynth. - Also add VapourSynth support. test2 2020/01/08 - Fixed output and new parameter "exactsamples" test1 2020/01/07 - Initial release


[edit] Archived Downloads

Version Download Mirror
test8 BestAudioSource-test8.7z


[edit] External Links

  • GitHub - Source code repository.




Back to External Filters

Personal tools