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

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th January 2012, 00:14   #1421  |  Link
moviefan
Registered User
 
Join Date: Jul 2005
Posts: 438
http://pastebin.com/GjCqakCE
moviefan is offline   Reply With Quote
Old 19th January 2012, 00:21   #1422  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
You need to compile FFmpeg with swscale (--enable-swscale), but I think there might also be something funky going on with our autodetection of FFmpeg versus libav. Which one are you using?
TheFluff is offline   Reply With Quote
Old 19th January 2012, 00:22   #1423  |  Link
moviefan
Registered User
 
Join Date: Jul 2005
Posts: 438
I downloaded the latest FFmpeg snapshot so I guess I'm using FFmpeg, right?

Edit: Compiling FFmpeg with swscale does not solve the problem.

Last edited by moviefan; 19th January 2012 at 00:29.
moviefan is offline   Reply With Quote
Old 19th January 2012, 01:01   #1424  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
Quote:
Originally Posted by moviefan View Post
I downloaded the latest FFmpeg snapshot so I guess I'm using FFmpeg, right?

Edit: Compiling FFmpeg with swscale does not solve the problem.
You're setting LIBAV_LIBS wrong. Consider using pkg-config in order to get it right automatically (by setting PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig, where $PREFIX is the prefix you built ffmpeg with), or if you can't or don't want to do that, check the libav*.pc file to see what -l flags you should be using.
TheFluff is offline   Reply With Quote
Old 19th January 2012, 01:33   #1425  |  Link
moviefan
Registered User
 
Join Date: Jul 2005
Posts: 438
Where do I insert the -l flags? Like this? LIBAV_LIBS="-L..... -lavcodec -lavfilter ..."?
moviefan is offline   Reply With Quote
Old 19th January 2012, 08:53   #1426  |  Link
komisar
Registered User
 
komisar's Avatar
 
Join Date: Aug 2008
Location: Minsk, Belarus
Posts: 235
moviefan, try this:
Code:
LIBS="-lswscale -lavformat -lavcodec -lavutil -lpsapi [-lz -lbz2 -lpthreadGC2]" \
CFLAGS="-I/where/you/libav/include" \
LDFLAGS="-L/where/you/libav/lib" \
configure --you-libav-configure-options
"[-lz -lbz2 -lpthreadGC2]" if need...

TheFluff, why in current ffmpegsource changed FFMPEG_LIBS to LIBS in configure?
__________________
..::[I am live here]..::..[My x264 CLI/VFW builds and tools]::..
komisar is offline   Reply With Quote
Old 23rd January 2012, 08:20   #1427  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
FFMS 2.17 has been released.
Again, this is mostly a bugfix and maintenance release; no major new features have been added. There are, however, two minor features that might be relevant to Avisynth users. First, you can now get the FFMS version by calling FFGetVersion(), which returns a string on the form "2.17.0.0", where the last two numbers are mostly relevant for API users. Second, all exported metadata variables can now have their names prefixed with a string of your choice, which prevents two or more subsequent calls to FFVideo/AudioSource from overwriting each other's variables. Oh, and for the three people who care (hello there, tebasuna51), the audio channel layout is now exported as a dwChannelMask-compatible integer, in the variable FFCHANNEL_LAYOUT.

Downloads
Full changelog since 2.16
  • Reworked color matrix and color range handling a bit, which fixed a bug that could cause FFMS2 to always output TV range even if the input was full range. (TheFluff)
  • The autotools build system can now create debug builds properly. (Daemon404)
  • Deprecated parts of the API will now cause compiler warnings when you use them. (TheFluff)
  • Added a FFMS_GetVersion function to the API (lets library users get the version number at runtime) and exposed it in Avisynth as FFGetVersion. (TheRyuu, TheFluff)
  • Added a variable prefix option to the Avisynth functions. Its primary purpose is to get subsequent calls to source functions from overwriting variables from earlier calls. (TheFluff)
  • Make it possible to open single-frame videos without explicitly setting seekmode to -1 for you weird people who want to open images with ffms (Plorkyeran)
  • Fixed bug where indices would sometimes be incorrectly considered valid (TheRyuu)
  • Add support for recent versions of Libav/FFmpeg built as shared libraries (Plorkyeran, TheRyuu, Kovensky)
  • When possible, non-API symbols are no longer exported (Daemon404, TheFluff)
  • Deprecate postprocessing support. Libav and FFmpeg are planning on removing it at some point in the near future and it's really not very useful.
  • Fix the pkg-config version on OS X (Plorkyeran).
  • Fixed a bug that could cause the FFmpegSource2() Avisynth function to not use UTF8 filenames even when told to do so. (pandv2)
  • Fixed a few minor memory leaks. (Plorkyeran)
  • Adjusting audio delay relative to the first video track should now work properly again (was broken in 2.16). (Plorkyeran)
  • General bitrot fixes to deal with changes in Libav/FFmpeg (everyone)
  • Corrected handling of codec private data when using a non-libavformat parser. Fixes decoding of FFV1 and UTVideo in MKV, among other things. (TheFluff)
  • Bump minimum required version of FFmpeg to 0.6.

Other notes
The VC-1 decoding issue is not fixed, but since it's been there since forever and is extremely mysterious and hard to debug, we've decided to release 2.17 anyway. We haven't given up on it, though.

We'd also like to again remind postprocessing users that postprocessing support is deprecated and will be removed in 2.18. The reason for this is that both libav and FFmpeg are planning on removing the library we use (libpostproc).

Last edited by TheFluff; 23rd January 2012 at 08:38.
TheFluff is offline   Reply With Quote
Old 23rd January 2012, 08:20   #1428  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
Quote:
Originally Posted by komisar View Post
TheFluff, why in current ffmpegsource changed FFMPEG_LIBS to LIBS in configure?
I don't know, I don't maintain the Unix buildsystem. I'll pass the question along to the concerned parties, though.
TheFluff is offline   Reply With Quote
Old 23rd January 2012, 17:01   #1429  |  Link
tebasuna51
Moderator
 
tebasuna51's Avatar
 
Join Date: Feb 2005
Location: Spain
Posts: 5,351
Quote:
Originally Posted by TheFluff View Post
FFMS 2.17 has been released.
... Oh, and for the three people who care (hello there, tebasuna51), the audio channel layout is now exported as a dwChannelMask-compatible integer, in the variable FFCHANNEL_LAYOUT.
Thanks. I will test that.
__________________
BeHappy, AviSynth audio transcoder, in Doom9 forums. NicAudio, BassAudio, audio decoders.
tebasuna51 is offline   Reply With Quote
Old 23rd January 2012, 21:09   #1430  |  Link
mastrboy
Registered User
 
Join Date: Sep 2008
Posts: 288
Quote:
Originally Posted by TheFluff View Post
FFMS 2.17 has been released.
Much appreciated
mastrboy is offline   Reply With Quote
Old 24th January 2012, 07:49   #1431  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,682
It doesn't work for me with AviSynth 2.6 32bit, programs abort with error saying they can't open the avs files.
The plugin load command is correct.

But ffms-2.17.7z really is for AviSynth?
aufkrawall is offline   Reply With Quote
Old 24th January 2012, 08:25   #1432  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,373
There are two distinct functions to load plugins, and it depends on the plugin code which of them are supported:

a) LoadPlugin()
b) LoadCPlugin() / Load_StdCall_Plugin()

FFMS2 supports both calling conventions; but using FFMS2 in AviSynth 2.6 requires the second style to access new colorspaces. To avoid issues with the plugin already loaded automatically using the first style, you should keep FFMS2 out of the autoload folder (AviSynth 2.5\plugins), but place it in a subdirectory instead and always load it explicitly.
__________________

German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 24th January 2012, 09:31   #1433  |  Link
TheRyuu
warpsharpened
 
Join Date: Feb 2007
Posts: 788
Quote:
Originally Posted by LigH View Post
There are two distinct functions to load plugins, and it depends on the plugin code which of them are supported:

a) LoadPlugin()
b) LoadCPlugin() / Load_StdCall_Plugin()

FFMS2 supports both calling conventions; but using FFMS2 in AviSynth 2.6 requires the second style to access new colorspaces.
You can only load ffms2 with:
Code:
LoadPlugin("X:\path\to\ffms2.dll")
The cplugin builds are marked as such and are different.

Quote:
Originally Posted by LigH View Post
To avoid issues with the plugin already loaded automatically using the first style, you should keep FFMS2 out of the autoload folder (AviSynth 2.5\plugins), but place it in a subdirectory instead and always load it explicitly.
Can we please stop using autoload. It's one of the major causes of avisynth related problems.

Last edited by TheRyuu; 24th January 2012 at 09:34.
TheRyuu is offline   Reply With Quote
Old 24th January 2012, 09:35   #1434  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,682
Thank you, using the non-c load command did the trick.
aufkrawall is offline   Reply With Quote
Old 24th January 2012, 09:54   #1435  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,373
Sorry then, I must have misunderstood... So it seems that C calling is no requirement for AviSynth 2.6; but then was it useful for x64 instead?
__________________

German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 24th January 2012, 10:52   #1436  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
Quote:
Originally Posted by LigH View Post
Sorry then, I must have misunderstood... So it seems that C calling is no requirement for AviSynth 2.6; but then was it useful for x64 instead?
I will try to explain the situation. It's a bit messy, and I'm going to explain a bit more than strictly necessary, but bear with me.

FFMS2 is a library that interacts with FFmpeg. You can use this library from C or C++ programs (and programs written in other languages too), but in itself it doesn't really do anything. You cannot use this library directly from Avisynth.

In order to interact with Avisynth, we have written two different Avisynth plugins. These two don't do very much work on their own; they just call the FFMS2 library and ask it to retrieve video and audio for them. Because we don't like DLL hell, these plugin interfaces normally reside in the same .dll file as the FFMS2 library, and thus for most end users the FFMS2 library is the same thing as the Avisynth plugin.

One of these two plugins is written in C++ and uses the Avisynth 2.5 interface. This is the ordinary plugin that most of you use; it is loaded with LoadPlugin. It can be compiled in either 32- or 64-bit mode and will work with both Avisynth 2.5 and 2.6, but in 2.6 it will not be able to handle the new colorspaces, since it uses the 2.5 interface that doesn't have those yet. If it had been written using the 2.6 interface, you would not have been able to load it in Avisynth 2.5.

The other plugin is written in C (by kemuri_-9) and uses the Avisynth C interface. It is loaded with LoadCPlugin/LoadStdCallPlugin, and just like the ordinary plugin it can be compiled in either 32- or 64-bit mode. Because the Avisynth C interface is a bit special, kemuri_-9 managed to hack this plugin up so it can be loaded in both Avisynth 2.5 and Avisynth 2.6 and still have access to the new colorspaces when loaded in Avisynth 2.6. The ordinary C++ plugin cannot do this.

Because there is no easy way for end users to tell the difference between a ffms2.dll that contains the C-plugin interface and one that contains the 2.5 C++ interface, we usually mark 7z archives that contain the C-plugin with -avs-cplugin. All other archives can be assumed to either contain the C++ plugin or just the library itself, without any Avisynth interfaces (although I don't think there's anyone building it that way right now; all DLL's most likely contain one of the Avisynth interfaces).

We have not yet posted a 2.17 build of the C-plugin. Harass TheRyuu if you want it.

End of tl;dr.

Last edited by TheFluff; 24th January 2012 at 10:56.
TheFluff is offline   Reply With Quote
Old 24th January 2012, 10:58   #1437  |  Link
Gavino
Avisynth language lover
 
Join Date: Dec 2007
Location: Spain
Posts: 3,380
Quote:
Originally Posted by TheRyuu View Post
Can we please stop using autoload. It's one of the major causes of avisynth related problems.
Why is that? (in the case of ffms2)
__________________
GScript and GRunT - complex Avisynth scripting made easier
Gavino is offline   Reply With Quote
Old 24th January 2012, 11:09   #1438  |  Link
TheFluff
Excessively jovial fellow
 
Join Date: Jun 2004
Location: rude
Posts: 1,019
Quote:
Originally Posted by Gavino View Post
Why is that? (in the case of ffms2)
When someone is having bizarre and inexplicable Avisynth problems, such as odd crashes and mysterious failures of various kinds, odds are usually very good that it's related to some broken plugin being autoloaded. Therefore, TheRyuu thinks it's usually a good idea to keep your autoload directory clean. The C++ version of FFMS2 should be safe to autoload though.
TheFluff is offline   Reply With Quote
Old 24th January 2012, 11:14   #1439  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,373


That helped me understanding the relations better.
__

Crash reasons I remember from own experience were e.g. AviSynth 2.0 plugins, the LoadPluginEx() plugin, and plugin variants optimized for unsupported CPU instructions (e.g. RemoveGrain_SSE3 on Athlon XP).
__________________

German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 24th January 2012, 12:24   #1440  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,682
I encounter a problem with FFMS 2.17 that wasn't there with 2.16 cbuild: It seems that it doesn't convert range from PC to TV correctly.
I used the following script:
Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.6\plugins\ffms2.dll")
FFVideoSource("alt.avi")
AssumeFPS(30.0)
ConvertToYV12(matrix="Rec709")
Source was FRAPS I420.
With 2.16 the x264 result looked like this:

2.17 (too dark):
aufkrawall is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


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