After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 600043 - subparse: fails to recognise Cyrillic subtitles in windows-1251 encoding
subparse: fails to recognise Cyrillic subtitles in windows-1251 encoding
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
Other Linux
: Normal normal
: 0.10.35
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2009-10-29 16:11 UTC by John Saturday
Modified: 2011-06-15 17:42 UTC
See Also:
GNOME target: ---
GNOME version: 2.27/2.28

Subtitle (encoding: Windows-1251) (45.08 KB, text/plain)
2009-10-29 16:48 UTC, John Saturday

Description John Saturday 2009-10-29 16:11:26 UTC
Debian GNU/Linux 2.6.30-2-amd64 testing (squeeze); LANG=C and all others

I'm load a "movie.avi" (automatically load subtitle is checked in preferences; font: DejaVu Sans Bold; encoding: windows-1251). Subtitle file is a "movie.sub" or "". Console error is: ** Message: don't know how to handle application/x-subrip. Main menu: View / Subtitles -> Empty. I'm load a subtitle manually and but same error appears.

I'm converted a subtitle file to UTF-8, change preferences and all OK!

This error my be related to last upgrade of "libtotem-plparser12 (2.28.1-1) to 2.28.1-2" and my be this is a Debian bug.
Comment 1 John Saturday 2009-10-29 16:17:37 UTC
Sorry but I'm checked wrong version of totem (2.28.x -> 2.26x): totem-common and totem-gstreamer is a 2.26.3
Comment 2 Bastien Nocera 2009-10-29 16:42:18 UTC
This means that GStreamer can't handle subrip files, or misdetects it. Can you please attach the subtitle in question here?
Comment 3 John Saturday 2009-10-29 16:48:58 UTC
Created attachment 146514 [details]
Subtitle (encoding: Windows-1251)
Comment 4 Tim-Philipp Müller 2009-10-29 17:05:31 UTC
> ** Message: don't know how to handle application/x-subrip

Is that really what is says? Not application/x-subtitle?

What does

 $ gst-typefind-0.10 /path/to/foo.sub



  $ gst-launch-0.10 filesrc location=foo.sub ! subparse subtitle-encoding='WINDOWS-1251' ! fdsink

Comment 5 John Saturday 2009-10-29 17:14:50 UTC
$ gst-typefind-0.10 /data/downloads/<...>/movie.sub

/data/downloads/.../movie.sub - audio/mpeg, framed=(boolean)false, mpegversion=(int)4

$ gst-launch-0.10 filesrc location=movie.sub ! subparse

Setting pipeline to PAUSED ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstFileSrc:filesrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2378): gst_base_src_loop (): /GstPipeline:pipeline0/GstFileSrc:filesrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 490228 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 6 John Saturday 2009-10-29 17:20:33 UTC
Ooops... I'm missing second line.

$ gst-launch-0.10 filesrc location=movie.sub ! subparse subtitle-encoding='WINDOWS-1251' ! fdsink

... <subtitle file>
�������� ������.</span><span>���������� ������������������, ����������.</span><span>������ �������� ���������������� ���� ���� ����������?</span><span>���� ���� ���� ���� ����������������.</span><span>���������� ���� ����?</span><span>���� ���� ���������� ����������, ����������.</span><span>������ ���� ����?</span><span>���� ������ ��������������.</span><span>������������ ���� ���������� ��������.</span><span>������������ ���� �������������������� ���� ������.</span><span>���� ���� �������������� ���� ������ ����?</span><span>�������� ���� ���� ���� ������������������</span>
<span>���� ���������� ����������������������.</span><span>���� ����-- �����������������</span>Got EOS from element "pipeline0".
Execution ended after 416957554 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Comment 7 John Saturday 2009-10-29 17:34:00 UTC
I'm change preference in totem to Windows-1251 and load manually utf-8 variant of subtitles -> scrambled subtitles (normal). Load again manually cp1251 variant of subtitle file and no subtitles on movie.
Comment 8 John Saturday 2009-10-29 17:46:59 UTC
$ locale -a

$ locale

$ export LANG=en_US.utf8
$ totem

and all OK with cyrillic subtitles.
Comment 9 John Saturday 2009-10-29 18:24:17 UTC
$ export LANG=C
$ gst-typefind-0.10 movie.sub
movie.sub - audio/mpeg, framed=(boolean)false, mpegversion=(int)4

$ export LANG=en_US.utf8
$ gst-typefind-0.10 movie.sub
movie.sub - application/x-subtitle
Comment 10 André Klapper 2009-11-10 14:30:55 UTC
John Saturday: Please do not set the GNOME target field. Thanks.
Comment 11 Sebastian Dröge (slomo) 2011-05-23 14:05:57 UTC
commit c867f677c0813c3dfe8a204c3bd339837d42a167
Author: Sebastian Dröge <>
Date:   Mon May 23 16:02:34 2011 +0200

    subparse: Try to typefind even if conversion to UTF8 failed
    Fixes bug #600043.

commit 3dc49871383cbf7f8ac2e07dcb583591668fbe57
Author: Sebastian Dröge <>
Date:   Mon May 23 15:51:14 2011 +0200

    subparse: Interprete typefind strings passed to GRegex as raw bytes instead