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 Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 12th February 2020, 20:56   #21  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
Docs translation

Original [as in zip]
Code:
====================================
 AVISynth —pƒvƒ‰ƒOƒCƒ“ SubTitleEx‰
====================================

ŠT—v
----

AVISynth —pƒvƒ‰ƒOƒCƒ“ SubTitleEx‰ ‚́AAVISynth 2.5 —p‚ƒeƒƒbƒv•\Žƒvƒ‰ƒOƒCƒ“‚ŁA
AVISynth •W€‚ SubTitle ‚‚‘”‚‹@”\Šg’‚‚‚‚‚‚‚‚B

umVideo Utilitiesv‚‚‚Œ‚•‚‚‚‚‚ƒTƒCƒg‚ŒŠJ‚‚‚‚‚
Basilik Tournadski Ž쐬‚́uSubTitleExv‚‚‚‚ɁA“–{Œ‚•Žš‰‚‚‚Œ‚
C‚‚‚‚‚‚B‚‚A‰s‚—L–A‚‚‚эsŠ‚’‚‚‚‹@”\‚’‰‚‚‚‚‚B

uSubTitleExv‚‰‹Ž‚ƒ\[ƒXƒR[ƒh‚ŒŠJ‚‚‚‚‚‚‚‚‚Œ‚‚“Ž‚‚‚A
‚‚‚‚ Internet Archive ‚ƒ\[ƒXƒR[ƒh‚Žc‚‚‚‚A“Ž‚‚‚ƒvƒ‰ƒOƒCƒ“‚
SubTitleEx ‚•Žš•\ŽƒGƒ“ƒWƒ“‚‘g‚ݍž‚‚‚‚‚uDVTimeStampExv‚‚‚‚ɁA
uSubTitleExv‘Š“–‚‹@”\‚Ž‚‚‚‚‚쐬‚‚‚‚B


Žg‚•
------

AviSynth ‚ƒCƒ“ƒXƒg[ƒ‹‚‚ƒtƒHƒ‹ƒ_‚́uPluginvƒtƒHƒ‹ƒ_‚ɁASubtitleEx.dll ‚
ƒRƒs[‚‚‚‚‚Žg—p‚‰”\‚‚‚‚‚B

–{‰ SubtitleEx ‚‹@”\‚‚‚‚Ž‘•‚‚‚‚‚Aˆ•”‚́uƒ_ƒ•Žšv‚Š‚‚‚‚
•Žš‰‚‚‚–‘‚C‚‚‚‚‚‚B‚‚‚‰‚‚āASubTitleEx‰‚‚ˆ‰‚
ƒpƒ‰ƒ[ƒ^‚’‰‚‚‚‚‚‚B

SubtitleEx(
    string text,
    int    "x",
    int    "y",
    int    "firstframe",
    int    "lastframe",
    string "font",
    string "effects",
    int    "size",
    int    "textcolor",
    int    "halocolor"
    int    "linemargin"
    int    "spc"
)

E –{‰ SubtitleEx ‚ƒpƒ‰ƒ[ƒ^

  - text             •\Ž‚‚ƒeƒLƒXƒgB‰s‚‚‡‚‚‰ӏŠ‚Ɂu | v‚‘‚‚‚B
  - x                •\Ž‚‚•W‚‚Bƒ}ƒCƒiƒX‚Žw’‚‚‚‰E‚‚‚‚‚‚‚B
  - y                •\Ž‚‚•W‚‚Bƒ}ƒCƒiƒX‚Žw’‚‚‚‰‚‚‚‚‚‚‚B
  - firstframe       •\Ž‚‚ŏ‰‚ƒtƒŒ[ƒ€”‚‚B
  - lastframe        •\Ž‚‚Œ‚ƒtƒŒ[ƒ€”‚‚B
  - font             ƒtƒHƒ“ƒg–‚Žw’‚‚‚B
  - effects          ƒGƒtƒFƒNƒg‚Žw’‚‚‚B•”Žw’‚‚‚͏‡‚‚‚‚‚ď‘‚‚‚B
                     b:‘Žš  i:Ž‘  u:‰  s:‘‚‚
                     f(ƒCƒ“‚ƒtƒŒ[ƒ€”,ƒAƒEƒg‚ƒtƒŒ[ƒ€”):ƒtƒF[ƒhƒCƒ“EƒAƒEƒg
                     m(ŠJŽnƒtƒŒ[ƒ€,ŠJŽnX,ŠJŽnY,I—ƒtƒŒ[ƒ€,I—X,I—Y):ƒ‚[ƒVƒ‡ƒ“
  - size             ƒtƒHƒ“ƒgƒTƒCƒY‚‚B
  - textcolor        •ŽšF‚‚BƒAƒ‹ƒtƒ@‚Žw’‰”\‚‚B
  - halocolor        ‰Ž‚‚̐F‚‚BƒAƒ‹ƒtƒ@‚Žw’‰”\‚‚B

E SubtitleEx‰‚’‰‚‚‚ƒpƒ‰ƒ[ƒ^

  - effects="w"      u | v‚‚‚‰s‚–Œ‚‚‚‚‚B
  - linemargin=”’l  sŠŠu‚Žw’‚‚‚B
  - spc=”’l         •ŽšŠŠu‚Žw’‚‚‚B


’ˆŽ–€
--------

ƒtƒH[ƒ}ƒbƒg‚ RGB32 ‚‚‚•ύX‚‚‚‚ƒNƒ‰ƒbƒVƒ…‚‚‚‚‚‡‚‚ ‚‚‚B
‚‚̏‡‚ƒtƒH[ƒ}ƒbƒg‚•Š‚‚‚*‚‚‚B


ƒ‰ƒCƒZƒ“ƒX
----------

uAVISynth —pƒvƒ‰ƒOƒCƒ“ SubTitleEx‰v‚’˜Œ ‚‚‚ƒ‰ƒCƒZƒ“ƒX‚́A‚‚ƒvƒ‰ƒOƒCƒ“‚
Œ‚‚ ‚ABasilik Tournadski Ž‚́uSubTitleExvuDVTimeStampExv‚ɏ€‚‚‚B

‚‚‚‚ƒvƒ‰ƒOƒCƒ“‚ Basilik Tournadski Ž‚’˜Œ ‚Ž‚A–ž‚ƒtƒŠ[ƒ\ƒtƒg‚‚‚
ŒŠJ‚‚‚‚‚‚‚B

‚‚‚A‚‚ƒvƒ‰ƒOƒCƒ“‚‚‚‚‚*”ŒŽ‚‚‚‚‚ ‚‚‚߁A‚‚ƒvƒ‰ƒOƒCƒ“‚Š‚‚
ŒŽ‚–‚‡‚‚‚‚‚‚‚*‚‚‚B‚‚A‚‚ƒvƒ‰ƒOƒCƒ“‚‚‚‚āA
ŒŽҁE‰‘”ōŽ‚ˆ‚̐”C‚•‰‚‚‚‚B


‰‘”ōŽҁE”z•zŒ
------------------

‚‚‚‚ (http://hosiken.jp/)

Original [after codepage conversion]
Code:
====================================
 AVISynth 用プラグイン SubTitleEx改
====================================

概要
----

AVISynth 用プラグイン SubTitleEx改 は、AVISynth 2.5 用のテロップ表示プラグインで、
AVISynth 標準の SubTitle より多数の機能拡張がなされています。

「mVideo Utilities」という現在は閉鎖されているサイトで公開されていた
Basilik Tournadski 氏作成の「SubTitleEx」をもとに、日本語が文字化けする現象を
修正したものです。また、改行の有無、および行間を設定できる機能を追加しています。

「SubTitleEx」は過去にソースコードが公開されていたのですが現在では入手できず、
たまたま Internet Archive にソースコードが残っていた、同作者によるプラグインで
SubTitleEx の文字表示エンジンが組み込まれている「DVTimeStampEx」をもとに、
「SubTitleEx」相当の機能を持ったものを作成しました。


使い方
------

AviSynth をインストールしたフォルダの「Plugin」フォルダに、SubtitleEx.dll を
コピーするだけで使用が可能になります。

本家 SubtitleEx の機能はすべて実装されており、一部の「ダメ文字」が含まれると
文字化けする問題が修正されています。それに加えて、SubTitleEx改では以下の
パラメータが追加されています。

SubtitleEx(
    string text,
    int    "x",
    int    "y",
    int    "firstframe",
    int    "lastframe",
    string "font",
    string "effects",
    int    "size",
    int    "textcolor",
    int    "halocolor"
    int    "linemargin"
    int    "spc"
)

・ 本家 SubtitleEx のパラメータ

  - text             表示するテキスト。改行する場合その箇所に「 | 」を書きます。
  - x                表示する座標です。マイナスを指定すると右からになります。
  - y                表示する座標です。マイナスを指定すると下からになります。
  - firstframe       表示する最初のフレーム数です。
  - lastframe        表示する最後のフレーム数です。
  - font             フォント名を指定します。
  - effects          エフェクトを指定します。複数指定するは場合はつなげて書きます。
                     b:太字  i:斜体  u:下線  s:打ち消し線
                     f(インのフレーム数,アウトのフレーム数):フェードイン・アウト
                     m(開始フレーム,開始X,開始Y,終了フレーム,終了X,終了Y):モーション
  - size             フォントサイズです。
  - textcolor        文字色です。アルファも指定可能です。
  - halocolor        縁取りの色です。アルファも指定可能です。

・ SubtitleEx改で追加されたパラメータ

  - effects="w"      「 | 」による改行が無効になります。
  - linemargin=数値  行間隔を指定します。
  - spc=数値         文字間隔を指定します。


注意事項
--------

フォーマットを RGB32 などに変更しないとクラッシュしてしまう場合があります。
この場合はフォーマットを変換してください。


ライセンス
----------

「AVISynth 用プラグイン SubTitleEx改」の著作権およびライセンスは、このプラグインの
原作である、Basilik Tournadski 氏の「SubTitleEx」「DVTimeStampEx」に準じます。

これらのプラグインは Basilik Tournadski 氏が著作権を持ち、無償のフリーソフトとして
公開されていました。

ただし、このプラグインはまったく非公式なものであるため、このプラグインに関して
原作者に問い合わせしないでください。また、このプラグインについて、
原作者・改造版作者は一切の責任を負いません。


改造版作者・配布元
------------------

ほしけん (http://hosiken.jp/)
Translated to English
Code:
====================================
 AVISynth plug-in SubTitleEx
====================================

Overview
----

AVISynth plug-in SubTitleEx Kai is a subtitle display plug-in for AVISynth 2.5.
There are many enhancements over the AVISynth standard SubTitle.

It was published on a currently closed site called "mVideo Utilities"
Based on "SubTitleEx" created by Basilik Tournadski, Japanese characters are garbled
It has been corrected. In addition, a function to set the presence / absence of line breaks and line spacing has been added.

"SubTitleEx" had source code released in the past, but it is not available now,
It happened that the source code was left in the Internet Archive.
Based on "DVTimeStampEx" that incorporates SubTitleEx's character display engine,
Created one with a function equivalent to "SubTitleEx".


How to use
------

SubtitleEx.dll is added to the "Plugin" folder of the folder where AviSynth is installed.
It can be used just by copying.

All functions of the original SubtitleEx are implemented, and if some "useless characters" are included
A garbled problem has been fixed. In addition, SubTitleEx breaks
Parameters have been added.

SubtitleEx(
    string text,
    int    "x",
    int    "y",
    int    "firstframe",
    int    "lastframe",
    string "font",
    string "effects",
    int    "size",
    int    "textcolor",
    int    "halocolor"
    int    "linemargin"
    int    "spc"
)


 Parameters of SubtitleEx

  -text The text to display. If you want to start a new line, write "|" at that point.
  -x The coordinates to display. If you specify minus, it will be from the right.
  -y The coordinates to display. If you specify minus, it will be from the bottom.
  -firstframe The number of the first frame to display.
  -lastframe The number of the last frame to display.
  -font Specify the font name.
  -effects Specifies effects. If you specify more than one, write them together.
                     b: bold i: italic u: underline s: strikethrough
                     f (number of frames in, number of frames out): fade-in / out
                     m (start frame, start X, start Y, end frame, end X, end Y): motion
  -size Font size.
  -textcolor The text color. Alpha can also be specified.
  -halocolor The color of the border. Alpha can also be specified.


 Parameter added by SubtitleEx

  -effects = "w" Line breaks with "|" are disabled.
  -linemargin = number Specify the line spacing.
  -spc = number Specify the character spacing.


Notes
--------


If you do not change the format to RGB32, etc., you may crash.
In this case, convert the format.


license
----------

The copyright and license for "AVISynth Plug-in SubTitleEx Kai" are
Based on the original "SubTitleEx" and "DVTimeStampEx" by Basilik Tournadski.

These plug-ins are copyrighted by Basilik Tournadski and are free software.
Was published.

However, since this plugin is completely unofficial,
Do not contact the original author. Also, about this plugin,
The original author and modified author do not take any responsibility.


Modified author / distributor
------------------

Hoshiken (http://hosiken.jp/)
EDIT: The original txt file in zip has no encoding info and looks not much like the original text above in 2nd code block,
In PS-PAD, I ticked Menu/Encoding/AutoDetect_CP, which converts as for 2nd code black above.
then translated in pieces using google search "online translate", which is a direct online google translate whatsit,
limited length so need do in pieces.

Original test script
Code:
version()
converttorgb32()
SubTitleEx(x=0, y=0, font="MS UI Gothic", size=20, "—‚ƒ|ƒCƒ“ƒg|Eƒuƒ‹ƒhƒbƒOƒ\[ƒX|E”Œ•‚‰–|SubtitleEx‰‚“–{Œ‚‰‚‚‚‚", 
	\ effects="bif(20, 20)m(0,0,0,300,100,0)", linemargin=-2, spc=16, textcolor=$ffff80, halocolor=$ff0000)
Autodetected Code Page Test.avs
Code:
version()
converttorgb32()
SubTitleEx(x=0, y=0, font="MS UI Gothic", size=20, "材料のポイント|・ブルドッグソース|・伯方の塩|SubtitleEx改は日本語が化けません",
    \ effects="bif(20, 20)m(0,0,0,300,100,0)", linemargin=-2, spc=16, textcolor=$ffff80, halocolor=$ff0000)
Test.avs Result image [Maybe should change display string to UTF8 or something]


EDIT: The Google Online Tranlate thing(works like old BabelFish site):- https://www.google.com/search?source...4dUDCAc&uact=5
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 12th February 2020 at 22:12.
StainlessS is offline   Reply With Quote
Old 13th February 2020, 00:55   #22  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by StainlessS View Post
Test.avs Result image [Maybe should change display string to UTF8 or something]
It displays fine when you save the .avs with ANSI encoding (Shift-JIS for JA) and change the system locale to Japanese:

The image above was captured with the 64 bit version in VDub2.
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 13th February 2020 at 01:00.
Groucho2004 is offline   Reply With Quote
Old 13th February 2020, 10:17   #23  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
Quote:
Originally Posted by Groucho2004 View Post
No feedback from the OP so I guess it's working?
Sorry for not responding, I am finally here.

I gave it a try now. I only see troubles with negative values of x or y (positions on screen). According to the documentation they are supposed to align right, resp. to the bottom.

Try:
Code:
BlankClip().SubtitleEx("First line|Second line|Third line", x = -100, y = -100)
Half of the third line is under the bottom margin of the screen.

JackBrody is offline   Reply With Quote
Old 13th February 2020, 11:48   #24  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by JackBrody View Post
I only see troubles with negative values of x or y (positions on screen). According to the documentation they are supposed to align right, resp. to the bottom.

Try:
Code:
BlankClip().SubtitleEx("First line|Second line|Third line", x = -100, y = -100)
Half of the third line is under the bottom margin of the screen.

Indeed. The original SubtitleEx by Basilik did not have that issue. I think the problem is somewhere in this code segment:
Code:
 if ( m_Info.pos_x < 0 )
 {
  m_Info.alignment = TA_BASELINE | TA_RIGHT;
  m_Info.pos_x = vi.width + m_Info.pos_x;
 }
 else
 {
  m_Info.alignment = TA_BASELINE | TA_LEFT;
 }

 if ( m_Style.center )
 {
  m_Info.alignment = TA_BASELINE | TA_CENTER;
 }

 if ( m_Info.pos_y < 0 )
 {
  m_Info.pos_y = vi.height + m_Info.pos_y;
 }
Should be easy to fix. However, very little time right now...
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 13th February 2020, 14:57   #25  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
By the way, is the performance penalty of using 32-bit Avisynth significant (compared to 64-bit)? Is there any at all?
JackBrody is offline   Reply With Quote
Old 13th February 2020, 15:07   #26  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by JackBrody View Post
By the way, is the performance penalty of using 32-bit Avisynth significant (compared to 64-bit)? Is there any at all?
You can measure the difference with AVSMeter.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 17th February 2020, 22:43   #27  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
I unpacked AVSMeter but before I fed it with my AVS script I tested it on both 64bit and 32bit VirtualDub. No problem with the former, but the latter definitely has issues. I got "Avisynth open failure: FFVideoSource: No suitable output format found" error on the line with 37-th FFmpegSource2() call.

So I am afraid I can't go back to 32bit with my projects. :-)
JackBrody is offline   Reply With Quote
Old 17th February 2020, 23:02   #28  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
And the same if there is NO SubtitleEx() call ?
If so then problem in your FFMPegSource, probably not same version as your x64 FFMPegSource.

EDIT:
Code:
AvsMeter avsinfo
#AvsMeter64 avsinfo
Should show versions [EDIT: If they have a version resource, many versions of both LSmash and FfmpegSsource do not have version resource]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 17th February 2020 at 23:05.
StainlessS is offline   Reply With Quote
Old 18th February 2020, 00:27   #29  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
I have not yet used SubtitleEx in my script so this is only about FFmpegSource2. Outputs from "avsmeter(64) avsinfo" are following:

Code:
AVSMeter 2.9.8 (x86), 2012-2020, (c) Groucho2004

VersionString:              AviSynth+ 3.4 (r2923, 3.4, i386)
VersionNumber:              2.60
File / Product version:     3.4.0.0 / 3.4.0.0
Interface Version:          6
Multi-threading support:    Yes
Avisynth.dll location:      C:\Windows\SysWOW64\avisynth.dll
Avisynth.dll time stamp:    2019-10-20, 10:25:02 (UTC)
PluginDir2_5 (HKLM, x86):   C:\Program Files (x86)\AviSynth+\plugins
PluginDir+   (HKLM, x86):   C:\Program Files (x86)\AviSynth+\plugins+


[C++ 2.6 Plugins (32 Bit)]  [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins+\ConvertStacked.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.dll  [n/a, 2016-12-29]

[Scripts (AVSI)]  [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.avsi  [2019-10-20]

[Uncategorized files]  [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.txt  [2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins\ffms2.lib  [2016-12-29]
C:\Program Files (x86)\AviSynth+\plugins\ffmsindex.exe  [2016-12-29]



Code:
AVSMeter 2.9.8 (x64), 2012-2020, (c) Groucho2004

VersionString:              AviSynth+ 3.4 (r2923, 3.4, x86_64)
VersionNumber:              2.60
File / Product version:     3.4.0.0 / 3.4.0.0
Interface Version:          6
Multi-threading support:    Yes
Avisynth.dll location:      C:\Windows\SYSTEM32\avisynth.dll
Avisynth.dll time stamp:    2019-10-20, 12:58:12 (UTC)
PluginDir2_5 (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+   (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64+


[C++ 2.6 Plugins (64 Bit)]  [Version, Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\ConvertStacked.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64+\DirectShowSource.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64+\ImageSeq.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64+\Shibatch.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64+\TimeStretch.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64+\VDubFilter.dll  [n/a, 2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64\ffms2.dll  [n/a, 2016-12-29]

[Scripts (AVSI)]  [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.avsi  [2019-10-20]

[Uncategorized files]  [Time stamp]
C:\Program Files (x86)\AviSynth+\plugins64+\colors_rgb.txt  [2019-10-20]
C:\Program Files (x86)\AviSynth+\plugins64\ffms2.lib  [2016-12-29]
C:\Program Files (x86)\AviSynth+\plugins64\ffmsindex.exe  [2016-12-29]
JackBrody is offline   Reply With Quote
Old 18th February 2020, 00:55   #30  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
You dont need the .Lib files.
ffmsindex.exe only needed if you use it via command line.

I thought AvsMeter showed Operating System, I guess not.
What does Info show for faulting clip on x64 ?
Post to PostImage.org, dont need account. [Paste thumbnail for forum, or link for forum]

There is defo a later version ffms2 than 2016 [at least for W7].
I'm using this one on W7,x64, FFMS2_a26x64_2.23.1_MSVC_FFMPEG_4.2.2(l33tmeatwad).dll [just description, the file aint called that]
W7, x86, FFMS2_a26x86_2.23.1_MSVC_FFMPEG_4.2.2(l33tmeatwad).dll
And on XP,x64, ffms2_a26x64(XP)_2.23_clang.dll
XP x86, ffms2_C_x86_r1315_119_avs_vsp_LastXP.dll
[EDIT: Above dll is a C version, LoadCPlugin, will auto load in Avs+ OK]
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???

Last edited by StainlessS; 18th February 2020 at 01:08.
StainlessS is offline   Reply With Quote
Old 18th February 2020, 04:36   #31  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by StainlessS View Post
I thought AvsMeter showed Operating System, I guess not.
It does if you output to a log file and not just capture the screen.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 18th February 2020, 04:41   #32  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by JackBrody View Post
I got "Avisynth open failure: FFVideoSource: No suitable output format found" error on the line with 37-th FFmpegSource2() call.
Post your complete script.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 20th February 2020, 22:14   #33  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
Stainless: Info() output follows. BTW it is the same for all the clips as they were shot on the same day with the same camera:



Groucho2004: script after anonymization:

Code:
function Poznamka(clip c, int startFrame, string text) {
    time = 6  
	endFrame = startFrame + Int(c.FrameRate * time)
	return c.subtitleEx(text, firstframe = startFrame, lastframe = endFrame, x = -50, y = -50, size = 40, textcolor = $00FFFFFF, halocolor = $00000000, effects = "bf(25,25)")
}







function Prostrih(clip c, clip insertedClip, float startTime) {
    insFrames = insertedClip.frameCount
    fps = c.FrameRate
    startFrame = Int(startTime * fps)
    
    clipBefore = c.Trim(0, startFrame - 1)
    clipAfter = c.Trim(startFrame + insFrames, 0)
    montage = clipBefore + insertedClip + clipAfter
    return AudioDub(montage, c)
}






function ProlinackaPresCernou(clip c1, clip c2, int frames) {
    return c1.FadeOut(frames) ++ c2.FadeIn(frames)
}







function TrimByTime(clip c, float startTime, float endTime) {
    fps = c.FrameRate
    startFrame = Int(startTime * fps)
    endFrame = Int(endTime * fps)
    return c.Trim(startFrame, endFrame)
}






















prvni_klip = FFmpegSource2("video.mp4", atrack = -1).Trim(0, 100)


cerna_2s = BlankClip(prvni_klip, length = 50)























BlankClip(prvni_klip, length = 150).Subtitle("some text", x = 960, y = 540, align = 5, lsp = 500, size = 100)
FadeIn(50)










Dissolve(prvni_klip, 50) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(10, -75) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(209, -220)









prostrihNaTuristy = FFmpegSource2("video.mp4", atrack = -1).Trim(0, 100)

ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).Trim(500, 1354).Prostrih(prostrihNaTuristy, 13.48), 25) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(53, 240) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(5, 265)







ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).Trim(185, -100).Amplify(0.3), 25) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(5, -100) ++ \
FFmpegSource2("video.mp4", atrack = -1).Trim(596, 775)


Dissolve(FFmpegSource2("video.mp4", atrack = -1).Trim(10, 0), 25)  
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(25, 178))  
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(503, -100))  


Dissolve(FFmpegSource2("video.mp4", atrack = -1).Trim(10, -150), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(10, -125))

ProstrihNaSnehulaka = FFmpegSource2("video.mp4", atrack = -1).Trim(100, -140)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(310, 844).Prostrih(ProstrihNaSnehulaka, 10))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(75, -100))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Trim(10, -100))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(2.67, -4))





ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(2.979, -5).Amplify(0.3), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1.13, 9.05))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.5, -5))  
Dissolve(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1.7, -4.5), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.5, 9.52))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.5, -6))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 0))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(11.369, 27.28))




ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1, 9.2), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 0))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -4.5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(7.43, 0))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))  
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(9, 35)) 

Dissolve(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(4, 0), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1.6, 4.8))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 7))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))


Dissolve(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 0), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 0).Amplify(0.3))









ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.2, 5), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(8.2, 18))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(7.6, 13.6))

Dissolve(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1, 8), 25) 
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, -5))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 6)) 
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(14.5, 30.2))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(7.08, 20.1))
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(44.3, 58.5))






ProlinackaPresCernou(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(2.1, 8), 25)
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(6, 13))

Dissolve(FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 10), 25)


prostrih1 = FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.3, 5.1)  
prostrih2 = FFmpegSource2("video.mp4", atrack = -1).TrimByTime(1.5, 6)  
prostrih3 = FFmpegSource2("video.mp4", atrack = -1).TrimByTime(0.2, 6)  
AlignedSplice(FFmpegSource2("video.mp4", atrack = -1).Prostrih(prostrih1, 26.2).Prostrih(prostrih2, 57).Prostrih(prostrih3, 76.9).TrimByTime(0.3, 96.2))

FadeOut(50)
When I open it in 64-bit VirtualDub, it plays just fine.
When in 32-bit VD, I get following error. Line 172 contains 36th call of FFmpegSource2(). Once I got an error different from this one, it was something with insanity (but I guess I am perfectly sane so far )




Sorry for responding after 2 days. I have instant e-mail notification set on this thread from the OP but the forum doesn't send me notification e-mails.
JackBrody is offline   Reply With Quote
Old 20th February 2020, 23:33   #34  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
Maybe the source filter just dont like you having loads of instances open, its kinda crazy too, you just need one instance of the clip opening your "video.mp4",
and after that either use Last or assign to some variable and use that,
eg
Code:
C=FFmpegSource2("video.mp4", atrack = -1)
AClip =C.trim(0,100) ++ C.trim(110,200) ++ C.Trim(500,700)
Also AlignedSplice is exactly the same as "++", and UnalignedSplice same as "+".

I would get a more recent version of ffms2 (both x86 and x64).
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 20th February 2020, 23:42   #35  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
You might be running out of memory on 32 bit for the reasons Stainless stated. Run the script with AVSMeter64 to see how much memory it needs.
__________________
Groucho's Avisynth Stuff
Groucho2004 is offline   Reply With Quote
Old 20th February 2020, 23:57   #36  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
There is a known problem (with any source filter) when you hit some limit on file open count, it seems to be a system resource limit and may
be different for each source filter.
Here a thread on it:- https://forum.doom9.org/showthread.p...it#post1532807
x64 probably just has a higher limit and so you have escaped so far. Modify your method, ie dont open the same file gazillions of times.

More:
https://forum.doom9.org/showthread.p...+resouce+limit
[See IanB post] https://forum.doom9.org/showthread.p...+resouce+limit

There are probably many more threads mentioning the problem.

Quote:
Originally Posted by IanB View Post
@hinsdale1,

Yes it is the number of Direct Show environments created by each DirectshowSource() that is killing you. Each one is sizeable.

The error message indicates severe lack of free memory in the process address space.

The call was for an 8Mb chunk, SetMemoryMax was 512Mb, but there was only 64Mb already allocated (probably as 8 of 8Mb buffers) in the frame cache so far. So the address space is pretty maxed out, 64MB is about 3% of the 2GB address space.

Options:-

If you environment supports it you could try the 3GB hack. This might give you upto 50% more address space.

Try SetMemoryMax(32), this will force very aggressive reuse of the existing buffers.

Assuming the shape and sizes are compatible, externally splice your individual .mkv sources into a single big mkv source so you only need a single Direct Show environment. You could then cut the single input clip back into component clips to maintain your work flow.

Try a different source filter technology, like ffmeg or DG, that may be less memory intensive.
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 21st February 2020, 01:35   #37  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
Every FFmpegSource2() loads a different video. By the "anonymization" I meant that I removed everything that was personal. So were the names of my videos so I replaced them with "video.mp4".


From the log created by AVSmeter64:

Code:
Log file created with:      AVSMeter 2.9.8 (x64)
Script file:                c:\video\script.avs

[OS/Hardware info]
Operating system:           Windows 10 (x64) (Build 18362)

CPU:                        AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx / Ryzen 5 (Picasso)
                            MMX, MMXEXT, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, SSE4A, FMA3, AVX, AVX2
                            4 physical cores / 8 logical cores


[Avisynth info]
VersionString:              AviSynth+ 3.4 (r2923, 3.4, x86_64)
VersionNumber:              2.60
File / Product version:     3.4.0.0 / 3.4.0.0
Interface Version:          6
Multi-threading support:    Yes
Avisynth.dll location:      C:\Windows\SYSTEM32\avisynth.dll
Avisynth.dll time stamp:    2019-10-20, 12:58:12 (UTC)
PluginDir2_5 (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64
PluginDir+   (HKLM, x64):   C:\Program Files (x86)\AviSynth+\plugins64+


[Clip info]
Number of frames:                12908
Length (hh:mm:ss.ms):     00:08:36.320
Frame width:                      1920
Frame height:                     1080
Framerate:                      25.000 (25/1)
Colorspace:                       i420
Audio channels:                      2
Audio bits/sample:                  32 (Float)
Audio sample rate:               48000
Audio samples:                24783360


[Runtime info]
Frames processed:               12908 (0 - 12907)
FPS (min | max | average):      116.9 | 3290 | 411.3
Process memory usage (max):     4042 MiB
Thread count:                   493
CPU usage (average):            70.7%

Time (elapsed):                 00:00:31.384
JackBrody is offline   Reply With Quote
Old 21st February 2020, 03:59   #38  |  Link
StainlessS
HeartlessS Usurer
 
StainlessS's Avatar
 
Join Date: Dec 2009
Location: Over the rainbow
Posts: 7,490
Quote:
so I replaced them with "video.mp4"
OK, but makes no difference as far as the number of open files.

This dont look good.
Quote:
Process memory usage (max): 4042 MiB
__________________
I sometimes post sober.
StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace

"Some infinities are bigger than other infinities", but how many of them are infinitely bigger ???
StainlessS is offline   Reply With Quote
Old 21st February 2020, 17:44   #39  |  Link
JackBrody
Registered User
 
Join Date: Feb 2020
Posts: 11
Well, I have 16 GB of RAM, no problem with 4 GB used. But 32-bit aplications are only able to address 3,5 GB, right?

Groucho2004, how about add memory size to the output of AVSMeter? Might be relevant sometimes.
JackBrody is offline   Reply With Quote
Old 21st February 2020, 17:55   #40  |  Link
Groucho2004
Cranky Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,571
Quote:
Originally Posted by JackBrody View Post
32-bit aplications are only able to address 3,5 GB, right?
On a 64 bit OS it's very close to 4GB. Nevertheless, you're really hitting that limit.

Quote:
Originally Posted by JackBrody View Post
Groucho2004, how about add memory size to the output of AVSMeter? Might be relevant sometimes.
Which memory size? Total? Remaining? For the active process I presume?
__________________
Groucho's Avisynth Stuff
Groucho2004 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 09:36.


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