Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: new input plugin - foo_input_avs (beta!) (Read 25006 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

new input plugin - foo_input_avs (beta!)



get it here

Warning! It's beta!

Licence problem discussed and solved here

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.

new input plugin - foo_input_avs (beta!)

Reply #2
Thanks, you are hero!

Works as expected. New playground

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.

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

new input plugin - foo_input_avs (beta!)

Reply #5
Could we have a pack with the audio plugins for avisynth?

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.

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

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.

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?

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.

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.

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.

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.

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.

 

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).


Re: new input plugin - foo_input_avs (beta!)

Reply #18
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.

I know this thread's a bit old but I came here trying to solve a problem.

I was just trying to understand why an Avisynth 32 bit float output is displayed as 24 bit in foobar2000, and if it's really 24 bit.
I'm decoding some stereo AC3 in an MKV via DirectShowSource and forcing ffdshow to decode and output 32 bit float. Even if I let ffdshow choose the output format (by keeping all the options checked) it still outputs 32 bit float, so I guess that's what Avisynth asks for.



When I open that script in foobar2000, right click and select properties, it's shown as being 24 bit.

If I add the following to the script, foobar2000 reports it as being 32 bit.
ConvertAudioTo32bit()
So 32 bit interger is fine, but when I add the following to the script, foobar2000 is back to displaying 24 bit again.
ConvertAudioTo32bit()
ConvertAudioToFloat()

Is the above expected behaviour?

Thanks.

PS I'm using foo_input_avs version 0.4

Re: new input plugin - foo_input_avs (beta!)

Reply #19
Whoops. That was a holdover from the original developer, who apparently had no idea how to handle floating point samples. It has been fixed to support floating point directly.

Re: new input plugin - foo_input_avs (beta!)

Reply #20
That's what I call service! :)

Thank you!

A question while I'm here.... would you happen to know if there's a way to get foobar2000 to show whether the source is integer or floating point? Either way it just displays 32 bit in the properties menu.

Thanks again.

Re: new input plugin - foo_input_avs (beta!)

Reply #21
Either way, it's 32 bit floating point coming out of the plugin. Which means if you're outputting 32 bit integer, it's getting truncated somehow. I suppose it would be handy to know when that's happening, though.

Re: new input plugin - foo_input_avs (beta!)

Reply #22
This thread is not linked on its official component page as "Discussion", as it's the case for other components.

And, nowadays, there's AviSynth+, of which there are 64-bit versions. I have it installed and, unfortunately, foo_input_avs crashes Foobar2000 when I try to play .avs files.

Re: new input plugin - foo_input_avs (beta!)

Reply #23
This AVISynth plugin cannot work with 64 bit AVISynth. It will never work with that. And it will probably not work with any "new" version with a completely different API.