Merge_subtitles_with_mkv_file

想在大屏幕的电视机上看电影,之前试过直接用HDMI接口将电视扩展成mac的外接屏,然而在没有连接线的情况下就不行了。最近发现可以通过DLNA这个协议将电脑端的视频或者照片在电视机上播放,前提是在同一个无线网内。

[DLNA](Digital Living Network Alliance)

Sony established the DLNA in June 2003 as the Digital Home Working Group, changing its name 12 months later, when the first set of guidelines for DLNA was published.

Softwares on MAC

serviio

Play with subtitles

DLNA并不支持外挂字幕,因此带字幕观看只能自己将字幕嵌入到视频文件中。APP store上有个叫submerge的软件据说可以做到,但是要¥123,略贵,再查发现ffmpeg可以完成。

1
ffmpeg -i input.mkv -vf subtitles=input.ass output.mkv

这个过程耗时比较长,需要耐心等待(我试过转一个1080P的电影,一共花了2小时,而且不知道为什么文件大小从5.2G变成了3.6G)。

Notes

  • According to the usage, ffmpeg need to be compiled with the --enable-libass flag to support this operation, which is not the case when install the ffmpeg with Brew. I found some binaries which build with libass, and which works good for me.
  • Only test the video with MKV (MatrosKa Video) format, so I don’t know if other movie format were supported too.
  • The subtitles must be ASS (Advanced Substation Alpha) format.