[mythtv-users] non-printable character in CC track from Handbrake

Jim Stichnoth stichnot at gmail.com
Sat Sep 14 18:26:13 UTC 2013


On Sat, Sep 14, 2013 at 7:22 AM, Joey Morris <rjmorris.list at zoho.com> wrote:

> Jim Stichnoth <stichnot at gmail.com> wrote on Sat, Sep 14, 2013 at
> 06:08:48AM -0700:
> > On Fri, Sep 13, 2013 at 6:40 PM, Joey Morris <rjmorris.list at zoho.com>
> wrote:
> >
> > > Thanks Jim. What did you use to see the rectangle outline with a
> > > question mark in it? MythTV is the only place I've seen my rectangle.
> > > I've looked at the log file in emacs, vi, and in the console, but each
> > > of those seem to have performed the backspace operation instead of
> > > displaying a symbol representing the backspace. I also tried creating
> > > a hex dump using xxd, but that doesn't show the backspace either.
> > >
> >
> > This rectangle/question character was seen only in the mythfrontend OSD
> > captions.  To experiment, I took an existing recording/video with a .srt
> > file (in my case, an HD-PVR recording with a .srt file created using
> > http://www.mythtv.org/wiki/Captions_with_HD-PVR), edited the .srt file
> in
> > emacs, and manually added weird characters like \r, ^H, ^?, etc. to the
> > ends of lines.  Whitespace characters like \r were stripped as expected,
> > but other special characters became the question-mark-inside-rectangle
> > symbol.  This is with the FreeMono font.  Notably, the ^H backspace
> > character did seem to erase characters in the log output.
>
> After a little experimentation in FormattedTextChunk::ToLogString in
> subtitlescreen.cpp, I believe the weird character in my case is a null
> character, not backspace. I added this to the log string:
>
>     str += QString("last=%1 ").arg(text[text.length()-1].unicode());
>
> and it displayed "last=0" in the log. Then I did this to the log
> string:
>
>     QString tmp = text;
>     tmp.remove(QChar(0));
>     str += QString(" text='%1'").arg(tmp);
>
> and the log displayed the string as one would expect, that is, the
> closing single quote was present.
>
> Before I approach the Handbrake devs with this, can you think of any
> reason MythTV would be introducing a null character? Or how I can
> inspect the video file to find out if the nulls are in there?
>

Interesting.  (BTW, I wanted to try inserting a null character, but I was
too lazy to figure out how to do it in emacs. :) )

The code that extracts the SRT text from external files is separate from
the code that gets it when it's embedded in the video.  It could be a
problem with the latter, as I only have the former to test with.  Would it
be possible to create a test file with this behavior?  Just one errant
subtitle will do.  Create a new ticket and I'll have a look.

Jim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130914/407ed67a/attachment.html>


More information about the mythtv-users mailing list