LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-06-2009, 02:37 AM   #1
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908
Blog Entries: 26

Rep: Reputation: 49
how to add bottom margin for subtitles in mplayer


I am using mplayer.The subtitles overlap a bottom edge of frame.Is there a way I can give option to reserve few pixels at bottom where subtitles will be displayed so they do not appear over video frame.
 
Old 07-06-2009, 03:44 AM   #2
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I don't really understand what you mean by reserving pixels, but to make the subtitles smaller I usually use one of these options:

This sets the subtitles to autoscale with respect to the height of the movie (useful for wide screen movies)
-subfont-autoscale 1

This defines what percentage of the screen size to use for subtitles
-subfont-text-scale 3

Check more options here:
http://www.mplayerhq.hu/DOCS/man/en/...ITLE%20OPTIONS
 
Old 07-16-2009, 01:30 AM   #3
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
I mean that suppose desktop resolution is 800*600 then on playing video in full screen.The bottom 100 pixel wide strip should be black with subtitles appearing on it while video frame should be above that black band so not even a bit of frame is covered by subtitles.
 
Old 01-09-2010, 04:25 AM   #4
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
solution for all
If you want that subtitles of video should not cover a single bit of frame then you can create a small black band at bottom where only subtitles will be displayed.Then do as follows
mplayer -vf expand=0:-50:0:0 videofile
Thus we get 50 pixel band at bottom where only subtitles will appears not hiding even a single pixel of video.
If your fontsize is bigger then you can increase width of band by replacing 50 by higher number.
i got this from manpage.
you can also add to file ~/.mplayer/config so that it becomes default when mplayer is used.

If you find this helpful then thank me by pressing thumbs up button.Thank you.

Last edited by sumeet inani; 01-11-2010 at 12:20 AM.
 
Old 01-09-2010, 04:34 AM   #5
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Alright, thanks, it might be useful some day.
 
Old 07-29-2010, 11:34 PM   #6
sumeet inani
Member
 
Registered: Oct 2008
Posts: 908

Original Poster
Blog Entries: 26

Rep: Reputation: 49
Helpful for all

Actually i had few video which when played with latest mplayer appeared monochrome like a classic . Then i changed video output to x11 & video was well in color. But on pressing f the frame did not stretch but just black bands around video of original resolution.
Stubborn , as I am . I decided to play video with same aspect ratio covering maximum part of screen & subtitles in empty area not overlaying the video frame.
i ran
Code:
mplayer -vo x11 -vf scale=width:height,expand=0:-remaining space in vertical:0:0
Little explanation

Here width & height are same multiple of original resolution.
remaining space in vertical screen=600-height if your screen resolution is 'somethingx600'.

Last edited by sumeet inani; 07-29-2010 at 11:35 PM.
 
  


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
how add a gnome bottom panel nyzhou Debian 3 05-10-2008 12:22 AM
how add a gnome bottom panel nyzhou Linux - Desktop 2 05-09-2008 11:53 AM
Brother MFC-210C top margin is huge, bottom doesn't print Guitarist88 Linux - Hardware 2 03-29-2008 07:46 PM
1. how to set labels bottom margin? 2. how to set all labels to be right to left typi dfgfdgdf General 0 03-20-2007 09:43 AM
How to add subtitles with DVDstyler? colucix Linux - Software 0 02-19-2007 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:15 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
Open Source Consulting | Domain Registration