View unanswered posts | View active topics It is currently June 28th, 2017, 11:22 am



Reply to topic  [ 26 posts ]  Go to page 1, 2, 3  Next
 Sample code to use SupTitle to convert Blu-Ray PGS files ple 
Author Message

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Sample code to use SupTitle to convert Blu-Ray PGS files ple
Unfortunately I don't find the sample code at http://www.zachsaw.co.cc/?pg=suptitle_p ... nth_plugin very helpful in terms of how one would proceed using eac3to with an AviSynth file to convert Blu-Ray PGS to a standard SUP subtitles file. :?

The sample you give there (see below) appears to assume an AVI file source. Although I am relatively familiar with both AviSynth and eac3to, I can't see exactly what you intend in terms of using them with your SupTitle DLL plug-in for AviSynth.

Specifically, to take a PGS from a Blu-Ray would one first save the PGS files separately by demuxing, say with tsMuxer, and then use eac3to on the resulting PGS files or should one use eac3to to do the extraction directly. In either case, a bit of sample code would be most helpful and appreciated.

Thanks for this!

Code:
LoadPlugin("C:\SupTitle\SupTitle.dll")
clip = DirectShowSource("C:\movie.avi")
return clip.SupTitle("C:\subtitle-forced.sup", false)


July 30th, 2009, 9:26 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
Quote:
Unfortunately I don't find the sample code at http://www.zachsaw.co.cc/?pg=suptitle_p ... nth_plugin very helpful in terms of how one would proceed using eac3to with an AviSynth file to convert Blu-Ray PGS to a standard SUP subtitles file.


I think you're barking up the wrong tree mate. 8-)

SupTitle does NOT convert Blu-Ray PGS files. It's a plugin for AVISynth that renders Sup files you extract from HD DVDs / Blu-ray using eac3to (as the site clearly says) -- no conversion whatsoever. What's a 'standard' SUP subtitle file? How would you expect AVISynth to convert PGS to your 'standard' SUP subtitle file?

It also has nothing to do with what or how you source your input file for AVISynth - the AVI source in the script is a sample / example and it is exactly what it is, just a sample.

If you're not familiar with eac3to and AVISynth, then you should not be using SupTitle (you probably haven't got a clue how or when to use it in fact).

Here are a couple of links to help you get started:
http://en.wikibooks.org/wiki/Eac3to
http://avisynth.org/mediawiki/Main_Page

And no, you do not need tsMuxer. Use Eac3to to extract PGS streams directly to a .sup file and feed that into your AVISynth render chain.

Again, no one said this is a conversion tool. :roll:


July 31st, 2009, 3:14 pm
Profile

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
Many thanks for the much appreciated clarifications! ;)


July 31st, 2009, 11:23 pm
Profile

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
I took a bit of time this afternoon to think through more carefully your reply to my earlier misguided message, the text surrounding the bit of code you provide on the page where you make your DLL available, and discussion at http://forum.doom9.org/showthread.php?t ... ost1302289.

I now understand, I think, that your DLL renders sup files converted by eac3to from Blu-Ray native PGS files and allows one to superimpose them on the original video source. I do have, however, one more question. I hope it is not nearly as misguided as my previous question.

What I want to do is hard sub forced subtitles. The avs code below seems to work fine except for one small but important detail. When I view the result in Virtual Dub no subtitles appear. Perhaps you could enlighten me as to what I am missing or doing wrong.

While I'm at it, since the sup file contains all the subtitles, how and at what stage can I get rid of everything but the forced subtitles?

Thanks again!
Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SupTitle.dll")
LoadPlugin("C:\Program Files (x86)\DGAVCIndex\DGAVCDecode.dll")
clip = avcsource("E:\Video Hold\00001.track_4113.dga")
return clip.SupTitle("E:\Video Hold\eng1.sup", false)


August 2nd, 2009, 8:12 am
Profile

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
My apologies for another rather naïve bit of code. :? Still, the following two bits of AVS code (one using a DGIndex source and the other the original m2v transcoded source) don't produce any signs of subtitles when viewed in Virtual Dub. So again my two questions are:

1. Why am I not seeing subtitles?
2. When I do get this working, how do I eliminate all but forced subtitles?

Also, one additional question--what's the second (boolean) parameter for?

Okay--let's make it four questions--I normally work in Vista 64 although my main machine is a multiboot with XP SP3 on one of the partitions. So I need to use XP with .net v2 to get this to work???? Vista comes with .net v3 and MS doesn't list Vista as supported for .net v2 x64. I downloaded and installed .net v2 x64 on Vista. The install seems to have been successful but still no subtitles when I play either of the avs files with Virtual Dub.

Thanks for your patience!

Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SupTitle.dll")
LoadPlugin("C:\Program Files (x86)\DGIndex\DGDecode.dll")
clip = mpeg2source("E:\Video Hold\Defiance.d2v")
return clip.SupTitle("E:\Video Hold\eng1.sup", false)


Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SupTitle.dll")
clip = DirectShowSource("E:\Video Hold\Defiance.m2v",fps = 23.970, Framecount = 196796)
return clip.SupTitle("E:\Video Hold\eng1.sup", false)




August 2nd, 2009, 8:40 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
From SupTitle's download page:

Quote:
Usage in AviSynth Script:

clip.SupTitle(string-filename, bool-forcedSubOnly)


As for why you're not seeing the subtitles, the only thing I can think of is make sure your input source has a resolution of at least the size of what your subtitles are located. If your source is 320x240 and your subtitles are drawn at coord(120, 1600), obviously you are not going to see anything.


August 3rd, 2009, 12:04 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
.NET v3 uses the same CLR as .NET v2. Nothing's changed on the CLR side going from v2 to v3, so yes, so long as you have .NET v2 or above, you'll be fine.


August 3rd, 2009, 12:06 pm
Profile

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
Hmm—thanks for the replies!

I resize to 720 x 480 using the AVS code below before transcoding. So I guess the obvious question is does SupTitle “scale down”coordinates in any way on the assumption that one is moving from 1080 source to 720 or does it use the original coordinates from the 1080 source? If the latter, it would seem likely that the subtitles are simply off the bottom of the visible image at 720. Any idea what to do about that?

Of course, this may not be the explanation. My first clumsy cut at this, you may have noticed, was to try SubTitle on the original 1080 source video and I did not see any subtitles there either!

Thanks for the clarification on the second parameter—I sort of suspected that was what it was for—and on .net v. 3 compatibility! And thanks for a potentially very useful tool—assuming I can get it to work!

Code:
LoadPlugin("C:\Program Files (x86)\DGAVCIndex\DGAVCDecode.dll")
avcsource("E:\Video Hold\00001.track_4113.dga")
Spline36Resize(720,480)


August 3rd, 2009, 11:20 pm
Profile
Site Admin

Joined: July 4th, 2008, 2:56 pm
Posts: 226
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
Did you seek to the part where u expect the subtitles to appear?
And your latest AVISynth script doesn't even load SupTitle?


August 4th, 2009, 4:50 pm
Profile

Joined: July 30th, 2009, 9:07 pm
Posts: 14
Post Re: Sample code to use SupTitle to convert Blu-Ray PGS files ple
Quote:
Did you seek to the part where u expect the subtitles to appear?


Yes, I checked places I know forced subtitles appeared in the original source--and I tried again with the original 1080 source--no subtitles.

Quote:
And your latest AVISynth script doesn't even load SupTitle?


I know, that's just the code I use to resize before re-encoding.


August 4th, 2009, 9:19 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 26 posts ]  Go to page 1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron
Powered by phpBB.