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 > Capturing and Editing Video > Avisynth Development
Register FAQ Calendar Today's Posts Search

Reply
 
Thread Tools Search this Thread Display Modes
Old 15th March 2012, 01:36   #41  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Help Wanted

We have a new help-wanted wiki for interested developers here. Specifically:
  1. Developers to port the optimized assembly for the various video and audio functions (all porting must be Win32/64 and Linux32/64 compatible). In particular, we would like to port key functions such as color space conversion.
  2. Developer(s) to write a more full-featured AVXEdit application with syntax highlighting, and parameter help (like AvsEdit?).
  3. Testers skilled in AviSynth?, Windows, and Linux, to help complete the test matrix for the set of ported functions.
  4. Autoconf and cmake expert to build Linux installable package.
videophool is offline   Reply With Quote
Old 15th March 2012, 03:38   #42  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,901
I hope we can discuss here the requirements for your item 2. For example, AVXEdit needs a numbered timeline with arbitrary navigation, like VirtualDub.
Guest is offline   Reply With Quote
Old 15th March 2012, 06:48   #43  |  Link
Yellow_
Registered User
 
Join Date: Sep 2009
Posts: 378
With regard to item2, Its probably expanding the brief too far but if a tool like Virtualdub was to be discussed then what about considering extending an actively developed and mature Linux based media toolkit called MLT. It uses ffmpeg, Frei0r etc and is also a playout server for broadcast.

http://www.mltframework.org/twiki/bin/view/MLT/

MLT is xml based and forms the base of a number of Linux NLEs including Kdenlive which is without doubt the most usable NLE on Linux at the current time.

www.kdenlive.org

Any extension of MLT can then be made accessible in kdenlive seperately by kdenlives active devs if need be.

Or would a nodal based approach rather than Non Linear be more suitable.

Last edited by Yellow_; 15th March 2012 at 09:36.
Yellow_ is offline   Reply With Quote
Old 15th March 2012, 07:09   #44  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Interesting development. Pity you chose 2.58 as a base instead of 2.6 ....... sigh

For exception handling there is already a catchable implementation through the IAvisynthClipInfo class, see Virtualdubs source for how to uses it. The painting of the error text is only a fallback in the VFW export stub (which almost everything else currently uses). Any app that uses the C or C++ API has to explicitly handle script and runtime errors, there is no text painting there.

For ASM support the chosen solution is to use the Avisynth modified Softwire by Sh0dan. The Softwire in 2.6 has been adapted for 64bit, but it hasn't had much (any?) of a workout. It is hoped all future core development will use this instead if inline MSVC Asm. A thought to aid 64bit porting was to declare inbuilt register aliases like PAX, PBX, ... which would be EAX, EBX, ... in 32 bit and RAX, RBX, ... in 64 bit, this was envisioned to be a bit like the INTPTR type in C/C++ and would allow memory pointer arithmetic parts of the code to be 32/64 bit agnostic. The assumption being the 1st 64 bit cut would just be the 32 bit algorithm recut as 64bit. Enhanced versions in the future could take advantage of the extra registers and instructions to have faster versions, much like we have C++, MMX, iSSE and SSE2 versions of code now.

Also on the 64 bit vapourware list is to have the Script AVSValue int and float types to be 64bit integers and doubles, as the 2 pointer types, clip and string, have to become 64 bit anyway.

There was also some vague idea about borrowing some code from Wine to load windows .dll plugins in a Linux version. 90% of Avisynth plugins are pure algorithm code with no system calls, these would be a doddle to host in a Linux address space.
IanB is offline   Reply With Quote
Old 15th March 2012, 17:45   #45  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by IanB View Post
Interesting development. Pity you chose 2.58 as a base instead of 2.6 ....... sigh
We are very committed to this project so we will look at 2.6 features and bug fixes that should be merged to avxsynth. Also we invite 2.6 contributors to join the AvxSynth project, and help us with this effort.

Quote:
For ASM support the chosen solution is to use the Avisynth modified Softwire by Sh0dan. The Softwire in 2.6 has been adapted for 64bit, but it hasn't had much (any?) of a workout. It is hoped all future core development will use this instead if inline MSVC Asm.
A version of Softwire that is win/GCC 32/64 compatible would be very cool, and a good way to optimize the filters.

Quote:
//A thought to aid 64bit porting was to declare inbuilt register aliases like PAX, PBX, ... which would be EAX, EBX, ... in 32 bit and RAX, RBX, ... in 64 bit, this was envisioned to be a bit like the INTPTR type in C/C++ and would allow memory pointer arithmetic parts of the code to be 32/64 bit agnostic. The assumption being the 1st 64 bit cut would just be the 32 bit algorithm recut as 64bit. Enhanced versions in the future could take advantage of the extra registers and instructions to have faster versions, much like we have C++, MMX, iSSE and SSE2 versions of code now.
Is anybody working on this effort?

Quote:
There was also some vague idea about borrowing some code from Wine to load windows .dll plugins in a Linux version. 90% of Avisynth plugins are pure algorithm code with no system calls, these would be a doddle to host in a Linux address space.
A Win32 to Linux64 thunking layer? How cool would that be!
videophool is offline   Reply With Quote
Old 15th March 2012, 20:19   #46  |  Link
Robert Martens
Registered User
 
Join Date: Feb 2010
Location: New York
Posts: 116
This is wonderful news, great work on the port! I'm not much when it comes to Linux, but after installing a pair of Ubuntu VMs (32/64 bit) and banging my head against KDev and CMake for a couple of days, I've gotten one of my plugins to compile and run, all with much less effort than I'd expected. I'm sure to have loads of capital-f Fun setting up a new build process that can properly handle both versions, but for the time being I have a few questions:

First, am I the only one having trouble when linking against ffms2 2.17? I downloaded the source from the googlecode project, and configured/built/installed it successfully, but when running AVXEdit and attempting to load a clip with FFVideoSource (or even just using ColorBars().KillAudio().PointResize(320,240)) I get an undefined symbol error with regard to GetSwsContext. Uninstalling 2.17 with Synaptic and replacing it with 2.16 (as delivered in the AvxSynth checkout), everything works as expected. This is hardly a proper bug report, but I don't want to be any more obnoxious than necessary, so I'm leaving out the details in case this is a known issue. Or if I've just missed something obvious. Which would be shocking.

Next up is what I suppose is more a general freshman developer question than anything. I'd like to keep one set of source files for both versions of a plugin if possible; would it be incredibly stupid to #ifdef a "using namespace avxsynth" directive, or at least a set of "using avxsynth::SuchAndSuch" declarations in my source files? I understand those are dangerously poor form if they can be avoided, but they seem to be the cleanest way to handle cross platform concerns in this case. Is there a more intelligent way to handle the avxsynth namespace that I simply haven't learned of yet?

My final concern is about source distribution. On Windows we all redistribute the copy of avisynth.h that we used to build our library; do we distribute avxplugin.h (and everything else in the avx_root/include/ directory) for Linux, or is it assumed everyone using the software has the source code installed? I know the Linux community is much more comfortable with downloading and building from source than most in the Windows world, but if I'm not mistaken it's possible and increasingly common to have binary releases even there. Am I correct in thinking that the avx_root/include/ directory (minus the .svn repository) is all I need to package along with my source?

That's an annoying number of question marks for one post, and I know I'm revealing an embarrassing lack of experience in the *nix world here, but I'm supremely excited at the prospect of making my trivial toy plugins available to an even larger group of people who couldn't care less, so I'd like to clear up as many details as I can.
Robert Martens is offline   Reply With Quote
Old 15th March 2012, 21:58   #47  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by Robert Martens View Post
banging my head against KDev and CMake for a couple of days, I've gotten one of my plugins to compile and run, all with much less effort than I'd expected.
Yes, KDev can be frustrating. So much in VC that we all take for granted.

Quote:
Originally Posted by Robert Martens View Post
would it be incredibly stupid to #ifdef a "using namespace avxsynth" directive
We chose to namespace avxsynth due to ffmpeg collisions, and our desire to see avxsynth well supported in ffmpeg. the #ifdef using namespace solution seems to be reasonable.

Quote:
Originally Posted by Robert Martens View Post
My final concern is about source distribution ...
We would like to have a real install package so that you do not have to walk through these manual steps. Any volunteers out there?
videophool is offline   Reply With Quote
Old 15th March 2012, 22:25   #48  |  Link
Wilbert
Moderator
 
Join Date: Nov 2001
Location: Netherlands
Posts: 6,364
Quote:
A version of Softwire that is win/GCC 32/64 compatible would be very cool, and a good way to optimize the filters.
As I understand it, it is GCC 32/64 compatible. From the readme: "Jude Venn: helped porting SoftWire to UNIX/Linux by providing alternative functions for the Microsoft specific code (File.hpp, String.hpp, CharType.hpp). He also wrote Makefile.gcc to easily compile SoftWire with GCC.". Or isn't the porting finished?
Wilbert is offline   Reply With Quote
Old 15th March 2012, 23:39   #49  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by Wilbert View Post
As I understand it, it is GCC 32/64 compatible. From the readme: "Jude Venn: helped porting SoftWire to UNIX/Linux by providing alternative functions for the Microsoft specific code (File.hpp, String.hpp, CharType.hpp). He also wrote Makefile.gcc to easily compile SoftWire with GCC.". Or isn't the porting finished?
We will look at integrating the revised SoftWire. Our current version of AvxSynth has the built-in resize routines stubbed out and set to call into ffmpeg (they use SoftWire). This will be our first SoftWire test.

Last edited by videophool; 15th March 2012 at 23:42.
videophool is offline   Reply With Quote
Old 17th March 2012, 19:08   #50  |  Link
active1
Registered User
 
Join Date: Nov 2011
Location: spain
Posts: 45
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

Code:
ffvideosource("/path/to/my/file.mkv")
then, AVXEdit disapear and don't open mplayer like when i type version()

active1 is offline   Reply With Quote
Old 18th March 2012, 00:07   #51  |  Link
Yellow_
Registered User
 
Join Date: Sep 2009
Posts: 378
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?

This may or may not help.

http://forum.doom9.org/showthread.ph...47#post1564447
Yellow_ is offline   Reply With Quote
Old 18th March 2012, 00:22   #52  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by Yellow_ View Post
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?
If it is not installed, then I would have expected to see an error, not to have the app die.
videophool is offline   Reply With Quote
Old 18th March 2012, 00:26   #53  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by active1 View Post
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

Code:
ffvideosource("/path/to/my/file.mkv")
then, AVXEdit disapear and don't open mplayer like when i type version()

We would like a repro. If you have a reasonable repro case, please open an issue here
videophool is offline   Reply With Quote
Old 18th March 2012, 05:47   #54  |  Link
avxanne
Registered User
 
Join Date: Mar 2012
Posts: 7
can't reproduce luma scaling issue

Quote:
Originally Posted by Yellow_ View Post
Ok first test something simple opened a flagged full range luma, h264AVC MOV off a DSLR, using FFVideoSource and histogram=classic, output is scaling luma 16 - 235 in the waveform, played back in MPlayer.
I tried reproducing the luma scaling problem with h264 video inside m2ts using a clip from my camera, and I don't see the scaling (I displayed the histogram as well as dumped out the yuv and saw values > 235). Could you post your clip so I can test it on my machine? Maybe it's a difference in library versions.
avxanne is offline   Reply With Quote
Old 18th March 2012, 07:43   #55  |  Link
Yellow_
Registered User
 
Join Date: Sep 2009
Posts: 378
http://www.yellowspace.webspace.virg....com/Gold.aMOV

I mentioned earlier in the thread that the luma scaling was specific to ffms2 2.16 and fixed by The Fluff quite a while ago, maybe recent commits by the AVXSynth devs have bumped version to 2.17 and resolved the problem. I haven't built it again since the initial release to test but it was scaling, used ffms2 long enough to know. :-)

Last edited by Yellow_; 18th March 2012 at 07:47.
Yellow_ is offline   Reply With Quote
Old 19th March 2012, 04:51   #56  |  Link
active1
Registered User
 
Join Date: Nov 2011
Location: spain
Posts: 45
Quote:
Originally Posted by Yellow_ View Post
active1, do you have the ffms2avs plugin built in /home/.AVXSynth/plugins folder?

This may or may not help.

http://forum.doom9.org/showthread.ph...47#post1564447
i have that folder in this directory
/home/lab/AVXSynth/plugins/ffms2avs
and it is contain : ffms2avs.kdev4 , libffms2avs.so , Makefile
and two other folders : Prerequisites & src

NOTE: i skipped three steps because i didn't know how to do them

Code:
Create a .gdbinit in your home directory containing this text: (for 64-bit Ubuntu)
set env LD_PRELOAD /lib/x86_64-linux-gnu/libpthread.so.0 (for 32-bit Ubuntu)
set env LD_PRELOAD /lib/i386-linux-gnu/libpthread.so.0 This is a fix for the debugger hanging on dlopen)
Quote:
Originally Posted by videophool View Post
We would like a repro. If you have a reasonable repro case, please open an issue here
sorry, i don't know what 'repro' means
active1 is offline   Reply With Quote
Old 19th March 2012, 06:48   #57  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by active1 View Post
sorry, i don't know what 'repro' means
If you have a set of steps to reproduce the error.
videophool is offline   Reply With Quote
Old 20th March 2012, 00:55   #58  |  Link
avxsynth
AvxSynth Pirate
 
Join Date: Mar 2012
Location: SF Bay Area
Posts: 2
Audio support is there

Hello to everyone on the forum from one of the committers (avxsynth@gmail.com)

Latest news:

The support for audio functions is checked in.

The following functions are supported:
- Tone
- FFAudioSource (***has been there already, can be used as audio source alongside with Tone function)
- DelayAudio
- AmplifydB
- Amplify
- AssumeSampleRate
- Normalize
- MixAudio
- ResampleAudio
- ConvertToMono
- EnsureVBRMP3Sync (*** not tested)
- MergeChannels
- MonoToStereo
- GetLeftChannel
- GetRightChannel
- GetChannel
- GetChannels
- KillVideo
- KillAudio
- ConvertAudioTo16bit
- ConvertAudioTo8bit
- ConvertAudioTo24bit
- ConvertAudioTo32bit
- ConvertAudioToFloat
- ConvertAudio

Remarks, comments, questions, suggestions...are more than welcome.
avxsynth is offline   Reply With Quote
Old 20th March 2012, 01:05   #59  |  Link
avxsynth
AvxSynth Pirate
 
Join Date: Mar 2012
Location: SF Bay Area
Posts: 2
Audio test scripts examples

Script1: Using tone:
----------------------------------------------------------------
#ErrorHandlingExternal
clip0 = FFAudioSource(source="<path_to_your_media_file>")

f1 = 2*261.6
f2 = 2*329.6
f3 = 2*392.0
f4 = 2*f1

clip1 = Tone(frequency=f1, samplerate=44100)
clip2 = DelayAudio(Tone(frequency=f2, samplerate=44100), 1.0)
clip3 = MixAudio(clip1, clip2)
clip4 = DelayAudio(Tone(frequency=f3, samplerate=44100), 2.0)
clip5 = MixAudio(clip3, clip4)
clip6 = DelayAudio(Tone(frequency=f4, samplerate=44100), 3.0)
clip7 = MixAudio(clip5, clip6)

clip8 = MixAudio(clip0, clip7)
#
# use the line below to play sound at different sampling rates
#AssumeSampleRate(clip8, 64000)

----------------------------------------------------------------

Script2: Another set of functions tested:
----------------------------------------------------------------

#ErrorHandlingExternal
f1 = 2*261.6
f2 = 2*329.6
f3 = 2*392.0
f4 = 2*f1

clip1 = Tone(frequency=f1)
clip2 = DelayAudio(Tone(frequency=f2), 1.0)
clip3 = MergeChannels(clip1, clip2)
clip4 = DelayAudio(Tone(frequency=f3), 2.0)
clip5 = MergeChannels(clip3, clip4)
clip6 = DelayAudio(Tone(frequency=f4), 3.0)
clip7 = MergeChannels(clip5, clip6)

clip8 = ConvertToMono(clip7)

#
# the result of the two functions below should be
# unchanged audio volume
#
clip9 = AmplifydB(clip8, -30.0)
Amplify(clip9, 31.62)

-----------------------------------------------------------------

Script3: Illustrating proper downsampling (i.e. antialiasing)
----------------------------------------------------------------
#ErrorHandlingExternal

clip0 = Tone(frequency=440)
#clip0L = GetLeftChannel(clip0)
clip0L = GetChannels(clip0, 1)

clip1 = Tone(frequency=17000)
#clip1R = GetRightChannel(clip1)
clip1R = GetChannels(clip1, 2)

clip2 = MergeChannels(clip0L, clip1R)
clip3 = clip2 #ConvertAudioToFloat(clip2)
clip4 = ResampleAudio(clip3, 32000)
ConvertAudioTo16Bit(clip4)
avxsynth is offline   Reply With Quote
Old 21st March 2012, 21:13   #60  |  Link
videophool
Registered User
 
Join Date: Nov 2008
Posts: 91
Quote:
Originally Posted by active1 View Post
hi
im having a problem when i try to play the script
when i open AVXEdit and write a simple script, like this:

Code:
ffvideosource("/path/to/my/file.mkv")
then, AVXEdit disapear and don't open mplayer like when i type version()

We have found a problem where AvxSynth is causing a segfault when there is a script error. We are working to identify and resolve the segfault. In the mean time, try this:

Code:
src=ffvideosource("/path/to/my/file.mkv")
ShowSMPTE(src)
videophool is offline   Reply With Quote
Reply


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 00:32.


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