2013年5月3日 星期五

Convert mkv to mp4 for Apple TV

Install ffmpeg and MKVToolNix.

Check mkv tracks info.
mkvinfo -g

Result:
video: H264
audio: dts
subtitle: srt1
subtitle: srt2

2013年4月15日 星期一

mp4box: Adding Subtitles to mp4 Movies for Apple TV

Download and install mp4box on windows.

1. srt file use UTF-8 encoding
2. mp4box -ttxt origin.srt
3. try to change the font size
-<TextStreamHeader width="400" height="60" ...
+<TextStreamHeader width="video.width" height="video.height*20%" translation_x=0 translation_y="video.height*80%"
4. mp4box -add origin.ttxt:hdlr=sbtl:lang=eng -add origin.mp4 output.m4v

enjoy it...:)

2013年4月11日 星期四

FlashDevelop: getDefinitionByName ReferenceError: Error #1065: Variable ... is not defined.

When I was using getDefinitionByName to create dynamic class.
var myClass:Class = getDefinitionByName('Item1') as Class;

I usually got this error:
[Fault] exception, information=ReferenceError: Error #1065: Variable Item1 is not defined.

Fixed: just including complete library
assets.swf -> Add To Library -> Options -> Included library(include completely)

[ref]
http://www.flashdevelop.org/community/viewtopic.php?p=27575

2013年3月12日 星期二

Upgrade NME and Haxe3

After alias nme
sudo haxelib run nme setup

Got this error:
Called from native/media/SoundChannel.hx line 138
Called from native/Loader.hx line 63
Called from C:\Program Files (x86)\HaxeFoundation\haxe/std/neko/Lib.hx line 30
Uncaught exception - load.c(357) : Primitive not found : /usr/lib/haxe/lib/nmedev/3,6,0//ndll/Mac/nme@nme_sound_channel_set_position(2)

You need to rebuild native library to fixed it.
sudo haxelib run nme rebuild mac