0

I'm try using mplayer to play video under frame buffer, and I'm using uvesafb as the frame buffer driver. The board is VIA EPIA-N800

The grub boot setting is:

/boot/vmlinuz-2.6.32 root=UUID=7ece6c10-7255-4f21-8cd8-edb096233969 ro quiet console=tty2 nomodeset video=uvesafb:mode_option=1920x1080-16,mtrr=3,scroll=ywrap

But when I play the video with mplayer, the screen will become black for a while, seems like reset or re-initial the screen before playing the video. The command is like that:

mplayer -vo fbdev /opt/1.avi

And the output is

root@ytmp:/opt/ytmp# mplayer -vo fbdev /opt/1.avi   
MPlayer 1.0rc3-4.4.4 (C) 2000-2009 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /opt/1.avi.
AVI file format detected.
[aviheader] Video stream found, -vid 0
[aviheader] Audio stream found, -aid 1
VIDEO:  []  720x576  24bpp  25.000 fps  5459.1 kbps (666.4 kbyte/s)
Clip info:
 Software: MEncoder 1.0rc3-4.4.4
==========================================================================
Opening video decoder: [mpegpes] MPEG 1/2 Video passthrough
VDec: vo config request - 720 x 576 (preferred colorspace: Mpeg PES)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
The selected video_out device is incompatible with this codec.
Try appending the scale filter to your filter list,
e.g. -vf spp,scale instead of -vf spp.
VDecoder init failed :(
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Unsupported PixelFormat -1
Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
==========================================================================
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, s16le, 224.0 kbit/14.58% (ratio: 28000->192000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [pulse] Init failed: Connection refused
Failed to initialize audio driver 'pulse'
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 720 x 576 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.33:1 - prescaling to correct movie aspect.
[swscaler @ 0xb5f167a0]using unscaled yuv420p -> rgb565 special converter
VO: [fbdev] 720x576 => 768x576 BGR 16-bit 
A:  75.0 V:  75.0 A-V:  0.000 ct:  0.024 1875/1875 19%  1%  0.7% 0 0 

MPlayer interrupted by signal 2 in module: sleep_timer
A:  75.0 V:  75.0 A-V:  0.000 ct:  0.024 1876/1876 19%  1%  0.7% 0 0 
Exiting... (Quit)

If I change the grub boot setting like this:

/boot/vmlinuz-2.6.32 root=UUID=7ece6c10-7255-4f21-8cd8-edb096233969 ro quiet console=tty2 vga=0x317

The problem did not appear. I did compare both mplayer output, but the output is same. Did there any way to solve this?

billy3321
  • 85
  • 1
  • 1
  • 6

1 Answers1

5

In the first case (argument=nomodeset video=uvesafb:mode_option=1920x1080-16), you disabled KMS(Kernel Mode Settings), and use uvesafb instead. If KMS is disabled, when you switch between virtual terminal and X11/framebuffer, the screen will turn black for a while. In the second case you just set the resolution and KMS works. So you can switch between terminal and framebuffer without any problems.

SuperCat
  • 66
  • 2
  • So, does there has any way to make the `mplayer` playing move with virtual terminal, not X11/framebuffer? – billy3321 Oct 17 '12 at 07:41
  • No, you cannot draw images on virtual terminals, virtual terminals are only for texts. Somehow mplayer can turn images into texts (like ASCII arts)... – SuperCat Oct 17 '12 at 07:46
  • I try to use vga parameter instead, so I use `hwinfo --framebuffer` to get the setting, and I found ` Mode 0x0367: 1920x1080 (+3840), 16 bits` and switch the setting from `vga=0x317` to `vga=0x367`. But I found the screen is not 1920x1080, and the screen will trun black before the mplayer playing video, the problem still. – billy3321 Oct 17 '12 at 07:56
  • Actually we really draw images on it through write to `/dev/fb0` while using `uvesafb`. Can you explain more about the switch between virtual terminal and X11/framebuffer? Thanks!! – billy3321 Oct 17 '12 at 07:59
  • Maybe the kernel framebuffer driver does not really support that resolution (1920*1080). If you want to know more about KMS, just read its document. – SuperCat Oct 17 '12 at 08:02