LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   mplayer outside Xwindows (https://www.linuxquestions.org/questions/linux-software-2/mplayer-outside-xwindows-37533/)

jang 12-06-2002 09:54 PM

mplayer outside Xwindows
 
Is it possible to play avi or mpeg files without going into X windows? I am using Nvidia GeForce 2 MX 400 video card, what vo device shall I choose? Thanks.

MasterC 12-07-2002 03:20 AM

Sure it is, try this:
mplayer -vo vesa filename

Cool

TheCoffeeMug 12-07-2002 07:09 AM

You must be root when using "mplayer -vo vesa filename", and it doesn't work if you use the gcc 2.96 from RedHat. You could also try compile mplayer with SVGAlib support.

Read the documentation you get with mplayer when you download it. The documents are in the DOCS directory were you unpacked mplayer.

neo77777 12-07-2002 07:55 AM

You can do it as well with aalib :), it is just a matter of configuring aalib, and it works like a charm.

jang 12-07-2002 08:18 PM

thanks. I will try your suggestions

jang 12-08-2002 10:00 PM

mplayer -vo vesa didn't work. How do I determine which version of gcc I am using. If I am using gcc 2.96, do I upgrade it to a newer version? Of Do I just use svgalib? Do I install svgalib software so that mplayer will detect it during compilation? aalib didn't work either. Do I have to install aalib software?

TheCoffeeMug 12-09-2002 02:50 AM

The gcc version is found by writing this in the console:

gcc -v

If it is 2.96 it could be a problem for MPlayer. The problem might otherwise be:

1. You were not logged in as root.
2. You were inside XWindow when you tried to use VESA
3. You don't have a x86 system
4. You don't use Linux

Please read the VESA part from: http://www.mplayerhq.hu/DOCS/video.html

To use SVGAlib you must first download the development package from www.svgalib.org. Then recompile MPlayer; it will detect svgalib if it was correctly installed.
You must edit a setup file for you video card in /etc/vga/libvga.config.
Using svgalib is harder than just using the VESA. The aalib shows the movie as characters, and is mostly just fun. You must download the aalib library too and install it, and recompile mplayer.

jang 12-09-2002 03:01 AM

I checked, my gcc version is 3.2
I am logged in as root
While inside Xwindows, I pressed ctrl-alt f1, I even tried init 3
How do I know if I am using x86 system? If I am able to go into Xwindows, does it mean I am using x86?
I am using RH8 gnome

TheCoffeeMug 12-09-2002 03:35 AM

It should work with ctrl-alt-f1, so that is okay. If you have a Intel or AMD processor then you are probably using a x86 system, if you have a Motorola (MAC or Amiga) or some other kind of processor the you can't use the vesa mode.

Could you trie to write:

mplayer -vo vesa somemovie &> log.txt

Write some moviename that you have. Put the contens of the log.txt file on this forum.

You could also trie to write:

mplayer -vo help

To see what video output you mplayer is compiled with.

jang 12-09-2002 09:24 PM

Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale


MPlayer CVS-021205-13:00-3.2 (C) 2000-2002 Arpad Gereoffy (see DOCS)

CPU: Advanced Micro Devices Athlon 4 PM Palomino/Athlon MP Multiprocessor/Athlon XP eXtreme Performance (Family: 6, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE

Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: 49 audio & 123 video codecs
Font /root/.mplayer/font loaded successfully! (0 chars)
Using Linux hardware RTC timing (1024Hz)
Can't open input config file /root/.mplayer/input.conf : No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf : No such file or directory
Falling back on default (hardcoded) input config
Setting up lirc support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed opening lirc support!
You won't be able to use your remote control

Playing Peaches1.avi
Detected AVI file format!
VIDEO: [DIV3] 320x240 24bpp 29.97 fps 1653.1 kbps (201.8 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 48000 Hz, 2 ch, 16 bit (0x10), ratio: 16000->192000 (128.0 kbit)
Selected audio codec: [mp3] afm:mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
vo: couldn't open the X11 display ()!
==========================================================================
Requested video codec family [ffdivx] (vfm=ffmpeg) not available (enable it at compilation!)
Opening video decoder: [odivx] DivX4Linux lib (odivx mode)
VDec: vo config request - 320 x 240 (preferred csp: Planar YV12)
[PP] Using codec's postprocessing, max q = 9
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [sdl] 320x240 => 320x240 Planar YV12
FATAL: Cannot initialize video driver!
SDL: Initializing of SDL failed: No available video device.
VDecoder init failed :(
Opening video decoder: [divx4] DivX4Linux lib (divx4 mode)
VDec: vo config request - 320 x 240 (preferred csp: Packed YUY2)
[PP] Using codec's postprocessing, max q = 9
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [sdl] 320x240 => 320x240 Packed YUY2
FATAL: Cannot initialize video driver!
SDL: Initializing of SDL failed: No available video device.
VDecoder init failed :(
Opening video decoder: [dshow] DirectShow video codecs
Decoder supports the following YUV formats: YUY2 IYUV UYVY YV12 YVYU I420 YVU9
Decoder is capable of YUV output (flags 0x7f)
VDec: vo config request - 320 x 240 (preferred csp: Packed YUY2)
[PP] Using codec's postprocessing, max q = 4
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [sdl] 320x240 => 320x240 Packed YUY2
FATAL: Cannot initialize video driver!
SDL: Initializing of SDL failed: No available video device.
VDecoder init failed :(
Opening video decoder: [vfw] Win32/VfW video codecs
Loading codec DLL: 'divxc32.dll'
Loaded DLL driver divxc32.dll
VDec: vo config request - 320 x 240 (preferred csp: Packed YUY2)
[PP] Using codec's postprocessing, max q = 9
VDec: using BGR 32-bit as output csp (no 1)
Movie-Aspect is undefined - no prescaling applied.
VO: [sdl] 320x240 => 320x240 BGR 32-bit
FATAL: Cannot initialize video driver!
SDL: Initializing of SDL failed: No available video device.
VDecoder init failed :(
Opening video decoder: [vfw] Win32/VfW video codecs
Loading codec DLL: 'divx.dll'
External func COMCTL32.dll:17


MPlayer interrupted by signal 11 in module: init_video_codec
- MPlayer crashed by bad usage of CPU/FPU/RAM. Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and disassembly. For details, see DOCS/bugreports.html section 5.b.
- MPlayer crashed. This shouldn't happen. It can be a bug in the MPlayer code _or_ in your drivers _or_ in your gcc version. If you think it's MPlayer's fault, please read DOCS/bugreports.html and follow instructions there. We can't and won't help unless you provide these informations when reporting a possible bug.




I tried to recompile the program but am receiving errors. I don't know how to paste it here. Everytime I try to cut and paste, the previous text I cut is pasted here, and not the error message from compilation. Please help.

jang 12-09-2002 11:54 PM

I tried to recompile with MPlayer-0.90rc1 with the following command


[root@localhost root]# ./configure --enable-qtx-codecs --enable-gui --enable-menu --enable-xv --with-win32libdir=/root/win32 --enable-3dnow --enable-vesa

It says successful in ./configure. I can't paste everything because it is too long, but here are some problems I experienced.

In the end of make command, these lines appear:

Total lines parsed: 6075
gcc -c -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I. -I.. -o pci_names.o pci_names.c
#gcc -shared -Wl,-soname,libdha.so.0 -o libdha.so.0.1 libdha.o mtrr.o pci.o pci_names.o
gcc -shared -Wl,-soname -Wl,libdha.so.0.1 -o libdha.so.0.1 libdha.o mtrr.o pci.o pci_names.o
ln -sf libdha.so.0.1 libdha.so.0
ln: creating symbolic link `libdha.so.0' to `libdha.so.0.1': Operation not permitted
make[1]: *** [libdha.so.0.1] Error 1
make[1]: Leaving directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/libdha'
make: *** [libdha/libdha.so] Error 2


and in make install, these lines appear:

make -C libdha
make[1]: Entering directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/libdha'
make[1]: `libdha.so.0.1' is up to date.
make[1]: Leaving directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/libdha'
make -C vidix
make[1]: Entering directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/vidix'
gcc -c -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -o vidixlib.o vidixlib.c
ar r libvidix.a vidixlib.o
make[2]: Entering directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/vidix/drivers'
gcc -c -O4 -march=athlon-xp -mcpu=athlon-xp -pipe -ffast-math -fomit-frame-pointer -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC -I. -I.. -o radeon_vid.o radeon_vid.c
ld -L../../libdha -ldha -lm -shared -soname radeon_vid.so -o radeon_vid.so radeon_vid.o
ld: cannot find -ldha
make[2]: *** [radeon_vid.so] Error 1
make[2]: Leaving directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/vidix/drivers'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/mnt/c/downloads/mplayer2/MPlayer-0.90rc1/vidix'
make: *** [vidix/libvidix.a] Error 2

sharky_bg 03-30-2004 07:19 AM

I had exactly the same error

It was because I started "make" from a mounted Windows partition

FAT32 does not support either symbolic links or hard links, and trying
to create them will get an error "Operation not permitted"

So, if this is your case too, copy the whole uncompressed folder to a linux native partition and run ./configure and make again

Luck

jang 03-30-2004 06:37 PM

I have long given up with this problem. I'm afraid mine isn't mounted on a windows partition. But I've found a work around. I installed mplayer with apt-get, it's working well. So I must have missed some of it's requirements for mplayer to work in console. apt-get and urpmi worked great!

Thanks.


All times are GMT -5. The time now is 06:43 PM.