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 > General > Subtitles

Reply
 
Thread Tools Search this Thread Display Modes
Old 14th May 2010, 03:08   #61  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
You didn't insert a line break in the middle of the clip.SupTitle statement did you?
Zachs is offline   Reply With Quote
Old 14th May 2010, 06:46   #62  |  Link
ChldsPlay
Registered User
 
Join Date: Nov 2009
Posts: 35
Quote:
Originally Posted by Zachs View Post
You didn't insert a line break in the middle of the clip.SupTitle statement did you?
Yes, actually I just copied and pasted the example and changed the file names etc.

I fixed that and now whichever program I use to open it stops working and has to close.
ChldsPlay is offline   Reply With Quote
Old 14th May 2010, 07:52   #63  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Try your script without SupTitle first. Isolate the problem.
Zachs is offline   Reply With Quote
Old 15th May 2010, 00:06   #64  |  Link
ChldsPlay
Registered User
 
Join Date: Nov 2009
Posts: 35
Quote:
Originally Posted by Zachs View Post
Try your script without SupTitle first. Isolate the problem.
If I do just:

DirectShowSource("C:\Users\Kevin\Documents\NeroVision\ExportedVideo\avatar.mpg")

It will cause the program to shut down.
ChldsPlay is offline   Reply With Quote
Old 15th May 2010, 12:21   #65  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
There you go.
Zachs is offline   Reply With Quote
Old 20th May 2010, 17:31   #66  |  Link
lotrmith
Registered User
 
Join Date: May 2010
Posts: 20
Hello,

I'm trying to embed the forced subtitles of Avatar (the alien language ones) into a .mp4 of the movie that I have converted from the main .m2ts using HDConverttoX.

As of last week I've had zero experience doing anything thing complex, but what I've been able to do so far with HDConverttoX is successfully convert a half dozen other .m2ts sources into .mp4, and in some I've been able to locate forced subtitle tracks and convert with those embedded (using HDConverttoX). The problem I've run into is with movies that don't have a separate track for just the forced subtitles but instead use a forced flag for the individual subtitles in the main subtitle track. I am able to extract the main subtitle track using tsMuxer and then open it with BDSup2Sub and copy it with only the forced subtitles, and now I think I'm on the last step of just trying to put 2 and 2 together.

The guys at HDConverttoX sent me here.

Here's what I've got:
A playable .m2ts source: C:\Users\M\Documents\Avatar\RED_BIRD_2D_WW\BDMV\STREAM\0002.m2ts
A playable .mp4 conversion without any subtitles: C:\Users\M\Documents\Avatar\Avatar.mp4
A forced subtitle track that I want to embed: C:\Users\M\Documents\Avatar\ForcedFinal.sup

Could you help? I understand that your program here is what I need. My difficulty is that I have no idea how to use it, because I am totally inexperienced at all manner of this kind of stuff. I guess what I need are step by step instructions, and talk to me like I'm a 5-year-old (for example, I don't know if your program runs on its own or if I have to write the script lines in Avisynth, and I don't even know how to do that if that's the case). Sorry if I sound dumb! I'm really getting my feet wet here.

I'm supposing that I just enter your script into the script generated by HDConverttoX? Here's an example of the script it runs to convert the m2ts into the mp4:

Code:
prompt $d $t $_$P$G

echo job number: 1
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\eac3to.exe" "c:\users\M\documents\avatar\red_bird_2d_ww\bdmv\stream\00002.m2ts" 3: stdout.wav  -down16 -down2 | "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\lame.exe" - -h --abr 256 "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox-pid3.mp3"
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\xvid_encraw.exe" -progress 50 -i "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avs" -avi "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -max_bframes 2 -vhqmode 1 -quality 6 -max_key_interval 125 -lumimasking -bquant_ratio 150 -framerate 23.976  -threads 6  -bitrate 9871 -pass1 -turbo   -par 1:1 
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\xvid_encraw.exe" -progress 50 -i "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avs" -avi "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -max_bframes 2 -vhqmode 1 -quality 6 -max_key_interval 125 -lumimasking -bquant_ratio 150 -framerate 23.976  -threads 6  -bitrate 9871 -pass2   -par 1:1 
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\eac3to.exe" "c:\users\M\documents\avatar\red_bird_2d_ww\bdmv\stream\00002.m2ts" 1:"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\chapters.txt"
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\mp4box.exe" -add "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -fps 23.976  -add "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox-pid3.mp3":lang=eng  -chap "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\chapters.txt" "C:\Users\M\Documents\Avatar\RED_BIRD_2D_WW\BDMV\STREAM\Avatar.mp4"
And here's a sample if I had chosen to embed the main english subtitle track, so you can see when and where it runs it's subtitle operation:

Code:
prompt $d $t $_$P$G

echo job number: 1
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\eac3to.exe" "c:\users\M\documents\avatar\red_bird_2d_ww\bdmv\stream\00002.m2ts" 9:"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox__subs_9.sup"
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\eac3to.exe" "c:\users\M\documents\avatar\red_bird_2d_ww\bdmv\stream\00002.m2ts" 3: stdout.wav  -down16 -down2 | "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\lame.exe" - -h --abr 256 "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox-pid3.mp3"
java -jar "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\BDSup2Sub.jar" "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox__subs_9.sup" "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox__subs_9.idx" /res:1080p
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\xvid_encraw.exe" -progress 50 -i "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avs" -avi "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -max_bframes 2 -vhqmode 1 -quality 6 -max_key_interval 125 -lumimasking -bquant_ratio 150 -framerate 23.976  -threads 6  -bitrate 9871 -pass1 -turbo   -par 1:1 
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\xvid_encraw.exe" -progress 50 -i "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avs" -avi "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -max_bframes 2 -vhqmode 1 -quality 6 -max_key_interval 125 -lumimasking -bquant_ratio 150 -framerate 23.976  -threads 6  -bitrate 9871 -pass2   -par 1:1 
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\eac3to.exe" "c:\users\M\documents\avatar\red_bird_2d_ww\bdmv\stream\00002.m2ts" 1:"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\chapters.txt"
"C:\Users\M\Documents\HDConvertToX_2.5.624.4217\applications\mp4box.exe" -add "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdconverttox_00002.avi" -fps 23.976  -add "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\hdencodertox-pid3.mp3":lang=eng  -chap "C:\Users\M\Documents\HDConvertToX_2.5.624.4217\job1\chapters.txt" "C:\Users\M\Documents\Avatar\RED_BIRD_2D_WW\BDMV\STREAM\Avatar.mp4"
Am I correct that I have to insert your plugin script somewhere into this mess? If so, what exact script and where would I insert it?

Last edited by lotrmith; 20th May 2010 at 18:23.
lotrmith is offline   Reply With Quote
Old 20th May 2010, 18:12   #67  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,417
You need to install AviSynth and write an avs-script (Just use Windows notepad and save the file as "filename.avs") which should look something like this:
Code:
FFVideoSource("0002.m2ts")
SupTitle("ForcedFinal.sup", forcedOnly=False)
You can now open this file in any AviSynth-capable GUI like StaxRip, RipBot, MeGUI etc. (I don't know anything about HDConverttoX).
Notice that the SupTitle function already has an argument called "forcedOnly". If you set it to "true" you can skip the BDSup2Sub step you have been doing until now.
For "FFVideoSource" and "SupTitle" to work you have to download the plugins and copy the included dlls to the avisynth\plugins dir. (Download ffmpegsource here)

Hope that helps to get you started.
sneaker_ger is offline   Reply With Quote
Old 21st May 2010, 01:39   #68  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
This is a good place to start learning about AviSynth.

http://en.wikipedia.org/wiki/AviSynth

You'll need to be familiar with AviSynth and how its plugins are used to work a script before you'll be able to understand how to use SupTitle.
Zachs is offline   Reply With Quote
Old 21st May 2010, 04:18   #69  |  Link
lotrmith
Registered User
 
Join Date: May 2010
Posts: 20
Alright I made some headway with instrutions from the author of HDConverttoX, and here's what's happened:

I edited an avs file associated with the job to be performed by HDC, to include this code:
Code:
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SupTitle.dll")
SupTitle("C:\Users\M\Documents\Avatar\ForcedFinal.sup", forcedOnly=false, swapCbCr=false, relocate=true, relocOffset="")
Running the job resulted in it encoding as it normally does without any errors during the entire process, but the final output .mp4 file had no video image except a black screen with an error message embedded that ran for the length of the film. The error message is as follows:

Quote:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

at SupTitle.GetFrame(SupTitle* , PVideoFrame* , Int32 n, IScriptEnvironment* env)
Anyone know what that might indicate?

Here's our thread with HDC: http://forum.doom9.org/showthread.ph...82#post1401582
lotrmith is offline   Reply With Quote
Old 21st May 2010, 05:02   #70  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Yes. v1.0.9 has an issue with Avatar's forced subs. Head over to SupTitle's forum to grab the latest version (beta).

Last edited by Zachs; 21st May 2010 at 05:12.
Zachs is offline   Reply With Quote
Old 21st May 2010, 06:01   #71  |  Link
lotrmith
Registered User
 
Join Date: May 2010
Posts: 20
Quote:
Originally Posted by Zachs View Post
Yes. v1.0.9 has an issue with Avatar's forced subs. Head over to SupTitle's forum to grab the latest version (beta).
I'll give that a shot. Thanks!
lotrmith is offline   Reply With Quote
Old 21st May 2010, 12:13   #72  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 5,417
For the future: you might want to preview your script in Media Player Classic, VirtualDub or something else before encoding, to see if something's wrong. Saves a lot of time.
sneaker_ger is offline   Reply With Quote
Old 28th May 2010, 21:59   #73  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Dude, just wanted to say: doumo arigatou gozaimasu! :) Just the program I've been waiting for for ages!
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 7th June 2010, 22:50   #74  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Hmm, seems I'm not so happy, after all. Just installed .NET 4, for the latest suptitle 2.0.1, and now I get the following error on the plugin:

"Evaluate: Unrecognized Exception"

I followed your installation guide to the letter, and call the plugin like this:

LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\FFMS2.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\SupTitle.dll")

video=FFVideoSource("D:\Temp\video.mkv").ConvertToYV12().Crop(0, 142, 0, -142)
video=SupTitle(video, "D:\subs\00004 - 11 - Subtitle (PGS).sup", forcedOnly=true, swapCbCr=false, relocate=true, relocOffset="0,140,0,140")

(I eventually need to return 'video' in this script, is why). With relocate off or on, makes no difference.

Any suggestions as to what is going on?

Thanks.

EDIT: Yes, without the plugin everything works fine.
__________________
Gorgeous, delicious, deculture!

Last edited by asarian; 7th June 2010 at 23:07.
asarian is offline   Reply With Quote
Old 8th June 2010, 03:34   #75  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
It should work.
You did return 'video' at the end of your script right?

I found this thread describing the error message you're seeing.
It looks like it's an AviSynth exception. You might want to try grabbing a more stable release of AviSynth.
I can't reproduce the problem on either of my machines (XP-32 and Win7-64).

Last edited by Zachs; 8th June 2010 at 03:56.
Zachs is offline   Reply With Quote
Old 8th June 2010, 12:32   #76  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by Zachs View Post
It should work.
You did return 'video' at the end of your script right?

I found this thread describing the error message you're seeing.
It looks like it's an AviSynth exception. You might want to try grabbing a more stable release of AviSynth.
I can't reproduce the problem on either of my machines (XP-32 and Win7-64).
Zachs, thanks for looking into this.

I have the latest AviSynth, version 2.5.8; not sure how much more stable it will get. :( I even grabbed the latest replacement DirectShowSource.dll for Avisynth 2.5.8 (didn't even know it existed); that makes no difference, either (then again, I'm not even using DirectShowSource here at all, but FFVideoSource). And the "Evaluate: Unrecognized Exception" thread you showed is from 2004; seems unlike 2.5.8 would still be plagued by the same issue; but I can ask around.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 8th June 2010, 14:37   #77  |  Link
Zachs
Suptitle, MediaPlayer.NET
 
Join Date: Nov 2001
Posts: 1,721
Can you try with just a blankclip + suptitle?

Also, try that with AviSynth 2.5.8 MT build - that's what I'm using. I have a feeling that it's your build, as others and myself have managed to get it working just fine.
Zachs is offline   Reply With Quote
Old 9th June 2010, 03:32   #78  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by Zachs View Post
Can you try with just a blankclip + suptitle?

Also, try that with AviSynth 2.5.8 MT build - that's what I'm using. I have a feeling that it's your build, as others and myself have managed to get it working just fine.
I tried the AviSynth 2.5.8 MT build tonight; no go, alas. :( This time around the Media Player Classic (associated with my avs files, for playing) doesn't even show an error any more, but just collapses into oblivion after 1 or so seconds of blackness.

According to IanB, of avisynth, a plugin would have to behave severely out of bounds for this last-resort exception to occur. My guess is that it's caused by the manifold layered requirements for .NET Framework installs, and that it's somewhere missing something. I have 2 + 4 installed (and 3.5 too, actually). I can't reinstall 2 again, as XP won't let me any more after later updates.

You wouldn't have a debug build lying around, would ya? :)
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Old 9th June 2010, 04:23   #79  |  Link
foxyshadis
ангел смерти
 
foxyshadis's Avatar
 
Join Date: Nov 2004
Location: Lost
Posts: 9,413
Unrecognized Exception always means someone screwed up the memory access in either a codec or a plugin, or it ran out of memory and forgot to crash. I've made it happen more often than I can count. (It could be FFVideoSource as well, don't forget to check that.) It's usually not very hard to catch in a debugger because it'll blow up as soon as it tries to write outside of its allocated structure, but you need the source for that.
__________________
There are four boxes to be used in defense of liberty: soap, ballot, jury, and ammo. Please use in that order.
foxyshadis is offline   Reply With Quote
Old 9th June 2010, 05:19   #80  |  Link
asarian
Registered User
 
Join Date: May 2005
Posts: 1,372
Quote:
Originally Posted by foxyshadis View Post
Unrecognized Exception always means someone screwed up the memory access in either a codec or a plugin, or it ran out of memory and forgot to crash. I've made it happen more often than I can count. (It could be FFVideoSource as well, don't forget to check that.) It's usually not very hard to catch in a debugger because it'll blow up as soon as it tries to write outside of its allocated structure, but you need the source for that.
Yeah, I thought of FFVideoSource, and eliminated it as possible cause by using both BlankClip and the script simply without the SupTitle line; both run fine that way.

My setup is a dedicated XP SP3 partition, just for rendering. Other than avisynth, ffdshow, haali media splitter, and a few degrain filters, it's not cluttered by anything else, and generally renders flawlessly. In fact, SupTitle is really the only plugin so far that really seems to freak out.
__________________
Gorgeous, delicious, deculture!
asarian is offline   Reply With Quote
Reply

Tags
avisynth, hard sub, plugin, subtitle, suptitle

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 08:19.


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