LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-01-2017, 10:09 PM   #1
doc1623
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Rep: Reputation: 0
mplayer subtitles question


I use mplayer all the time but I'm no expert. I use the command line but subtitles have always been somewhat of a mystery. I can get the srt files to work with the -sub switch but ones that are built in, I have trouble with.

It seems to find them but I can't see them. I've tried the interactive controls like J or v or F. Still unsure what "Forced" subtitles are. Anyway how come it sees them but I can't.

Code:
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (eac3), -aid 0, -alang ger
[lavf] stream 2: subtitle (srt), -sid 0, -slang eng
[lavf] stream 3: subtitle (srt), -sid 1, -slang bul
[lavf] stream 4: subtitle (srt), -sid 2, -slang fre
[lavf] stream 5: subtitle (srt), -sid 3, -slang ger
[lavf] stream 6: subtitle (srt), -sid 4, -slang ita
[lavf] stream 7: subtitle (srt), -sid 5, -slang rum
[lavf] stream 8: subtitle (srt), -sid 6, -slang spa
[lavf] stream 9: subtitle (srt), -sid 7, -slang tur

Last edited by doc1623; 12-01-2017 at 10:36 PM. Reason: spelling/mistyping
 
Old 12-02-2017, 03:48 AM   #2
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,339
Blog Entries: 1

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Have you tried with the -alang (audio) and -slang (subtitle) flags to "select" the language when there's multiple tracks. From the above it looks like it uses 3 character representations, most I've seen only use 2 (not that I look in that direction much). But I've had to -alang en a few times for things that didn't have english first / by default.
 
Old 12-02-2017, 07:03 PM   #3
doc1623
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Shadow_7 View Post
Have you tried with the -alang (audio) and -slang (subtitle) flags to "select" the language when there's multiple tracks. From the above it looks like it uses 3 character representations, most I've seen only use 2 (not that I look in that direction much). But I've had to -alang en a few times for things that didn't have english first / by default.
I did try slang with no luck. I didn't do the alang as there is only one audio.
 
Old 12-03-2017, 04:33 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 7,031
Blog Entries: 4

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
if you can provide us with a test file, we could figure it out together.
i have mplayer (SVN-r37998) installed and ready to roll.
 
Old 12-03-2017, 07:45 AM   #5
packer59
Member
 
Registered: Oct 2017
Posts: 47

Rep: Reputation: Disabled
Quote:
Originally Posted by doc1623 View Post
I use mplayer all the time but I'm no expert. I use the command line but subtitles have always been somewhat of a mystery. I can get the srt files to work with the -sub switch but ones that are built in, I have trouble with.

It seems to find them but I can't see them. I've tried the interactive controls like J or v or F. Still unsure what "Forced" subtitles are. Anyway how come it sees them but I can't.

Code:
libavformat file format detected.
[lavf] stream 0: video (h264), -vid 0
[lavf] stream 1: audio (eac3), -aid 0, -alang ger
[lavf] stream 2: subtitle (srt), -sid 0, -slang eng
[lavf] stream 3: subtitle (srt), -sid 1, -slang bul
[lavf] stream 4: subtitle (srt), -sid 2, -slang fre
[lavf] stream 5: subtitle (srt), -sid 3, -slang ger
[lavf] stream 6: subtitle (srt), -sid 4, -slang ita
[lavf] stream 7: subtitle (srt), -sid 5, -slang rum
[lavf] stream 8: subtitle (srt), -sid 6, -slang spa
[lavf] stream 9: subtitle (srt), -sid 7, -slang tur
in same folder, you have movie.avi + movie.srt

you may run : mplayer movie.avi

With the key, probably u, or s, you can can switch to different languages.
 
Old 12-03-2017, 08:45 PM   #6
doc1623
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by packer59 View Post
in same folder, you have movie.avi + movie.srt

you may run : mplayer movie.avi

With the key, probably u, or s, you can can switch to different languages.

No. There is neither an avi nor a srt. It only has an mkv file . Like I said before I've used the srt files with the sub switch.
 
Old 12-03-2017, 09:16 PM   #7
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,339
Blog Entries: 1

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
So the subtitles are not part of the movie clip? Mplayer is probably treating it separately then. It'll play the subtitles "AFTER" the movie.
 
Old 12-03-2017, 11:44 PM   #8
doc1623
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Shadow_7 View Post
So the subtitles are not part of the movie clip? Mplayer is probably treating it separately then. It'll play the subtitles "AFTER" the movie.
not part? you lost me. There is only one file in the directory but as you can see from output it seems to include subs but I don't see any or seem to be able to use/change them. Maybe it's a compile option that wasn't enabled or something...just thought someone would know.
 
Old 12-03-2017, 11:45 PM   #9
doc1623
LQ Newbie
 
Registered: Jan 2009
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ondoho View Post
if you can provide us with a test file, we could figure it out together.
i have mplayer (SVN-r37998) installed and ready to roll.

I'll see if I can find a small file that's similar. Thanks
 
Old 12-04-2017, 01:52 PM   #10
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 7,031
Blog Entries: 4

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
i tried one or two mkv files with built-in suntitles, but they had only one subtitle built in.
pressing v or j does what is to be expected, v switches them on/off, j cycles (between none and the only one).
it takes a little before the loaded subtitle shows; maybe a few seconds, maybe it depends on other things like subtitle length or key frame. have you tried just waiting it out?

PS:
which distro? which version? what are the compile options? maybe some subtitle formats aren't supported?
and lastly, what keeps you from using mpv, which is far superior imo?
 
Old 12-04-2017, 09:49 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,339
Blog Entries: 1

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Have you tried extracting them?

$ ffprobe file.mkv

$ ffmpeg -i file.mkv -vn -an -y file.srt

$ hexedit file.srt

The -vn is for no video the -an is for no audio. Maybe there are subtitles but they're completely blank. I haven't done much subtitle related, but what I've read about them they're just time stamps, text, and font information. It could just be that the default font isn't installed, so mplayer doesn't display it. You would have to strace or other investigatory measures to know if that's the case.

It could also be something to do with how mplayer was compiled. ?subtitles disabled? You're guess is as good as mine, but I know mplayer can display subtitles. Perhaps the LANG or LC_ALL locales type stuff needs to be defined and not left blank. Lots of weird "administrated" aspects to linux. Like a few audio programs that don't do sound if some networking stuff isn't defined relative to /etc/hostname and /etc/hosts.
 
Old 12-05-2017, 03:15 AM   #12
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 7,031
Blog Entries: 4

Rep: Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687Reputation: 1687
Quote:
Originally Posted by Shadow_7 View Post
$ hexedit file.srt
.srt is plain text, so 'nano file.srt' would be more appropriate.
 
Old 12-05-2017, 05:44 AM   #13
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,339
Blog Entries: 1

Rep: Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693Reputation: 693
Quote:
Originally Posted by ondoho View Post
.srt is plain text, so 'nano file.srt' would be more appropriate.
Yes, but if it's not, hexedit is "safer" IMO. Although hexdump would be safer still (no potential for edits). Not everyone knows about "reset", "clear", ^L, ^A, ^E, Shift+PageUp, Shift+PageDown, and all the usual terminal / console based things.
 
Old 12-05-2017, 12:05 PM   #14
packer59
Member
 
Registered: Oct 2017
Posts: 47

Rep: Reputation: Disabled
Quote:
Originally Posted by Shadow_7 View Post
Yes, but if it's not, hexedit is "safer" IMO. Although hexdump would be safer still (no potential for edits). Not everyone knows about "reset", "clear", ^L, ^A, ^E, Shift+PageUp, Shift+PageDown, and all the usual terminal / console based things.
hexedit is maybe over killed. Why not vim ?
 
  


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
MPlayer Subtitles Question ShadowMetis Linux - Software 1 02-18-2006 10:38 AM
Mplayer subtitles Livebrain Slackware 2 01-12-2006 10:17 AM
Subtitles in mplayer enigma82 Linux - Software 1 09-04-2004 06:53 AM
Mplayer with subtitles mad_ady Linux - Software 3 11-02-2003 04:57 PM
mplayer : subtitles question niidea Linux - Software 3 08-12-2003 01:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration