Log in

View Full Version : .ass subtitles into MP4


E-Z
30th November 2008, 01:10
Hi, I need help in hard coding .ass subtitles (made with aegisub) into a MP4 video. From what I've read that's not possible, so they have to be converted to srt?

Wouldn't that mean losing the colours, fonts and special effects?

I'm aware that the simplest thing to do is just use MeGUI to output an mkv but all previous videos have been encoded to mp4 so that they're compatible with the PS3/Xbox 360.

I've asked the person who encoded the previous videos about how he did it and this is what he told me to do:

How my PC is setup (I don’t use CCCP) - download at free-codecs.com
1. ffdshow-tryout
2. haali mkv splitter
3. directvobsub
4. avisynth
5. megui

Instructions
1. Copy the fonts you need to your c:\windows\fonts directory
2. Create a avs file (change the filename to whatever you have):

LoadPLugin(”C:\Program Files\Media\Codecs\K-Lite Codec Pack\Filters\VSFilter.dll”)

DirectShowSource(”D:\My Videos\ANIME\Soul Eater\Soul Eater - 34 Raw.mp4”, fps=23.976, convertfps=true)
TextSub(”D:\My Videos\ANIME\Soul Eater\Soul Eater - 34 Raw.ass”)

ConvertToYV12()

3. open megui, update to latest version of any components if necessary. Set up avisynth location if it’s the first time you open megui.

4. Drag the avs file to the input video and audio. You can check out the preview of the video that pops up.

5. Set video encoder settings to “x264: PD-PS3-Xbox360″

6. Create an audio encoder setting if you don’t have one (AAC-LC 128Kbps, 48000), and select it - note you may need to download “neroaacenc.exe” (free from nero web page) and set its location

7. Press autoencode, select target size to 350MB, run it (make sure you have a worker available)

(I've changed the directories to what they are on my computer)

When I try to load the AVS script in MeGUI I get an error.

"AviSynth script error:
Script error: expected a , or )
(D:\My Videos\ANIME\Soul Eater\Soul Eater 34.avs, line 1, column 14)"

I tried to ask him what was wrong but he hasn't replied. So is something wrong with the script or am I doing something wrong?

Any help is much appreciated.

Atak_Snajpera
30th November 2008, 01:16
TextSub(”D:\My Videos\ANIME\Soul Eater\Soul Eater - 34 Raw.ass”,0,23.976)

E-Z
30th November 2008, 01:25
Thanks for your reply.

I'm still getting the same error.

Here is the script, just in case.

LoadPLugin(”C:\Program Files\Media\Codecs\K-Lite Codec Pack\Filters\VSFilter.dll”)

DirectShowSource(”D:\My Videos\ANIME\Soul Eater\Soul Eater - 34 Raw.mp4”, fps=23.976, convertfps=true)
TextSub(”D:\My Videos\ANIME\Soul Eater\Soul Eater - 34 Raw.ass”,0,23.976)

ConvertToYV12()

No spaces above Loadplugin or below ConvertToYV12()

Atak_Snajpera
30th November 2008, 01:31
Maybe you should try my GUI. It's alot simpler

E-Z
30th November 2008, 04:34
Ok I've got that up and running.

One thing I've just noticed in the AVS script

video=TextSub(video,"D:\temp\RipBot264temp\job1\Soul Eater - 34 Raw.ass",-1,23.976)

Does the -1 before the 23.976 mean that the subs will be delayed by a second? I ask because when I used the preview, the subs were out of sync by about a second. I continued anyway thinking it might be my computer being slow.

Edt: The encode has just finished, the subs are in sync. Haven't watched it through yet but from the 13 or seconds I saw, the quality seems to be a bit worrying. Oh and for some reason MP4box.exe crashed just as it was finishing muxing.

Could you suggest settings that would encode it in better quality? I can't remember the settings I used exactly but I do know I used 2-pass, set the file size to 350MB, used the HD consoles profile and I think somewhere in the properties I chose something labeled 'Anime'. I'll attach the avs that your program used.

The raw file is 472MB and I want them in 350MB files, so I know that there will be loss of quality, but I'd be willing to wait for longer if it meant better quality.

Atak_Snajpera
30th November 2008, 22:34
Does the -1 before the 23.976 mean that the subs will be delayed by a second?
No. Taken from AviSynth documentation.

This contains the AviSynth TextSub function, which basically takes a textfile as input and paints the subtitles from this textfile on the video clip. It has the following quite simple syntax:
TextSub ("path\filename.ext" [, charset [, fps]])

Could you suggest settings that would encode it in better quality? I can't remember the settings I used exactly but I do know I used 2-pass, set the file size to 350MB, used the HD consoles profile and I think somewhere in the properties I chose something labeled 'Anime'.
Default 4.0 profile is enough for HQ! You don't have to change anything! You won't see difference in quality unless you have artificial eyes :) That something 'Labeled Anime' is denoiser profile for Anime. it's quite strong so make sure that source really requires denoising.

E-Z
1st December 2008, 05:42
Thanks for your help.