annolinux / gnome-mplayer

Automatically exported from code.google.com/p/gnome-mplayer
0 stars 0 forks source link

auto crop would help using the full screen width #227

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
feature request (no bug):

What steps will reproduce the problem?
1. choose a file with black borders at top&bottom (e. g.: a cinema movie
broadcasted in 4:3 TV format)
2.

What is the expected output? What do you see instead?
(a) i would like to have a window that shows only the interesting part of
the movie...
(b) a big part of a wide screen will be unused (even in full-screen-mode).

Original issue reported on code.google.com by goo...@wgboome.org on 4 Jul 2009 at 9:06

GoogleCodeExporter commented 8 years ago

Original comment by kdeko...@gmail.com on 4 Jul 2009 at 1:28

GoogleCodeExporter commented 8 years ago
Do you do this with command line mplayer? If so what commands on the command 
line do
you use? Several of the ones I have tried either do nothing or fail.

Original comment by kdeko...@gmail.com on 4 Jul 2009 at 1:37

GoogleCodeExporter commented 8 years ago
hm

i wouldnt do it via mplayer's options, because we had to restart mplayer 
whenever the
aspect ratio changes... right?

my idea was this:
we change the visible rectangle
(e. g. we tell mplayer that the video should have 1440x1080, but we just show
1440x900+0+90 of that inside the gnome-mplayer window)...
(something like that happens when the size of the gnome-mplayer window changed?)

workaround:
currently i do it by moving the window partially out of the screen and then i 
enlarge
its height until the movie fills the full width,
which takes some time...
but the workaround is ok, i just thought there would be an easier automatism... 
:-)

-arne

Original comment by goo...@wgboome.org on 4 Jul 2009 at 2:04

GoogleCodeExporter commented 8 years ago
There is experimental support for this in SVN. Do make this work you have to run
configure with --enable-panscan and use a very recent SVN version of mplayer. 
The
reason for the compile flag is that old mplayer's will break and show 
incorrectly.

Original comment by kdeko...@gmail.com on 1 Sep 2009 at 5:02

GoogleCodeExporter commented 8 years ago
i took today's SVN snapshots... but: the aspect of the movie didnt work and i 
was
unable to find any "panscan" related option... did i install it the wrong way? 
-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 8:53

GoogleCodeExporter commented 8 years ago
There are no menu options just the W/E keys control it. Also I'm not sure what 
you
are seeing but when you say "didn't work" almost always will be 1 of 2 problems.

1. For gnome-mplayer, run make clean, use the "--enable-panscan" option when 
running
configure

2. Your mplayer is to old, I tested with MPlayer SVN-r29629 and it works 
correctly

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 12:38

GoogleCodeExporter commented 8 years ago
1.
that is what config.log says:
$ ./configure --enable-panscan

2.
hm
i used _today's_ svn version from here:
http://www.mplayerhq.hu/MPlayer/releases/mplayer-checkout-snapshot.tar.bz2
(it has the same ChangeLog file like r29629 (i downloaded that one, 2, 
now...)...

(a)
when i try to change the aspect ratio (with the "a" key), i get this with option
"--reallyverbose":
thread reader: VDec: vo config request - 720 x 576 (preferred colorspace: 
Unknown 0x0000)
thread reader: VDec: using Planar YV12 as output csp (no 0)
thread reader: Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
thread reader: ID_VIDEO_ASPECT=1.7778
thread reader: VO: [xv] 720x576 => 1024x576 Planar YV12 
Resizing to 1024 x 576
current size = 720 x 578 
new_width 720 new_height 400

(b)
with "o" + "eeeee" i get a bar, but the black areas at the top and bottom dont 
change...

(c)
then i found that i cant c the mouse cursor, when i move it into the movie 
window area...

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 1:59

GoogleCodeExporter commented 8 years ago
oh - i should add to (a),
that the picture doesnt change, when i change the aspect... it just flashes 
green for
a short moment and then everything looks as before...

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 2:03

GoogleCodeExporter commented 8 years ago
oh - i should add to (b):
when i press "w" i get this with option "--reallyverbose":
send command = pausing_keep_force get_property panscan
thread reader: ANS_panscan=0.100000
send command = pausing_keep_force panscan -0.1 0
send command = pausing_keep_force get_property panscan

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 2:11

GoogleCodeExporter commented 8 years ago
ok, please follow this...

Open a video, make the window taller than it is by default (say at least 1.5 to 
two
time, and do not make it wider)... leave all the options alone, press the e key
several times, you should see the video zoom in.

The aspect key should have little to nothing to do with this feature.

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 2:52

GoogleCodeExporter commented 8 years ago
i made it taller and the whole window was filled with the video, because the 
aspect
ratio changed... somehow it is always in "Follow Window" mode, although i didnt 
want
it...

btw: did u mean "wider"?
when i make it taller the upper/lower black areas just get bigger...
but i want them to get smaller, when the movie can get wider, because the 
window is
wider than the movie can use it...

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 3:39

GoogleCodeExporter commented 8 years ago
When the window is doing "follow window" mode, I believe it is due to an old 
mplayer,
this is why I have the configure flag. I know you say you have installed the 
latest,
however it is not acting like it so I need you to please post the gnome-mplayer 
-v.

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 3:45

GoogleCodeExporter commented 8 years ago
is it possible, that an old config file causes my problem?

here u r:
> ./src/gnome-mplayer -v
GNOME MPlayer v0.9.7
vo = xv ao = pulse
Running with GIO support
Using volume of 100 from gnome-mplayer preference
Using match: type='signal',interface='com.gnome.mplayer'
Using match: type='signal',interface='org.gnome.SettingsDaemon'
Using match: type='signal',interface='org.gnome.SettingsDaemon.MediaKeys'
Proxy connections and Command connected
opening playlist
playlist detection = 0
adding file:///opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg to playlist 
(cancel = 0)
getting file metadata for /opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg
playing - file:///opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg
is playlist 0
current size = 0 x 0 
Changing window size to 766 x 450 visible = 1
/opt/home/aw-loud/install/mplayer/mplayer-checkout-2009-09-02/mplayer -profile
gnome-mplayer -quiet -slave -identify -volume 100 -framedrop -vf-pre
yadif,softskip,scale -noconsolecontrols -noidle -stop-xscreensaver -osdlevel 0
-nomouseinput -cache 9680 -wid 0x4800056 -ss 0 -ass -noembeddedfonts 
-ass-force-style
FontName=Sans,Italic=0,Bold=0,Outline=0,Shadow=0 -ass-font-scale 1.00 -ass-color
ffffff00 -channels 2 -vf-add screenshot -af-add
export=/tmp/mplayer-af_exportfsmkot:512
/opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg 
current size = 372 x 1 
Changing window size to 766 x 450 visible = 1
Spawn succeeded for filename /opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg
MPlayer SVN-r29617-4.4.1 (C) 2000-2009 MPlayer Team

Playing /opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg.

AVI file format detected.
ID_VIDEO_ID=0
[aviheader] Video stream found, -vid 0
ID_AUDIO_ID=1
[aviheader] Audio stream found, -aid 1
VIDEO:  [FMP4]  766x450  24bpp  25.000 fps  1659.0 kbps (202.5 kbyte/s)
Clip info:
 Software: MEncoder 29092-4.4.0
ID_CLIP_INFO_NAME0=Software
ID_CLIP_INFO_VALUE0=MEncoder 29092-4.4.0
ID_CLIP_INFO_N=1
ID_FILENAME=/opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg
ID_DEMUXER=avi
ID_VIDEO_FORMAT=FMP4
ID_VIDEO_BITRATE=1658960
ID_VIDEO_WIDTH=766
ID_VIDEO_HEIGHT=450
ID_VIDEO_FPS=25.000
ID_VIDEO_ASPECT=0.0000
ID_AUDIO_FORMAT=80
ID_AUDIO_BITRATE=64000
ID_AUDIO_RATE=0
ID_AUDIO_NCH=0
ID_LENGTH=3060.00
ID_SEEKABLE=1
ID_CHAPTERS=0
ERROR: [VO_XV] Could not grab port 280.
[ass] auto-open
Opening video filter: [screenshot]
Opening video filter: [eq2]
Opening video filter: [scale]
Opening video filter: [softskip]
Opening video filter: [yadif]
[ass] Init
[ass] Updating font cache.
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
ID_VIDEO_CODEC=ffodivx
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 64.0 kbit/4.17% (ratio: 8000->192000)
ID_AUDIO_BITRATE=64000
ID_AUDIO_RATE=48000
ID_AUDIO_NCH=2
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
[export] Exporting to file: /tmp/mplayer-af_exportfsmkot
[export] Memory mapped to file: /tmp/mplayer-af_exportfsmkot (0x7f1ab4689000)
[export] Exporting to file: /tmp/mplayer-af_exportfsmkot
[export] Memory mapped to file: /tmp/mplayer-af_exportfsmkot (0x7f1ab4689000)
AO: [pulse] 48000Hz 2ch s16le (2 bytes per sample)
[export] Exporting to file: /tmp/mplayer-af_exportfsmkot
[export] Memory mapped to file: /tmp/mplayer-af_exportfsmkot (0x7f1ab4689000)
[export] Exporting to file: /tmp/mplayer-af_exportfsmkot
[export] Memory mapped to file: /tmp/mplayer-af_exportfsmkot (0x7f1ab4689000)
ID_AUDIO_CODEC=mp3
Starting playback...
VDec: vo config request - 766 x 450 (preferred colorspace: Planar YV12)
ERROR: [swscaler @ 0xd82c80]No accelerated colorspace conversion found.
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.70:1 - prescaling to correct movie aspect.
ID_VIDEO_ASPECT=1.7022
[swscaler @ 0xd82c80]using unscaled yuv420p -> yuv420p special converter
VO: [xv] 766x450 => 766x450 Planar YV12 
Resizing to 766 x 450
current size = 766 x 452 
ANS_switch_audio is invalid -1
ERROR: Failed to get value of property 'sub_demux'.
ANS_switch_audio is invalid -1

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 4:03

GoogleCodeExporter commented 8 years ago
Ok, back to your previous comment

> when i make it taller the upper/lower black areas just get bigger... 

This is what it is supposed to do. Then as you press e these areas should get 
smaller
as you "zoom" into the video.

I also added an extra debug flag to SVN that shows if the app is running in 
panscan mode

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 4:12

GoogleCodeExporter commented 8 years ago
Also, you can make it wider too. The w key unzooms the picture and the e key 
zooms
the picture to fill the black area, chopping of the edges to do that.

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 4:14

GoogleCodeExporter commented 8 years ago
Ah! I see the problem... apparently the --enable-panscan option is not being 
enabled
during configure

I can tell this from your mplayer commandline

/opt/home/aw-loud/install/mplayer/mplayer-checkout-2009-09-02/mplayer -profile
gnome-mplayer -quiet -slave -identify -volume 100 -framedrop -vf-pre
yadif,softskip,scale -noconsolecontrols -noidle -stop-xscreensaver -osdlevel 0
-nomouseinput -cache 9680 -wid 0x4800056 -ss 0 -ass -noembeddedfonts 
-ass-force-style
FontName=Sans,Italic=0,Bold=0,Outline=0,Shadow=0 -ass-font-scale 1.00 -ass-color
ffffff00 -channels 2 -vf-add screenshot -af-add
export=/tmp/mplayer-af_exportfsmkot:512
/opt/home/aw-loud/deploy/mm/tv/cache/PB/s4/e21.mpg 

When panscan is properly enabled there should be a -fs after the -wid 0x4800056 
option.

So do this in the gnome-mplayer source

make distclean
./configure --enable-panscan
make

then retest. I think this should fix your issue.

Original comment by kdeko...@gmail.com on 2 Sep 2009 at 4:31

GoogleCodeExporter commented 8 years ago
i did that "make distclean ; ./configure --enable-panscan ; make" trick, but i 
still
had that problem...

i added "-fs" to "~/.mplayer/config", which worked fine...

then i did a "svn update" of "gnome-mplayer" and just typed "make", which 
solved the
problem: everything is fine now... w00t! :-)

but the steps r too big for my taste... how can i get smaller steps?

-arne

Original comment by goo...@wgboome.org on 2 Sep 2009 at 5:30

GoogleCodeExporter commented 8 years ago
the steps are set in gui.c around line 1877. change the 0.1 to smaller values 
like 0.05.

Original comment by kdeko...@gmail.com on 3 Sep 2009 at 3:16

GoogleCodeExporter commented 8 years ago
cool - thank u! :-)) -arne

Original comment by goo...@wgboome.org on 3 Sep 2009 at 3:24

GoogleCodeExporter commented 8 years ago
oh: can i remove the "menu bar" like the "control bar"? that would give me some 
more
space... -arne

Original comment by goo...@wgboome.org on 3 Sep 2009 at 3:25

GoogleCodeExporter commented 8 years ago
no...

Original comment by kdeko...@gmail.com on 3 Sep 2009 at 4:00

GoogleCodeExporter commented 8 years ago

Original comment by kdeko...@gmail.com on 3 Sep 2009 at 4:41