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. |
20th May 2010, 17:31 | #66 | Link |
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" 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" Last edited by lotrmith; 20th May 2010 at 18:23. |
20th May 2010, 18:12 | #67 | Link |
Registered User
Join Date: Dec 2002
Posts: 5,565
|
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) 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. |
21st May 2010, 01:39 | #68 | Link |
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. |
21st May 2010, 04:18 | #69 | Link | |
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="") Quote:
Here's our thread with HDC: http://forum.doom9.org/showthread.ph...82#post1401582 |
|
21st May 2010, 05:02 | #70 | Link |
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. |
21st May 2010, 06:01 | #71 | Link | |
Registered User
Join Date: May 2010
Posts: 20
|
Quote:
|
|
7th June 2010, 22:50 | #74 | Link |
Registered User
Join Date: May 2005
Posts: 1,462
|
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. |
8th June 2010, 03:34 | #75 | Link |
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. |
8th June 2010, 12:32 | #76 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
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! |
|
8th June 2010, 14:37 | #77 | Link |
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. |
9th June 2010, 03:32 | #78 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
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! |
|
9th June 2010, 04:23 | #79 | Link |
Angel of Night
Join Date: Nov 2004
Location: Tangled in the silks
Posts: 9,559
|
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.
|
9th June 2010, 05:19 | #80 | Link | |
Registered User
Join Date: May 2005
Posts: 1,462
|
Quote:
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! |
|
Tags |
avisynth, hard sub, plugin, subtitle, suptitle |
|
|