Skip to main content

Topic: new input plugin - foo_input_avs (beta!) (Read 18110 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • dimzon
  • [*][*][*]
  • Banned
new input plugin - foo_input_avs (beta!)


get it here

Warning! It's beta!

Licence problem discussed and solved here

  • kode54
  • [*][*][*][*][*]
  • Administrator
new input plugin - foo_input_avs (beta!)
Reply #1
I've recompiled this component with a more recent SDK, plus some minor changes such as allocation guarding and variable sizes. Please test.

The component is available here.
  • Last Edit: 30 July, 2009, 01:59:21 AM by kode54

  • 2E7AH
  • [*][*][*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #2
Thanks, you are hero!

Works as expected. New playground

  • kode54
  • [*][*][*][*][*]
  • Administrator
new input plugin - foo_input_avs (beta!)
Reply #3
I noticed there's a hitch with relative paths in the scripts, which seem to depend on the current working directory of the process. I'm not sure there's any way I can tell AviSynth how to correctly resolve relative paths.

The reason for this problem is that it uses the Eval function on the loaded script, rather than passing the path to the Import function, which would not support Unicode paths, but would tell AviSynth how to resolve relative paths.

I suppose I can limit it to supporting only ANSI paths, since the script functions that accept paths already have the same limitation. I'll post about it if I decide to make this change.
  • Last Edit: 30 July, 2009, 02:31:18 AM by kode54

  • 2E7AH
  • [*][*][*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #4
To translate that: even if avs script file is in folder as the source it refers, you must use absolute path for source i.e. DirectShowSource("D:\VIDEO_TS\VTS_01_1.VOB") - full path

I've tested it with every possible avisynth plugin that I have, and it's just great
Some random freezing like the one with reletive paths, but then on portable install everything is OK

I can only suggest that in properties dialog (AVISYNTH SCRIPT tag) we could access the script (change/save)

And, I can only encourage you about paths, because all players with avisynth support don't have this problem

  • servimo
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #5
Could we have a pack with the audio plugins for avisynth?

  • kode54
  • [*][*][*][*][*]
  • Administrator
new input plugin - foo_input_avs (beta!)
Reply #6
I've updated to 0.2, downloadable here.

Now relative paths work properly, although it will only accept local unpacked files with valid ANSI paths.
It also supports script editing through the normal file properties dialog. You'll probably want to configure "AviSynth script" as a multi-line tag in the Advanced Preferences dialog.

  • 2E7AH
  • [*][*][*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #7
Thanks for improvements, but I probably did poorly testing yesterday:

foobar (portable - no other components) crashes too ofter and continuously at least here:

DirectShowSource with AC3Filter (I use it as DS filter, don't know if it's related to it)
ffmpegSource
QTInput

Other players don't have problems, i.e. VirtualDub, MPC...

I'll test more with other plugins later

  • Natsuki
  • [*]
new input plugin - foo_input_avs (beta!)
Reply #8
I'm not sure, is there any real use of AviSynth scripts in an audio player?
But anyway, it works great as DirectShow wrapper (unlike foo_input_ds which won't play some files), so maybe it's better to let it handle some user defined filetypes, putting filenames into simple script (DirectShowSource(blah) or whatever) without requiring user to do it manually.

  • acmodeu
  • [*][*]
new input plugin - foo_input_avs (beta!)
Reply #9
Thanks for the plugin, I find it very useful. Why there are some clipping sounds when listening to vobs?

  • kode54
  • [*][*][*][*][*]
  • Administrator
new input plugin - foo_input_avs (beta!)
Reply #10
Probably because AviSynth is limited to outputting integer sample formats, so there will always be clipping on loud files. Unless you can point out where the programming interface can request floating point sample formats.

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #11
Initially I was using WavSource("Sample.wav") for a simple 44.1Khz,16bit,stereo sample, but even after replacing it with NicAudio's RaWavSource("Sample.wav", SampleRate=44100, SampleBits=16, Channels=2), foo_input_avs always seems to output a 24bit audio stream.
Is this meant to be, or is it bug? Of course I can bring it back to 16bit in Foobar's Converter setup (if I don't, the converted output will also be 24bit), but 16bit -> 24bit -> 16bit obviously is undesirable! At least I can't believe the end result is still lossless.
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • Rollin
  • [*][*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #12
16bit -> 24bit -> 16bit obviously is undesirable! At least I can't believe the end result is still lossless.


You can convert with foobar 16bit -> 24bit -> 16bit and then bit-compare files. It is lossless.

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #13
I didn't have this bit-compare plugin yet, but after I installed it and made a comparison, I can confirm it's lossless indeed. I guess in that case I can confidently do conversions. I still find it weird though foo_input_avs puts out 24bit audio streams.
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #14
Bug report:

note 1. The fastest way to get all the needed Avisynth plugins is to install BeHappy and copy the whole plugins directory (which also happens to include NicAudio) to your Avisynth plugins directory.
note 2. I couldn't open lossless audio files (FLAC,WV,APE,...) with BassAudioSource() in combination with foo_input_avs in Foobar at this time.
I've done some more testing with BassAudioSource() in combination with foo_input_avs and I'd like to revise my quoted statements. It seems foo_input_avs has some more shortcomings...

- When you've copied BeHappy's entire plugins directory (BassAudio.dll, bass.dll and bass_xxx.dll) to your Avisynth's plugins directory, foo_input_avs (and Foobar) will crash immediately upon playing anything through Avisynth! It will also even crash when trying to play an audio file with WavSource() or NicAc3Source() through Avisynth. Simply the presence of BassAudio.dll and bass.dll in Avisynth's plugins directory will crash Foobar upon playing anything through Avisynth. It seems foo_input_avs doesn't like non-Avisynth libraries (bass.dll and bass_xxx.dll) in Avisynth's plugins directory.

- foo_input_avs having its way, we can of course load BassAudio.dll from elsewhere: Loadplugin("X:\BeHappy 0.2.5.30809\plugins\BassAudio.dll"). This will let BassAudio.dll load bass.dll (WAV/AIFF/MP3/MP2/MP1/OGG)1 but somehow NONE of the other bass_xxx.dlls (AAC/M4A/WMA/FLAC/WV/APE/etc)! Dragging an avs-file with BassAudioSource("Sample.flac") into Foobar won't even load.
1 bass.dll also supports Tracker Audio (MOD/IT/XM/etc), but not through Avisynth. I guess Avisynth is limited to sample audio.

All of this happens because of foo_input_avs. Converting an audio file through Avisynth (no matter the ...Source()) with BeHappy works just fine. Playing the avs-file with Media Player Classic works fine too.

So to sum up...
If you want to convert audio files through Avisynth with Foobar, DON'T copy the content of BeHappy's plugins directory to Avisynth's plugin directory! Use Loadplugin("X:\BeHappy 0.2.5.30809\plugins\BassAudio.dll") instead. But even then, you have to settle for WAV/AIFF/MP3/MP2/MP1/OGG support only as far as BassAudio is concerned. Want to convert from FLAC for instance through Avisynth, use BeHappy.
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #15
I'm sorry, kode54, but in the end it turned out the old version of Foobar I was still using was the culprit
Foobar has no problem now opening Bass audio formats through BassAudio and foo_input_avs. Sorry for the trouble, kode54.
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #16
kode54, is it possible to add an option so the plugin won't add the <AVISYNTH SCRIPT> field?
I just did some conversions with an Avisynth-script with A LOT of text, and this all ends up in the tag. Have a look at MPC-HC's MediaInfo Properties-tab and you see this *ugh*:


That, or something like the screenshot in [a href='index.php?act=findpost&pid=373309']Post #1[/a] I would really welcome (which I assume has been removed at some point).
DC-Bass Source Mod: http://reino.degeelebosch.nl

  • CoRoNe
  • [*][*][*]
new input plugin - foo_input_avs (beta!)
Reply #17
Could you please have a look, kode54?
DC-Bass Source Mod: http://reino.degeelebosch.nl