Page 1 of 1

ffmpeg, subtitles, and WebM

Posted: Mon Mar 10, 2014 1:30 am
by AliceWonder
I am using MakeMKV with Fedora 20, ffmpeg 2.1.4 from rpmforge.

I am transcoding the rips to WebM - this is for my laptop I travel with and I can not install any third party codecs or software not available in stock Fedora on my laptop for security reasons. Well, I have root, I could, but I'm not suppose to.
Ripping is on my home desktop where I have more freedom.

I've noticed that my bluray discs use a subritle format known as PGS and I can extract them via mkvextract.

Is there a nice perferably CLI utility to convert them to WebVTT ??

Secondly, some movies have subtitles that are displayed even when you have subtitles disabled.
For example, if the audio language is English but the audio track has french for artistic effect, English subtitles are often displayed for those parts.

I'm assuming that for WebM I will probably have to encode such subtitles onto the video itself, anyone familiar with how to identify these translation subtitles and put them on the VP8 video stream itself so they are always present?

Thank you for any assistance.

Re: ffmpeg, subtitles, and WebM

Posted: Mon Mar 10, 2014 1:45 pm
by Romansh
Not sure if there's anything that can convert PGS to WebVTT directly, you might have to use SRT as an intermediate.

Forced subtitles can be:

- in the main subtitle track, flagged as forced

- in their own dedicated track, flagged as forced

- in their own dedicated track, NOT flagged as forced

Determining which scenario it is usually requires testing all tracks in the output.

Re: ffmpeg, subtitles, and WebM

Posted: Wed Mar 12, 2014 1:21 pm
by AliceWonder
okay here's what I ended up doing -

PGS to text formats looks like it requires software that requires Windows.

So with Kill Bill Part 1 - this was very time consuming but I like the results -

I manually created a .srt file with the subtitles from the Japanese portions of the movie.
Converted that file to .ass via ffmpeg

Edited the resulting .ass file for positioning (font size etc.)

Passed that .ass file to ffmpeg during transcode to webm so they become part of the video stream.

I still have some adjustment to do, but the subtitles are already better than they are on the Bluray disc.

Easier to read as I am placing them in the black bar below the film area. - the Bluray (at least the one I have) puts the subtitles directly on the movie and they can be very hard to read when they are similar color to the background. This solves that.

As far as non-forced subtitles, I'm not doing them initially. Eventually when all my discs are ripped and forced subtitles are embedded via libass and ffmpeg, then I may start to make some subtitle files using WebVTT but AFAIK no stand-alone player will display WebVTT subtitles embedded as a track in the WebM container, so there's no point right now.

Once I finish adjusting the Kill Bill 1 subtitles, then on to Kill Bill 2...

Fortunately most of my Bluray discs don't have a lot of forced subtitles so once Kill Bill series is done, rest will be cake.