Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 12-25-2009, 12:13 PM   #1
Registered: Nov 2006
Posts: 209

Rep: Reputation: 30
Playing 2 subtitle simultaneous for movies

I intend play 2 subtitle simultaneous in different languages for educational purpose. that means one subtitle is English and another is Persian.
Is there any movie player with this possibility ?

Thanks in advance
Old 12-25-2009, 04:54 PM   #2
David the H.
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,826

Rep: Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973Reputation: 1973
I've never heard of any player that can do that.

What formats are you talking about? The subtitle files for most computer videos are simply text files. You could edit the files so that lines from both languages are displayed together.

If it's a fixed media like dvd then I can't think of any way to do it, other than ripping the disk, extracting and converting the subtitles to a text format, then doing the above.
Old 12-26-2009, 08:19 AM   #3
Registered: Nov 2006
Posts: 209

Original Poster
Rep: Reputation: 30
Thanks for your attention
I have questioned on forum of Smplayer and got reply on this topic.
But unfortunately this script can not merge unicode subtitle correctly
Old 12-29-2009, 05:26 PM   #4
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 76
Originally Posted by nima0102 View Post
But unfortunately this script can not merge unicode subtitle correctly
There should be no problem in unicode as long as you have set your locale properly and you are using the GNU versions of tr, sed, etc. The problem then is most likely a non-unicode encoding (e.g., ISO8859-6 for arabic scripts). The encoding problem itself has nothing to do with the merging of subtitles. For example,
mplayer -sub vid.avi
should have the same output for the foreign subtitles as the merged version. The trick is to find the source encoding of the subtitles you already have. Or, you can get the bitmap subtitles (from e.g., the DVD) and OCR them directly (you need an OCR program which will detect Persian).

Another option (which if you’re using text subtitles still relies on correct encoding) is to use the gstreamer framework. Gstreamer applies things like subtitles as a filter or layer, so there is no limit to the number of subtitles at one time. The benefit here is that it will correctly handle bitmap and text subtitles, so there is no need to OCR a foreign script. It shouldn’t be too hard to create a gstreamer pipeline in whatever language you like.

For the simple example of 2 srt subtitles with OSS and Xv output:
gst-launch filesrc ! subparse ! top. \
filesrc ! subparse ! bot. \
filesrc location=vid.avi ! decodebin name=decoder \
decoder. ! queue ! audioconvert ! audioresample ! osssink \
decoder. ! textoverlay name=top valignment=top ! textoverlay name=bot valignment=bottom ! xvimagesink


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Playing quicktime movies ukwho Fedora 1 08-16-2009 02:25 AM
playing songs,movies sud_besus Linux - Newbie 1 12-01-2008 08:03 AM
playing movies and mp3 gokulagiridaran SUSE / openSUSE 5 05-29-2005 03:25 AM
Playing Movies without X? raid517 Linux - Software 3 04-19-2005 05:35 PM
playing dvd movies jappstam12345 Mandriva 10 03-29-2005 07:20 AM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:26 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration