View unanswered posts | View active topics It is currently December 14th, 2017, 3:27 pm



Reply to topic  [ 26 posts ]  Go to page Previous  1, 2, 3  Next
 Sample code to use SupTitle to convert Blu-Ray PGS files ple 
Author Message
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
Is your .dga cropped?

Try this as your source: BlankClip(300000, 1920, 1080, "YV12", 24000, 1001)

Code:
LoadPlugin("SupTitle.dll")
BlankClip(300000, 1920, 1080, "YV12", 24000, 1001)
SupTitle("yourfile.sup", false)


Then play it back in Windows Media Player, and seek to the timecode of your subs.
Also, can you confirm your sup file is valid (probably with another sup capable software)?


August 5th, 2009, 11:48 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
Curiosity finally got the best of me and I rebooted into XP and tried again—still no sign of any subtitles!


August 7th, 2009, 3:30 am
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
Link to your sup file please.
I'll take a look.


August 7th, 2009, 12:19 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
At last I have some time to reply in an orderly manner to your posts!

Quote:
Is your .dga cropped?


No, it is not cropped.

Quote:
Try this as your source: BlankClip(300000, 1920, 1080, "YV12", 24000, 1001)
Code: Select all
LoadPlugin("SupTitle.dll")
BlankClip(300000, 1920, 1080, "YV12", 24000, 1001)
SupTitle("yourfile.sup", false)

Then play it back in Windows Media Player, and seek to the timecode of your subs.
Also, can you confirm your sup file is valid (probably with another sup capable software)?


I tried this and received the longest error message I have ever seen in Windows Media Player (see below). I have never programmed anything to do with video so I have no idea what this means although I wonder if it might be some sort of parsing problem???

System.IO.DirectoryNotFoundException. Could not find a part of the path 'G:\Video Hold\Eng1.sup

as System.IO._Error.WinIOError(Int32 errorCode, String maybeFullPath)
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions.options, SECURITY_ATTRIBUTES secAttrs. String msgPath, Boolean bFromProxy)
at System.Io.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at SupCore.SubtitleFile.LoadFromSup(String supfile)
at SupCore.SupCoreMain..ctor(String filename.Double fps, Boolean forcedOnly)
at SupTitle (ctor)(SupTitle*, PClip* child, String filename, Boolean forcedOnly, IScriptEnvironment* env)
at SupTitle.Create(AVSValue*, AVSValue* args, Void* user_data, IScriptEnvironment* env)
(G:\Hold\Video Hold\test.avs, line 3)

With regard to whether the sup file is valid, SupRip has no problem with it!

Below is a link to the sup file.

http://www.4shared.com/file/123767539/e ... /eng1.html

Thanks again!


August 9th, 2009, 5:18 am
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 the error message, you could tell that G:\Video Hold\Eng1.sup doesn't exist.


August 10th, 2009, 10:43 am
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
Your Sup file is fine. It runs fine too in Windows Media Player using this avs:

Code:
LoadPlugin("C:\......\SupTitle.dll")
return blankclip(300000, 1920, 1080, "YV12", 24000, 1001, color=$aaaaaa).SupTitle("C:\......\eng1.sup", false)

So, most likely not a SupTitle problem.

To help you debug, try the following in your avs:
Code:
blankclip(300000, 1920, 1080, "YV12", 24000, 1001, color=$aaaaaa)


Play it back in WMP and see if you get a gray screen.
Also, try updating your AVISynth to 2.5.8 (Last updated 30 Dec 2008 on SourceForge).


August 10th, 2009, 1:38 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
Image


August 10th, 2009, 3:35 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
Thanks for the additional suggestions.

The code below plays okay on Windows Media Player but, once again, no subtitles!

Code:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\SupTitle.dll")
return blankclip(300000, 1920, 1080, "YV12", 24000, 1001, color=$aaaaaa).SupTitle("G:\Video Hold\eng1.sup", false)


As for this code:

Code:
blankclip(300000, 1920, 1080, "YV12", 24000, 1001, color=$aaaaaa)


it also plays without a problem but it displays a black rather than a grey screen.

I am already using AviSynth 2.5.8.

PS—I am traveling now and so I am doing this on a second physical machine with the same results as on my main home machine!


August 11th, 2009, 1:15 am
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:
it also plays without a problem but it displays a black rather than a grey screen.


Your problem has *NOTHING* to do with SupTitle. You do realize the script you played is simply meant to render a gray screen and even that didn't work? :roll:

If you don't see a gray screen, that means your AviSynth isn't working at all. Once you get the blankclip statement to display gray screen in Windows Media Player, you'd be able to see the subtitles.

Your problem is in AviSynth (or player) not performing any video mixing.

One very simple mistake I could think of is under WMP (v11) --> Tools --> Options --> Performance tab --> Advanced..., you may not have "Use video mixing renderer" enabled under Video Acceleration.

Other than that, you'll have to find an AviSynth forum and ask for help.


August 11th, 2009, 11:40 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
Quote:
Your problem has *NOTHING* to do with SupTitle. You do realize the script you played is simply meant to render a gray screen and even that didn't work?


Yes—which puzzles me greatly! :?

Quote:
If you don't see a gray screen, that means your AviSynth isn't working at all. Once you get the blankclip statement to display gray screen in Windows Media Player, you'd be able to see the subtitles.

Your problem is in AviSynth (or player) not performing any video mixing.

One very simple mistake I could think of is under WMP (v11) --> Tools --> Options --> Performance tab --> Advanced..., you may not have "Use video mixing renderer" enabled under Video Acceleration.


All right—no video mixing certainly seems to be the most plausible explanation.I am using WMP version 11 however and I don't seem to have an Advanced button on the Performance tab.

Quote:
Other than that, you'll have to find an AviSynth forum and ask for help.


I will do so—and when I get to the bottom of this I will post the solution here in case any other SupTitle users experience the same problem. In the meantime, once again many thanks for your help!


August 12th, 2009, 12:00 am
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 26 posts ]  Go to page Previous  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.