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. |
21st March 2021, 09:38 | #1 | Link |
Registered User
Join Date: Aug 2020
Posts: 33
|
Sound Support for VapourSynth Linux
Hi, people.
Just a short history before my question. I have been using AviSynth/AviSynth+ on Windows quite heavily with Audacity being my sound editor and VirtualDub - a renderer. At some point I fully switched to Linux (currently it's ArchLinux). So I did my research and started using Vapoursynth. One thing I noticed at the time is that Vapoursynth did not have sound support (otherwise works like a charm). So I had to render all clips, then use ffmpeg to overlay them with the combined sound. Recently I did my research again and on Vapoursynth site it mentions built-in sound support (via a plugin)! But... it seems it is for Windows only: https://forum.doom9.org/showthread.php?t=177623. Am I correct in this? Trying to use vs.core.damb.Read() seems to have no effect, i.e. at does not attach sound to video, though does not fail either. What would be the reason for that? Thanks for any help in advance. |
21st March 2021, 12:45 | #2 | Link |
Registered User
Join Date: Jun 2010
Posts: 91
|
You should take a look at this thread: https://forum.doom9.org/showthread.php?t=177623
|
21st March 2021, 19:03 | #4 | Link | |
unsigned int
Join Date: Oct 2012
Location: 🇪🇺
Posts: 760
|
Quote:
2) How do you determine that it doesn't work?
__________________
Buy me a "coffee" and/or hire me to write code! |
|
23rd March 2021, 17:44 | #6 | Link |
Registered User
Join Date: Aug 2020
Posts: 33
|
Thanks! Do I compile it from here: https://github.com/vapoursynth/bestaudiosource? What is needed for it to compile? There are no instructions there :-)
|
24th March 2021, 19:19 | #8 | Link |
Registered User
Join Date: Aug 2020
Posts: 33
|
A couple of notes:
1) I found "VapourSynth4.h" (included in "vapoursynth.cpp") only in "doodle1" branch of "vapoursynth/vapoursynth" on git (and manually copied it into /usr/include/vapoursynth/) 2) The source then would not compile with an error: "../src/vapoursynth.cpp:89:115: error: ‘nfMakeLinear’ was not declared in this scope" Looking at VapourSynth.h vs VapourSynth4.h, I discovered the following: typedef enum VSNodeFlags { nfNoCache = 1, nfIsCache = 2, nfMakeLinear = 4 /* api 3.3 */ } VSNodeFlags; vs typedef enum VSNodeFlags { nfNoCache = 1 } VSNodeFlags; So I copied the corresponding line to "VapourSynth4.h" 3) And the main thing. "libbestsourceaudio.so" got built now, I copied it into /usr/lib/vapoursynth/, but still got a script error: "No attribute with the name bas exists. Did you mistype a plugin namespace?" So I tried to load the plugin explicilty by: vs.core.std.LoadPlugin("/usr/lib/vapoursynth/libbestaudiosource.so") And the response was "vapoursynth.Error: No entry point found in /usr/lib/vapoursynth/libbestaudiosource.so" What do I try now? Thanks |
25th March 2021, 17:55 | #10 | Link |
Registered User
Join Date: Aug 2020
Posts: 33
|
Better and worse :-)
I still needed to add the line in bold for BAS to compile typedef enum VSNodeFlags { nfNoCache = 1, nfMakeLinear = 4 } VSNodeFlags BAS now loads, but I get: File "src/cython/vapoursynth.pyx", line 2542, in vapoursynth.Function.__call__ vapoursynth.Error: Filter Source specified unknown flags If I don't add the line above, I need to change bestaudiosource/vapoursource.cpp, line 89 from vsapi->createAudioFilter(out, "Source", &D->AI, 1, BestAudioSourceGetFrame, BestAudioSourceFree, fmUnordered, nfMakeLinear, D, core); to vsapi->createAudioFilter(out, "Source", &D->AI, 1, BestAudioSourceGetFrame, BestAudioSourceFree, fmUnordered, nfNoCache, D, core); since nfNoCache is the only flag available in V4. Now it even starts rendering for a second, but then exists with the following: [file] Reading from stdin... (+) Video --vid=1 (rawvideo 1280x720 24.000fps) VO: [gpu] 1280x720 yuv422p V: 00:00:00 / 00:00:00 (67%) Cache: 0.0s Exiting... (End of file) (It is a segmentation fault.) Is this a ffms2 problem now? (If I disable any audio stuff, the problem is still occurring) Last edited by forgetfool; 26th March 2021 at 08:01. |
Tags |
sound |
Thread Tools | Search this Thread |
Display Modes | |
|
|