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. |
|
|
Thread Tools | Search this Thread | Display Modes |
20th April 2009, 20:11 | #1 | Link |
Registered User
Join Date: Apr 2009
Posts: 102
|
AviSynth rendered subtitles to BluRay SUP/PGS and BDN XML (v2.08)
AVS to BluRay SUP/PGS and BDN XML
News As of version 2.00, avs2bdnxml supports direct conversion to the BluRay SUP format. This is still somewhat experimental, but seems to work for many people. History First, a bit of history. I wrote avs2bdnxml in late 2008 as the result of a discussion with Daiz in the x264 IRC channel. Back then, there wasn't a reasonable way to actually do something useful with BDN XML files, so I mostly forgot about it. Now there are at least two programs, which can convert BDN XML+PNG to BD-SUP format. This resulted in me fixing a couple of bugs, and then deciding to post it here. Purpose Now, what does it do, you might ask. The answer to this is pretty simple. avs2bdnxml takes an AviSynth script which outputs RGBA, and turns it into a BDN XML file + PNG files. Now, it seems that Ulf wrote something similar. The main difference is that avs2bdnxml can convert anything AviSynth can generate to BDN XML (just make sure it still looks good after being palletized), not just subtitles. For example you can turn the following (and combinations thereof) into BluRay subtitles:
Usage
Download avs2bdnxml v2.08 Website Changes Version 2.08
Version 2.07
Version 2.06
Version 2.05
Version 2.04
Version 2.03
Version 2.02
Version 2.01
Version 2.00
Version 1.13
Version 1.12
Version 1.11
Version 1.10b
Version 1.10
Version 1.9
Version 1.8
Version 1.7
Version 1.6
Version 1.5
Last edited by ps auxw; 21st March 2015 at 17:44. Reason: Release of avs2bdnxml 2.08 |
27th July 2009, 05:30 | #2 | Link |
Registered User
Join Date: Apr 2007
Posts: 20
|
I'd like to give this program a try, but I'm new to AVIsynth usage:
video=AviSource("video.avi") MaskSub("subtitles.ext",video.width,video.height,video.framerate,video.framecount) I'm trying to use an ASS file. What is the "avisource" referred to above? When using an ASS file, what is the video referenced to in this script? How do I determine the "framecount" of the ASS file that I intend to use? |
27th July 2009, 15:41 | #3 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
I too don't see what AviSource is supposed to do there but you may want to take a look at PunkGraphicStream which was published recently.
|
27th July 2009, 17:11 | #4 | Link | |
Registered User
Join Date: Apr 2009
Posts: 102
|
Quote:
Code:
MaskSub("subtitles.ass",1920,1080,23.976024,framecount) length in seconds * framerate So if your last subtitle ends at 01:24:05.4 and the BluRay you will be mastering is 24000/1001 fps, your framecount will be: (60*60*1 + 60 * 24 + 5.4) * (24000 / 1001) = 120969 (round up) Of course, you could also just use a high value for framecount that's sure to be more than enough (like 216000 for length below 2 hours). That'll just make conversion take a bit longer, but shouldn't hurt otherwise. I hope things are a bit clearer now. If not, please ask. Last edited by ps auxw; 27th July 2009 at 21:30. |
|
7th August 2009, 07:02 | #6 | Link |
Registered User
Join Date: Mar 2006
Posts: 116
|
I'm using aegisub to create the ass file, my video is NTSC 29.97fps nondrop, if I import the bdn-xml file straight into scenarist BD, the subtitle just gradually out of sync. So what process (framerate transform) do I need to apply, either on the original output or change the input framerate in command line?
The image output part is fine, quality is slightly better than tsmuxer (used fireworks to downgrade the pngs to 8 bit RGBA), but still has some white stuff uncleared on the outline (particularly visible in TotalMedia Theatre). So far the only tool that can generate perfect commercial quality Blu-ray subpicture is lemony pro, but that one is too hard to use. This tool seems promising, as long as if I can figure out how to get the timecodes fixed... |
7th August 2009, 16:31 | #7 | Link | ||
Registered User
Join Date: Apr 2009
Posts: 102
|
Quote:
1) Call avs2bdnxml with FRAMERATE as 30. Calling it with 29.97 should produce drop timecodes. 2) If this is still no good, open the .xml file and set FrameRate="29.97" in the format tag. Does this help with the desync? Quote:
|
||
12th August 2009, 08:58 | #8 | Link |
Registered User
Join Date: Mar 2006
Posts: 116
|
Yes, the 30fps corrected the drop problem, big thanks for the program and quick reply. But this option is not listed in the input:
FRAMERATE Either of: 23.976, 24, 25, 29.97, 50, 59.94 After getting the xml file, it has to be edited back to 29.97 since scenarist BD only takes 29.97 drop or non-drop. And I assume for 23.976 non-drop source, I have to use 24 as input to avoid drop problem, right? For the image quality, after I uncheck "Remove unused colors" in fireworks, the quality improves quite a bit. Now I have to look really close to see the white pixels, but they are there. So what's the reason you choose to output non 8bit RGBA pngs? It seems a little impractical to have true color pngs since most programs are designed to output BDMV structure. Also I've tried the pinned PunkGraphicStream which has almost the same function as this one, except it only generates sup file ready to use for tsmuxer. That program uses libass which generates the sup file quite fast, while this program scans every frame of the video and output png one by one which takes quite some time. Have you considered to improve the efficiency of the program? Last edited by hamletiii; 12th August 2009 at 09:03. |
12th August 2009, 16:04 | #9 | Link | |||||
Registered User
Join Date: Apr 2009
Posts: 102
|
An updated version can be found in the first post.
Quote:
Quote:
Quote:
Quote:
Quote:
|
|||||
15th August 2009, 14:29 | #10 | Link |
Registered User
Join Date: Mar 2006
Posts: 116
|
Thanks for the quick update. Definitely looking forward to the optimized version.
And for downgrading from 32bit RGBA png, BDSup2Sub handles the job really well. I think it's either Fireworks or me screwed up in the process because the pngs from BDSup2Sub are really good, no more white pixels! I've also tried time collision, and fade in/fade out, they import and compile fine in scenarist BD. The fading effect plays smoothly in Totalmedia Theatre. |
15th August 2009, 23:18 | #11 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
I'm also having problems with subtitles being out of sync. I've attached a sample. Just compare the timing of the first and last line of the xml with the first and last line of the ass.
Last edited by sneaker_ger; 15th August 2009 at 23:25. |
17th August 2009, 03:24 | #12 | Link | |
Registered User
Join Date: Apr 2009
Posts: 102
|
Quote:
Are you sure this is out of sync? Comparing the timestamps of the last/first non-comment lines, it looks fine to me. Please note that the last part in BDN XML timestamps (the 09 in 00:21:18:09) is given in frames, not hundredths of seconds. |
|
17th August 2009, 15:14 | #13 | Link | |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Quote:
I got desync of the subtitles when playing the test Blu-Ray I created and thought this would be the cause. But since my PC is slow and I don't own a standalone Blu-Ray player yet it could just be my slow PC causing those problems. I'll try to investigate more. |
|
17th August 2009, 23:09 | #16 | Link |
Registered User
Join Date: Apr 2007
Posts: 20
|
I was using a workflow of Aegisub -> DVD-Sup -> BD-Sup and would have a flicker problem with colliding subs.
Anyway, when I do Aegisub->avs2bdnxml->BD-Sup the "flicker problem" is gone! And the subs look really good! So far this is the only method that I know of when using many different sub styles that collide (as is common in anime subs). Thank you! |
17th August 2009, 23:30 | #17 | Link | |
Registered User
Join Date: Apr 2009
Posts: 102
|
Quote:
|
|
18th August 2009, 00:53 | #18 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
Thx, that seems to do the trick. But it's highly irritating having to set the wrong framerate to say the least. Can you explain to me why and in which cases this has to be done?
Another problem: Code:
<Event Forced="False" InTC="00:16:30:13" OutTC="00:16:33:23"> <Graphic Width="1280" Height="720" X="0" Y="0">00023774.png</Graphic> </Event> <Event Forced="False" InTC="00:16:33:18" OutTC="00:16:35:04"> <Graphic Width="1280" Height="720" X="0" Y="0">00023851.png</Graphic> |
18th August 2009, 05:18 | #20 | Link |
Registered User
Join Date: Mar 2006
Posts: 116
|
I found this thread explaining the drop/non-drop timecodes.
http://forum.doom9.org/showthread.php?t=73400 This is not the first subtitle software that requires a framerate conversion. DVDMaestro for instance requires 29.97 fps for input and 30 fps for output for any NTSC 29.97 non-drop source. Maybe a second level prompt could be added if user choose 24fps as input: Is the source 23.976 non-drop frame or 24p? If 23.976 non-drop frame -> xml writes 23.976 in the field If 24p -> xml writes 24 in the field. |
Thread Tools | Search this Thread |
Display Modes | |
|
|