LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

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

Rep: Reputation: 30
Playing 2 subtitle simultaneous for movies


Hi
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, 05:54 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950Reputation: 1950
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, 09:19 AM   #3
nima0102
Member
 
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, 06:26 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
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,
Code:
mplayer -sub sub.srt 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:
Code:
gst-launch filesrc location=sub1.srt ! subparse ! top. \
filesrc location=sub2.srt ! 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
 
  


Reply


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 03:25 AM
playing songs,movies sud_besus Linux - Newbie 1 12-01-2008 09:03 AM
playing movies and mp3 gokulagiridaran Suse/Novell 5 05-29-2005 04:25 AM
Playing Movies without X? raid517 Linux - Software 3 04-19-2005 06:35 PM
playing dvd movies jappstam12345 Mandriva 10 03-29-2005 08:20 AM


All times are GMT -5. The time now is 04:35 PM.

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