[mythtv-users] Ubunto 18.04 / 0.29 export to mkv

Peter Bennett pb.mythtv at gmail.com
Fri Jan 4 23:40:03 UTC 2019



On 1/4/19 12:26 PM, David Engel wrote:
> On Mon, Dec 17, 2018 at 03:50:49PM -0500, Peter Bennett wrote:
>> On 12/17/18 3:06 PM, David Engel wrote:
>>> Peter, have you ever tried and succeeded at getting all ATSC
>>> subtitles/closed captioning copied during transcoding?  I have several
>>> movies with English and Spanish subtitles that I want to preserve.
>>> I've yet to find a way to do that with either handbrake or ffmpeg.  I
>>> either get no subtitles or I get garbled, unintelligible subtitles.
>>>
>> I don't have a problem with the subtitles. I only select one set of
>> subtitles, but there is an option you can set to include multiple subtitles.
>> I have never had them corrupted or lost, although I only look at the
>> subtitles occasionally.
> Peter, with some tips from Aman Gupta and a lot of trial and error, I
> finally found a way to to this.  Those details are below(*).  The
> problem now is the subtitles work fine on Linux but do not work at all
> on Android.  This happens with both ffmpeg and mediacodec decoding on
> Android.  The subtitle options to enable, disable and choose the
> language are all there but the subtitles never show up on screen on
> Android.  I can send you a test sample if you like.
>
> (*)Ffmpeg corrupts a53 style captions when scte-20 data/captions are
> also present.  Ffmpeg also can't pull captions from field 2.  Field 2
> is where the Spanish captions are in my recordings.  Handbrake has
> similar issues.  The solution is to dump the captions to .srt files
> using ccextractor and then mux them with the transcoded video and
> audio using ffmpeg or handbrake.
>
> On a related note, I also confirmed with Aman that closed captions
> don't work at all with mediacodec.  The interface has no way to pass
> that information back.  Aman said there is a possible workaround but
> it requires unofficial patches to ffmpeg to extract the appropriate
> data and pass it back separately.
>
> David
So Handbrake cannot access the second subtitle track? I have never tried 
more than one subtitle track.

My idea for solving the problem with mediacodec and other hardware is to 
take ccextractor (the opensource one not the mythccextractor that ships 
with mythtv) and incorporate it into the mythplayer. ccextractor is able 
to extract the captions without decoding the video, so hopefully if you 
pass in the input data to ccextractor while playing the video you could 
get the subtitles back in real time, without too much overhead from 
ccextractor.




More information about the mythtv-users mailing list