gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: About external .srt subtitles in omxplayer

Sun Oct 28, 2012 8:56 pm

henle wrote: Would be great if you could make it work!
Ok then, I'll give it a shot! :) I'll let you know!

strawberry
Posts: 49
Joined: Tue Oct 30, 2012 10:44 am

Re: About external .srt subtitles in omxplayer

Wed Oct 31, 2012 9:34 am

I've tried to compile this omx player version but got an error:

Code: Select all

C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
[email protected] mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.
make[1]: *** [configure] Error 1
make[1]: Leaving directory `/home/pi/omxplayer'
make: *** [ffmpeg] Error 2
Isn't it possible to share the compiled version?

henle
Posts: 65
Joined: Sat Apr 21, 2012 7:23 pm

Re: About external .srt subtitles in omxplayer

Wed Oct 31, 2012 2:15 pm

strawberry wrote: Isn't it possible to share the compiled version?
Are you not able to install the deb package?

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: About external .srt subtitles in omxplayer

Wed Oct 31, 2012 8:30 pm

Ok, kind-of auto-conversion code is pretty much ready! It's a little rough, since it relies on current system's locale to guess the subtitle's language, if it is in another encoding than unicode. I did a little "research" for other (more clever) methods, but frankly, I don't think that it would worth it. It involves some serious heuristics to find out the real encoding of a file and even then, it's only more of an educated guess, rather than true finding! It is quite interesting that there is no really good way to find out a file's encoding!

Well, now that I have defended my choice ( :oops: ), would you like to take a look at the source? Frankly I'm not familiar with the way github works, but if you find it preferable I can give it a go! Please keep in mind that the code is for an actual launcher that calls omxplayer with the equivalent attributes, but as you will find out it's pretty simple to reform it in order to integrate into it :) Let me know about the course of action! :)

henle
Posts: 65
Joined: Sat Apr 21, 2012 7:23 pm

Re: About external .srt subtitles in omxplayer

Wed Oct 31, 2012 9:06 pm

gilgames wrote:Ok, kind-of auto-conversion code is pretty much ready! It's a little rough, since it relies on current system's locale to guess the subtitle's language, if it is in another encoding than unicode. I did a little "research" for other (more clever) methods, but frankly, I don't think that it would worth it. It involves some serious heuristics to find out the real encoding of a file and even then, it's only more of an educated guess, rather than true finding! It is quite interesting that there is no really good way to find out a file's encoding!

Well, now that I have defended my choice ( :oops: ), would you like to take a look at the source? Frankly I'm not familiar with the way github works, but if you find it preferable I can give it a go! Please keep in mind that the code is for an actual launcher that calls omxplayer with the equivalent attributes, but as you will find out it's pretty simple to reform it in order to integrate into it :) Let me know about the course of action! :)
Sounds good! Git/github is great, I can definitely recommend learning it. But if you can't find the time right now, sending me the source is fine too.

gilgames
Posts: 26
Joined: Sun Oct 14, 2012 2:38 pm

Re: About external .srt subtitles in omxplayer

Wed Oct 31, 2012 9:50 pm

Sure thing! Take a look over here https://gist.github.com/3990108

I created an account in github and will learn it eventually. It seems pretty helpful. In the meantime, feel free to integrate it if you find it useful. I would try to fork your efforts myself, but when it comes to github I'm a complete newbie! By the time I learn my way around it, you will have already implemented whatever changes you may find useful! :D

Tell me what you think and comment whatever additions/changes/critique you may have! :)

strawberry
Posts: 49
Joined: Tue Oct 30, 2012 10:44 am

Re: About external .srt subtitles in omxplayer

Thu Nov 01, 2012 12:23 pm

got it working now :D

Krovatkin
Posts: 1
Joined: Sat Dec 29, 2012 7:39 am

Re: About external .srt subtitles in omxplayer

Sat Dec 29, 2012 8:10 am

@Henle,


Heh, I actually registered on this forum, so I can say thank you for your time and effort you invested into putting together a version that supports external subs! I am positive that it will be appreciated by great many people on the forum and beyond! Your and other members' good work on this forum allows people like me to have the smoothest user experience ever. Thank you!

henle
Posts: 65
Joined: Sat Apr 21, 2012 7:23 pm

Re: About external .srt subtitles in omxplayer

Sat Dec 29, 2012 1:09 pm

Krovatkin, thank you for taking the time to register and write that. I'm delighted that you're finding it useful!

Alvaro
Posts: 29
Joined: Sun Aug 19, 2012 8:47 am

Re: About external .srt subtitles in omxplayer

Sun Dec 30, 2012 7:54 am

Thanks a ton! You rock. :D

jose1711_
Posts: 58
Joined: Sat Jul 21, 2012 10:03 am

Re: About external .srt subtitles in omxplayer

Sun Jan 27, 2013 1:54 pm

any chance of integration to official omxplayer?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5268
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: About external .srt subtitles in omxplayer

Sun Jan 27, 2013 2:20 pm

jose1711_ wrote:any chance of integration to official omxplayer?
Yes, I'm just testing...

User avatar
Montekuri
Posts: 449
Joined: Thu Sep 22, 2011 6:26 pm
Contact: Website

Re: About external .srt subtitles in omxplayer

Wed Feb 13, 2013 11:17 am

I have Raspbian “wheezy” and omxplayer installed.
I watch videos with portuguese subtitles (with "ç", "é", "ã"... letters).
If I watch a mkv file with soft-coded subtitles they appear correctly.
But if I watch a mp4 or avi with external srt subtitles the special letters do not appear.

The Raspbian was at english locale. But even configuring to brazilian UTF-8 the special letters do not appear.

(Note: the special letters appears in any Windows media player and in the OpenElec).

henle
Posts: 65
Joined: Sat Apr 21, 2012 7:23 pm

Re: About external .srt subtitles in omxplayer

Wed Feb 13, 2013 2:43 pm

Montekuri wrote:I have Raspbian “wheezy” and omxplayer installed.
I watch videos with portuguese subtitles (with "ç", "é", "ã"... letters).
If I watch a mkv file with soft-coded subtitles they appear correctly.
But if I watch a mp4 or avi with external srt subtitles the special letters do not appear.

The Raspbian was at english locale. But even configuring to brazilian UTF-8 the special letters do not appear.

(Note: the special letters appears in any Windows media player and in the OpenElec).
Omxplayer does not currently check locale settings, all text-based subtitles are interpreted as UTF-8-encoded. Converting your SRT files should fix the problem.

User avatar
Montekuri
Posts: 449
Joined: Thu Sep 22, 2011 6:26 pm
Contact: Website

Re: About external .srt subtitles in omxplayer

Wed Feb 13, 2013 7:22 pm

henle wrote:Omxplayer does not currently check locale settings, all text-based subtitles are interpreted as UTF-8-encoded. Converting your SRT files should fix the problem.
Ok, I got it.
I batch converted all my subtitles to UTF-8 using Subtitle Edit and the subtitles displayed the special letters.
Thank you.

To someone else who wants to know how to use Subtitle Edit, first change the *.srt extension (and other subtitles like *.sub, *.ssa) to *.txt. You can use a batch renamer like Ken Renamer.
Then put all subtitles inside a folder called "subtitle" and move it to the Subtitle Edit folder.
Then, use this command:
SubtitleEdit /convert subtitle\*.txt subrip /encoding:utf-8

This command will convert all *.txt files inside the subtitle folder in *.srt files with the correct UTF-8 encoding.

mtpereira
Posts: 1
Joined: Sat Aug 10, 2013 2:29 pm

Re: About external .srt subtitles in omxplayer

Sat Aug 10, 2013 2:34 pm

Hello,

Actually, I've just tried to just run an iconv on the .srf tile and it did the trick:

Code: Select all

[email protected]:~# file -i movie.srt
movie.srt: text/plain; charset=iso-8859-1
iconv -f iso-8859-1 -t utf-8 movie.srt -o movie_utf8.srt
file -i movie_utf8.srt
movie_utf8.srt: text/plain; charset=utf-8
Now this .srt file is displayed correctly on omxplayer!

PS: Sorry for the digging.

User avatar
billybangleballs
Posts: 142
Joined: Fri May 18, 2012 11:28 pm

Re: About external .srt subtitles in omxplayer

Fri Nov 14, 2014 8:22 pm

Any idea why omxplayer aborts playback with the message :-

Code: Select all

 
omxplayer.bin: SubtitleRenderer.cpp:154: SubtitleRenderer::load_glyph(SubtitleRenderer::InternalChar)::<lambda(FT_Face, VGFont, bool)>: Assertion `!vgGetError()' failed.
/usr/bin/omxplayer: line 67:  6497 Aborted                LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "[email protected]" 
The .srt file looks ok, I made sure it was utf-8 but the only way to play the video past the point of first subtitle is to disable subtitles or remove the .srt file from the directory.

Any insight would be appreciated.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5268
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: About external .srt subtitles in omxplayer

Sat Nov 15, 2014 12:29 pm

billybangleballs wrote:Any idea why omxplayer aborts playback with the message :-

Code: Select all

 
omxplayer.bin: SubtitleRenderer.cpp:154: SubtitleRenderer::load_glyph(SubtitleRenderer::InternalChar)::<lambda(FT_Face, VGFont, bool)>: Assertion `!vgGetError()' failed.
/usr/bin/omxplayer: line 67:  6497 Aborted                LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "[email protected]" 
The .srt file looks ok, I made sure it was utf-8 but the only way to play the video past the point of first subtitle is to disable subtitles or remove the .srt file from the directory.

Any insight would be appreciated.
What gpu_mem do you have? 1080p video with subs may require more than 64M - try with 128M.

User avatar
billybangleballs
Posts: 142
Joined: Fri May 18, 2012 11:28 pm

Re: About external .srt subtitles in omxplayer

Sun Nov 16, 2014 5:53 am

dom wrote:
billybangleballs wrote:Any idea why omxplayer aborts playback with the message :-

Code: Select all

 
omxplayer.bin: SubtitleRenderer.cpp:154: SubtitleRenderer::load_glyph(SubtitleRenderer::InternalChar)::<lambda(FT_Face, VGFont, bool)>: Assertion `!vgGetError()' failed.
/usr/bin/omxplayer: line 67:  6497 Aborted                LD_LIBRARY_PATH="$OMXPLAYER_LIBS${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" $OMXPLAYER_BIN "[email protected]" 
The .srt file looks ok, I made sure it was utf-8 but the only way to play the video past the point of first subtitle is to disable subtitles or remove the .srt file from the directory.

Any insight would be appreciated.
What gpu_mem do you have? 1080p video with subs may require more than 64M - try with 128M.
I ran raspi-config and it said that the split was 128 and so I upped it to 256 and the file now plays with subtitles.

Thanks dom

Return to “Media centres”