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 1st March 2021, 12:35   #101  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
So in the past 8 years subtitles are directly specifying the matrix. And if it's not specified directly, it is safe to say that they are 601?
yes, and still there are some use 601 or no info at all (They still use old versions of aegisub or something)
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 1st March 2021, 14:51   #102  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
Quote:
Originally Posted by Reel.Deel View Post
I think what real.finder is trying to say is that ASSFilter should behave like VSFilter. Long ago before HD, Aesgisub and VSfilter treated everything as BT.601. This issue has been discussed in this thread already and was concluded that ASSFilter should move away from legacy crap and keep doing things as they are.... I agree. If someone cares so much about legacy things they should use legacy VSFilter. Also, until now, there weren't any x64 binaries available so I don't think this filter was used much by people, just my guess.



Some history on this issue:
Edit:
Tool to change color matrix on ASS subtitles: ASSColorMatrixConverter
And in the source code as well:
https://github.com/ShiftMediaProject...s_types.h#L106
pinterf is offline   Reply With Quote
Old 1st March 2021, 19:28   #103  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
vsFilter TextSub is exactly doing nothing
Code:
BlankClip(ColorbarsHD(), color = $123456)
TextSub("ctest2.ass")
No hint of color rectangles.
No wonder it perfectly fit the rectangles into colorbars samples because it left the Colorbars image untouched.
Or what did I do wrong?
pinterf is offline   Reply With Quote
Old 1st March 2021, 21:01   #104  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
Quote:
Originally Posted by pinterf View Post
vsFilter TextSub is exactly doing nothing
Code:
BlankClip(ColorbarsHD(), color = $123456)
TextSub("ctest2.ass")
No hint of color rectangles.
No wonder it perfectly fit the rectangles into colorbars samples because it left the Colorbars image untouched.
Or what did I do wrong?
seems it not work with yv24
putting converttoyv12 before TextSub will make it work

edit: ok, seems AssRender and TextSub now are similar with ctest2

here are ctest3 https://www.solidfiles.com/v/Gv3mRXMyre3e5 done by corrects colors manually, it seems work fine in both, the ctest2 was done using old ctest (which also give similar output in TextSub) with aegisub resample resolution

The lesson: no one should use BT.601 with HD in last aegisub, and never trust or wait error report of what color formats filter can work with (vsfilter case with yv24)
__________________
See My Avisynth Stuff

Last edited by real.finder; 1st March 2021 at 21:25.
real.finder is offline   Reply With Quote
Old 4th March 2021, 11:15   #105  |  Link
pinterf
Registered User
 
Join Date: Jan 2014
Posts: 2,309
New release: ASSRender 0.35
This version seemed for me significantly quicker than the previous one.
Code:
### 0.35 (20210304)
* Windows MSVC: Update to libass v0.15
  (git submodule update --init --recursive --remote)
  For changes since v0.14 see https://github.com/libass/libass/blob/master/Changelog
* don't guess base on video resolution (realfinder)
  if .ass file has no Matrix info then it should be treated as it "Rec601" to maintain compatibility
* Parameter 'colorspace' default value is no longer "guess"
* Add more color options: PC.709, PC.601, TV.fcc, PC.fcc, TV.240m, PC.240m, none.
  "none" and "guess" implies "guess-by-resolution".
* Fix: possible crash on initializing phase (buffer overread, linux crashed, Windows was just lucky)
pinterf is offline   Reply With Quote
Old 4th March 2021, 21:35   #106  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
thanks, I did update the wiki http://avisynth.nl/index.php/AssRender
__________________
See My Avisynth Stuff
real.finder is offline   Reply With Quote
Old 28th May 2021, 17:12   #107  |  Link
real.finder
Registered User
 
Join Date: Jan 2012
Location: Mesopotamia
Posts: 2,587
I did post this
Quote:
Originally Posted by real.finder View Post
I did try to make this https://github.com/realfinder/AvsP-m...%20Subtitle.py

it work but sometimes it not accurate, I already try random fix but I think there are something missing, maybe peoples who has knowledge in vsfilter or libass can explain how to correctly convert subtitle time to frames
in https://forum.doom9.org/showthread.php?t=163653

then after I did not get an answer I asked in irc.libera.chat/#libass in IRC and I get this answer "libass simply doesn't. it's given a time, and subtitles are time-based"

so I think the peoples who work on AssRender have the answer

edit: I get an answer, ceil(start timestamp in seconds * frames per second)
__________________
See My Avisynth Stuff

Last edited by real.finder; 28th May 2021 at 17:40.
real.finder is offline   Reply With Quote
Old 12th October 2022, 15:45   #108  |  Link
tormento
Acid fr0g
 
tormento's Avatar
 
Join Date: May 2002
Location: Italy
Posts: 2,542
Is there a way to render ASS to a format suitable to create PGS?

I saw this project but there are no builds.
__________________
@turment on Telegram
tormento is offline   Reply With Quote
Old 12th October 2022, 16:11   #109  |  Link
kedautinh12
Registered User
 
Join Date: Jan 2018
Posts: 2,153
Quote:
Originally Posted by tormento View Post
Is there a way to render ASS to a format suitable to create PGS?

I saw this project but there are no builds.
I seen author was builds:
https://github.com/subelf/Spp2Pgs/releases

Btw, it's already support avs??
kedautinh12 is offline   Reply With Quote
Old 12th October 2022, 16:14   #110  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 104
PunkGraphicStream and easySUP will do direct .ass to .sup.
avs2bdnxml will as well if you're fine using an avisynth script that renders your ASS file.
SubtitleEdit has an option to export to SUP, should work from ASS.

Anything else will need to be converted to BDNXML or other formats first then to SUP.
cubicibo is offline   Reply With Quote
Old 12th October 2022, 21:46   #111  |  Link
mp3dom
Registered User
 
Join Date: Jul 2003
Location: Italy
Posts: 1,135
How these projects are really "BD compliant"? For example, the 4 MB decoding buffer limitation... is it even checked?
Normally, "official" SUP subtitles (created by Scenarist BD), cannot require more than 4 MB of buffer to be decoded but I think these "SUP" could be out of standard.
Avs2bdnxml have the advantage to export PNG+XML subtitles, and these are imported into Scenarist who check that everything is compliant and then encode to SUP. Exporting directly to SUP in this case could be a bit risky.
mp3dom is offline   Reply With Quote
Old 12th October 2022, 23:16   #112  |  Link
cubicibo
Registered User
 
Join Date: Feb 2022
Posts: 104
The 4 MB buffer only applies to displayed objects or the ones that will be displayed next frames. In fact it is not the bottleneck of the hardware SUP decoders. What I find to be the limits are the coded bandwidth (16 Mbps) and decoded bandwith (128 Mbps).

For example, your FSN release has fading staff credits aside of subtitles lines. When the fades happen, all objects are redrawn every frame. The instantaneous PGS bitrate is then 10~11 Mbps (~70% of capacity) at most. During the heaviest epoch you write 7.23 MiB of decoded object data to the buffer in ~13s. Decoded bandwidth is used between 10%~50%. Buffer is never full because on every acquisition, it is flushed.

The 4 MiB buffer is not the issue at all unless you attempt to draw 1920x1080 objects via PGS very often (128 Mbps -> can theoretically draw 1920x1080 images every 120 ms -> ~3 frames, or >6 frames on epoch start as the screen has to be "cleared"). What blows up is the coded buffer bandwidth.

/Salesman person: SUPer has a more advanced bandwidth and buffer checker function than avs2bdnxml. You can easily call it
Code:
from SUPer.render import is_compliant
from SUPer import SupStream
FILE = ...
FPS = ...
sup = SupStream(FILE)
epochs = [epoch for epoch in sup.epochs()]
print(is_compliant(epochs, FPS))
If the stream is not compliant (buffer overflow, bandwidth overflow), it will prints many warnings and "False". If compliant, it will just say "True". There is just one formula I am not certain about: the one linked to message "Data rate above decode rate". If you get this warning, you can proceed with caution and test on hardware first.

Last edited by cubicibo; 12th October 2022 at 23:38.
cubicibo is offline   Reply With Quote
Old 14th January 2023, 00:49   #113  |  Link
mohamedh
Registered User
 
Join Date: Jan 2014
Posts: 6
a slightly naive question but, since this plugin uses libass and not VSfilter. If all I need is to hard-code subtitles (and not using other filters), what would be the advantage of writing a script to hard-code subtitles with AssRender, instead of hard-coding the subs with ffmpeg directly with something like

ffmpeg -i video.mp4 -vf "ass=subtitle.ass" out.mp4

?
mohamedh is offline   Reply With Quote
Old 14th January 2023, 18:19   #114  |  Link
Reel.Deel
Registered User
 
Join Date: Mar 2012
Location: Texas
Posts: 1,664
Quote:
Originally Posted by mohamedh View Post
a slightly naive question but, since this plugin uses libass and not VSfilter. If all I need is to hard-code subtitles (and not using other filters), what would be the advantage of writing a script to hard-code subtitles with AssRender, instead of hard-coding the subs with ffmpeg directly with something like

ffmpeg -i video.mp4 -vf "ass=subtitle.ass" out.mp4

?
I don't think there is any advantage. Both use libass to render the subtitles. If you're not doing anything else to the video, use ffmpeg.
Reel.Deel 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 20:54.


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