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,465
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
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,554
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: 4
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
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,554
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: 4
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
Fossil
 
Groucho2004's Avatar
 
Join Date: Mar 2006
Location: A wretched hive of scum and villainy
Posts: 4,554
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
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 07:56.


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