View Full Version : Hardcoding UTF-8 subtitles
justinsl
2nd May 2012, 06:49
Hi guys! Im absolutely new here and I need some help. I am currently subtitling videos in Chinese, and my input programme encodes in UTF-8. I have created a .ass file using aegisub and successfully opened the file with subtitle edit. I absolutely need to hardcode the subs and have attempted to use Avidemux, HAndbrake and AviRecomp to no avail. The hardcoded subs that come out appear as question marks that are unreadable.
I suspect the problem might lie with the hardcoding programme that im using. Is there any software out there that processes UTF-8? I understand that AviRecomp can process the GB Chinese encoding but do not seem to have an input programme with that. From what I know UTF-8 is getting more and more popular and GB increasingly outdated.
Any help would be greatly appreciated! <3
sneaker_ger
2nd May 2012, 06:55
http://forum.doom9.org/showthread.php?t=148926
Make sure to pick a font that actually has the characters. (this applies to any program)
justinsl
2nd May 2012, 20:42
hmm... im really new here how do you use that thing? i dont know how to use a dll file
sneaker_ger
2nd May 2012, 21:17
That's a plug-in for AviSynth. You have to download and install AviSynth, and download and extract the ffmpegsource plugin and the assrender plugin. Then you create a text file with e.g. notepad and write the following into it:
LoadPlugin("c:\ffms2.dll") #load ffmpegsource plug-in
LoadCPlugin("c:\assrender.dll") #load assrender C-Plugin
FFmpegSource2("c:\video_file.mkv") #load the video file
AssRender("c:\subtitle_file.ass") #render the subtitles onto it
Put the required font into the same directoy as the .ass-file or copy it c:\windows\fonts, unless it's already installed.
Save that script as "hardcoded.avs". You can then use x264cli to encode it. If you don't feel comfortable with using it from the command-line, you can use one of the many GUIs like RipBot, MeGUI, StaxRip etc.
justinsl
4th May 2012, 00:31
hey mate i been trying out all that u said. I downloaded and extracted assrender 0.25 and ffms 2.17 AVS plugin into the plugins folder in avisynth 2.5.
then i typed the code as instructed having modified the directories to the ones i have. after that i ran the avs file using ripbot and the following error came out:
Script error: there is no function named "FFmpegSource"
(D:\Translations\TBd\acrivator.avs, line 2)
(C:\Temp\RipBot264temp\job1\getinfo.avs, line 2)
My code is almost similar to yours, just that i changed the import function to "FFmpegSource" because "FFmpegSource2" gave the same error. I got this from the list of usable functions for avisynth, also surprised that the computer doesnt detect it. Any ideas?
My code is as follows:
LoadPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\ffms-2.17-cplugin\ffms2.dll") #load ffmpegsource plug-in
LoadCPlugin("C:\Program Files (x86)\AviSynth 2.5\plugins\assrender\assrender.dll") #load assrender C-Plugin
FFmpegSource("D:\Translations\TBd\right grip.avi") #load the video file
AssRender("D:\Translations\TBd\right grip.ass") #render the subtitles onto it
sneaker_ger
4th May 2012, 00:49
Ah, my bad. ffmpegsource2() is part of the "ffms2.avsi" file. Either copy that to the plug-in folder or use "ffvideosource()"
justinsl
4th May 2012, 18:16
I tried "ffvideosource()" and it said the command didnt exist. so i changed the FFMS2 cplugin to the standard one, and tried it again. the following error came out:
FFVideoSource: Can't open 'D:\Translations\TBd\right grip.flv'
(D:\Translations\TBd\acrivator.avs, line 3)
(C:\Temp\RipBot264temp\job1\getinfo.avs, line 2)
i understand that the plugin can read mkv, flv, avi and some other formats properly. at least now the command can be identified, just that the file cant be opened. any ideas?
sneaker_ger
4th May 2012, 18:29
Make sure that file name and path are 100% correct. And use an up-to-date build (I don't even know who still offers a c-plugin version), I'm currently using r671 (http://x264.fushizen.eu/builds/ffms2/ffms2-r671-libav-git0aaa45e.7z).
If it still does not work, the file might be unsupported. You can try posting a sample in the ffmpegsource thread on this forum and test "DirectShowSource()" in the mean time.
If all else fails, demux the flv using FLV Extract and then remux to mkv. (And hope it's H.264)
justinsl
4th May 2012, 20:29
it works! but theres no audio... how do you load it? what function do you need?
justinsl
5th May 2012, 00:40
it is done. thank you so much for ur help.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.