Avidemux Forum

Avidemux => Main version 2.6 => Topic started by: IPl on January 30, 2013, 06:47:04 PM

Title: Filter SSA
Post by: IPl on January 30, 2013, 06:47:04 PM
Avidemux 2.6.1, Fedora 17
Subtitle filter SSA not work.
Title: Re: Filter SSA
Post by: Nik on January 31, 2013, 05:05:53 AM
doesn't work for some time now ...
Title: Re: Filter SSA
Post by: Jan Gruuthuse on January 31, 2013, 10:09:55 AM
If you're running avidemux Gtk try with avidemux QT: Lack of manpower to work on the GTK version (http://www.avidemux.org/smf/index.php/topic,11641.msg61603.html#msg61603)
Title: Re: Filter SSA
Post by: IPl on January 31, 2013, 02:53:32 PM
It is Avidemux 2.6.1 QT version with KDE 4.9.5.
Title: Re: Filter SSA
Post by: Jan Gruuthuse on January 31, 2013, 03:21:18 PM
You have these installed from here: http://avidemux.org/nightly/fedora17_32/ in sequential order?
- avidemux3-core
- avidemux3-plugins-COMMON-
- avidemux3-qt4-
- avidemux3-plugins-QT4-
Find attached small SSA demo file. Should show subtitle at 5,7 & 9 seconds in to play for about 2 seconds.
Load video. Select Video Output like Mpeg4 AVC (x264). In Filters select in Subtitles: SSA. Point in pop-up box to Subtitle file avidemux.ass (attached to this posting) and click [Open]. Close Video Filter Manager. Switch to Output view and press play.
The player shows these when switching the Preview mode and only when playing!
Input view: (https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.avidemux.org%2FadmWiki%2Flib%2Fexe%2Ffetch.php%3Fmedia%3Dusing%3Ainput-qt.png&hash=1a4ac461c33b0afea1bd67cc2a155e2a0f46186e) switch to Output view: (https://avidemux.org/smif/proxy.php?request=http%3A%2F%2Fwww.avidemux.org%2FadmWiki%2Flib%2Fexe%2Ffetch.php%3Fmedia%3Dusing%3Aoutput-qt.png&hash=490ba8a6d3adaf40c6255019b0d5cc148be0fe52)
ps: drag avidemux by corner, so it shows video canvas completely and not a partial video.
Title: Re: Filter SSA
Post by: Nik on February 02, 2013, 01:21:19 PM
@Jan: I don't see any subs in the x32 windows version
(and I tried to replace the dll files mentioned in some other threads here)
did anything change in the .ass (or .ssa) file syntax?
I use my subtitle script that I successfully used in avidemux 2.5
Title: Re: Filter SSA
Post by: Jan Gruuthuse on February 02, 2013, 02:18:58 PM
@Nik: download this avidemux_r8455_win32.7z from http://avidemux.org/nightly/win32/ and unpack with http://www.7-zip.org/ and replace the content where you installed avidemux. As I understand it it should be there. Try with above attached avidemux.ass.
Title: Re: Filter SSA
Post by: Nik on February 03, 2013, 06:15:15 PM
@Jan: that's the version I use (I always try to use the newest version if possible)
but after loading the subtitle file nothing happens/appears after 5 sec playtime (of course in output mode, I hope there will be an output mode as it is in 2.5 in one of the next versions, kinda uncomfortable to see it only when playing the video ;D)
odd :o
Title: Re: Filter SSA
Post by: mean on February 03, 2013, 07:06:40 PM
Confirmed, it does not work anymore on my test sample
Title: Re: Filter SSA
Post by: Nik on March 23, 2013, 05:26:36 PM
any news on this one? :)
Title: Re: Filter SSA
Post by: Jan Gruuthuse on March 24, 2013, 05:37:09 AM
Try last nightly or 2.6.2 found here: Test installer for avidemux 2.6.2 (http://www.avidemux.org/smf/index.php/topic,11934.0.html)
Title: Re: Filter SSA
Post by: Nik on March 24, 2013, 06:36:52 PM
hmmm
got 8508 yesterday and 8509 just now and I don't see any subs :)
(tested with your test file found in this thread)
Title: Re: Filter SSA
Post by: Jan Gruuthuse on March 25, 2013, 09:06:31 AM
There might be slight differences between nightly and Avidemux for Windows (http://avidemux.razorbyte.com.au/) by Gruntster.
If that did not work:
Consider installing a second OS on your system (dual boot windows/ubuntu). Can use the 2nd hard disc for this and select bios boot menu for doing so. If you're not familiar with these procedures look for some help from computer nerd ;) (needs resizing of 2nd hard disk partition, creating  a primary on it 100 GB would be enough)
FOR safety disconnect 1st hard disc with windows when installing on second harddisc
external harddisc (c/w)ould be possible to, but slower.
ASS is still working in linux.
Title: Re: Filter SSA
Post by: Nik on April 22, 2013, 04:06:43 PM
alright

just tried 8606 and I see ssa/ass subs working! yay! :D
thanks :D

BUT! I have one question :)

I encode with predefined AR. This way, the subs have a correct AR of 1:1 but video players stretch the video to 16:9 and also the subs will be stretched
is there a way to squeeze the text so that it looks alright after AR correction?
Title: Re: Filter SSA
Post by: Jan Gruuthuse on April 22, 2013, 06:56:10 PM
Can't see directly a solution to this, if font is stretched? Try some narrow/condensed width fonts? Unless developers have a solution for this within avidemux.
Have you checked in SSA subtitle editor if it has a font squeeze option or to 16:9 display option?
Title: Re: Filter SSA
Post by: Nik on April 22, 2013, 08:06:01 PM
Jan, not yet :)
I usually use a simple sub file as watermark or edit the text with notepad ... lol

I have to check this later :)
Title: Re: Filter SSA
Post by: Jan Gruuthuse on April 23, 2013, 08:23:44 AM
tested by me, and found to be functional:
QuoteAnamorphic video

OR: How to get your subtitles to not look stretched

The following paragraphs assumes that you have a working knowledge of what anamorphic video is and how aspect ratios work. If you feel unsure, you may want to consult a gentle but fairly complete introduction. (http://www.hometheaterhifi.com/volume_6_4/feature-article-enhanced-widescreen-november-99.html)

Image stretching and subtitle rendering

An anamorphic image needs to be stretched to the proper aspect ratio before it is presented to the viewer. On a computer, this is usually done by the video renderer, and thereby lies a problem. Most subtitle renderers (including VSFilter, the current "standard" renderer) do the subtitle drawing on the image before it is stretched, and since the renderer is not aware of any aspect ratio issues, the subtitles will be stretched along with the image when the video is displayed to the viewer, and therefore they will look stretched. Aegisub does its subtitle rendering this way as well (since that way it will be WYSIWYG with most players); you can test how it looks by using the "Override aspect ratio" in the video menu.

Compensating for the stretching

Fortunately it's easy to compensate for the stretching, since you know by how much the image will be stretched (since you know its original dimensions and the display aspect ratio). You just calculate how many percent the image will be stretched in either the X or the Y direction, and then set the ScaleX or ScaleY parameter in the style (or use the \fscx or \fscy overrides) to the same amount but in the other direction.

Example: we have a 704x480 image that we know will be displayed as 16:9 (or 1.7777...:1). If we assume that the player will stretch the width but leave the height untouched, this means that the new width will be: (16 / 9) * 480 = 853.333... which in percent is: 853.333... / 704 = 1.212121... i.e. 121%. Hence, to compensate for this horizontal (X-direction) stretch we set ScaleY in all our styles to 121% to stretch the subtitles by the same amount, and after rendering they now no longer look stretched.

OR we can do the stretching in the other direction, assuming that the player changes the height of the image instead. Assuming the same image: 704 / (16 / 9) = 396 which corresponds to: 396 / 480 = 0.825 or 82.5%, which means we can compensate for the vertical (Y) compression by setting ScaleX to 82.5%.

source: From installed aegisub 3.0 documentation

with ScaleX you can achieve the wanted result with the calculation from example and change the value for ScaleX in the ssa file:
QuoteFormat: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,45,&H00FFFFFF,&H000000FF,&H00000000,&H02000000,0,0,0,0,100,100,0,0,3,0,0,2,20,20,15,1
Style: Default,Arial,45,&H00FFFFFF,&H000000FF,&H00000000,&H02000000,0,0,0,0,121,100,0,0,3,0,0,2,20,20,15,1
keep in mind: while testing I switched the ScaleX and ScaleY: the 121% should have been in ScaleY and not in ScaleX
attached screenshots and ssa sample file are from/for 720p video.
Title: Re: Filter SSA
Post by: Nik on April 24, 2013, 05:15:37 PM
woah, many thanks, Jan!!
very helpful :)
Title: Re: Filter SSA
Post by: Jan Gruuthuse on April 24, 2013, 05:20:27 PM
Think if time is there and no other urgent priorities (like current windows development) perhaps mean or another developer can do something in avidemux ssa filter to adjust these values with some kind of control in preview (gui).