View previous topic :: View next topic |
Author |
Message |
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Mon Jul 24, 2006 12:36 pm Post subject: [solved] remote mplayer viewing w/o ssh |
|
|
Hello
From machine 1 (192.168.1.2), I use ssh to log into machine 2 (192.168.1.8) that hosts video files and play them using mplayer. When I do that, much of the CPU power of the machine 2 goes to encrypthing the data sent to machine 1. Since I'm on a personal, secure network behind a firewall, I'd like to try sending the data via raw X. With
DISPLAY=192.168.1.2:0 mplayer videofile.avi
I only get
AVI file format detected.
VIDEO: [DX50] 720x400 24bpp 29.970 fps 761.6 kbps (93.0 kbyte/s)
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 44100 Hz, 2 ch, s16le, 32.0 kbit/2.27% (ratio: 4000->176400)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
vo: couldn't open the X11 display (192.168.1.2:0)!
vo: couldn't open the X11 display (192.168.1.2:0)!
and then it tries other video out drivers, until settles for aalib. I am running Gnome, and I assume this is Gnome's fault, since running wmaker in another virtual terminal on machine 1 allows me to view the movie (very slowly with much skipping) if I specify -vo x11, but by default or if I give it -vo xv, it gives me
VO: [xv] 720x400 => 720x400 Planar YV12
Shared memory not supported
Reverting to normal Xv
Shared memory not supported
Reverting to normal Xv
X11 error: BadAlloc (insufficient resources for operation)?,?% 0 0
MPlayer interrupted by signal 6 in module: vo_check_events
- 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/HTML/en/bugreports.html and follow the instructions there. We can't and
won't help unless you provide this information when reporting a possible bug.
Xlib: unexpected async reply (sequence 0x5a)!
With Gnome it makes no difference if I specify a video out device or not. I've done "xhost +" on machine 1 but that did not change anything.
Last edited by Kimmo_S on Tue Jul 25, 2006 2:59 pm; edited 2 times in total |
|
Back to top |
|
|
majeru n00b
Joined: 21 Apr 2004 Posts: 24 Location: Cluj, Romania
|
Posted: Mon Jul 24, 2006 1:52 pm Post subject: |
|
|
xhost + should make it possible no matter of which window manager you are using, assuming that you are running X without the -nolisten tcp option, but I guess this option is issued by default _________________ gentoo abUser |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Mon Jul 24, 2006 2:12 pm Post subject: |
|
|
I could find no configuration file, either personal or system-wide with "-nolisten tcp"
If you are saying that the default is to not listen to TCP, then where should I go to enable it? Reading the server's manual page seemed to indicate that default is to listen to all kinds of transports, and that it can only be disabled from there on. But I couldn't find any place where I'd be disabling it. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Mon Jul 24, 2006 2:18 pm Post subject: |
|
|
Kimmo_S wrote: | I could find no configuration file, either personal or system-wide with "-nolisten tcp"
If you are saying that the default is to not listen to TCP, then where should I go to enable it? Reading the server's manual page seemed to indicate that default is to listen to all kinds of transports, and that it can only be disabled from there on. But I couldn't find any place where I'd be disabling it. |
http://gentoo-wiki.com/HOWTO_XDMCP _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Mon Jul 24, 2006 3:26 pm Post subject: |
|
|
But I am not using any displaymanager, and I do not want to run a whole desktop remotely. Also, I have no idea how the instructions on the wiki page would allow me to remove the "-nolisten tcp" from my X commandline (which I btw. saw there by using top).
I just want to log into machine 2 from machine 1 and play a video file that resides on the HD of machine 2 so that it is displayed on the screen of machine 1. |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Mon Jul 24, 2006 3:36 pm Post subject: |
|
|
I think I fixed it by editing /usr/X11R6/bin/startx
and removing it from the line
defaultserverargs="-nolisten tcp -br"
Must try it, will then mark the thread as solved. |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Tue Jul 25, 2006 2:56 pm Post subject: |
|
|
It worked, but the bandwidth requirement of the uncopressed video was more than my 100Mbps Etherned had to offer. It would be ideal if there was a solution to lightly compress but not encrypt the data.
My final solution was to mount the video files via FUSE and sshfs and play them on machine 1. |
|
Back to top |
|
|
beandog Bodhisattva
Joined: 04 May 2003 Posts: 2072 Location: /usa/utah
|
Posted: Tue Jul 25, 2006 11:12 pm Post subject: |
|
|
Why not just mount the drive using NFS? Theres no encryption, and it wont bog down the network playing the file. _________________ If it ain't broke, tweak it. dvds | blurays | blog | wiki |
|
Back to top |
|
|
Kimmo_S n00b
Joined: 10 Apr 2004 Posts: 45
|
Posted: Wed Jul 26, 2006 7:22 am Post subject: |
|
|
Well, the original problem was to have machine 2 play (decode) the video, i.e. run mplayer and see the video on machine 1.
* With ssh encryption this almost works. 15% of machine 1's CPU goes to decoding and 85% goes to encrypting.
* With plain X the network's bandwidth was not enough. With ssh the bandwidth got almost used up, but the limiting factor was anyway the CPU usage caused by the encryption.
Now that I gave up with that, and decided to go with running the decoder in machine 1, while still storing the files on machine 2, I found ftpmount, FUSE and sshfs the easiest solutions. I could have done it with Samba or NFS, but have run into problems with both when toying around with them previously. |
|
Back to top |
|
|
Tintenstich Apprentice
Joined: 25 Mar 2004 Posts: 192
|
Posted: Thu Nov 09, 2006 12:59 pm Post subject: |
|
|
Quote: | Why not just mount the drive using NFS? Theres no encryption, and it wont bog down the network playing the file.
|
I try to do that but Xine or Mplayer on local box says "Non codec found" or "Seek failed", the same video-file on local HD works with no problems.
There is my /etc/exports
Code: |
/mnt/discodue/Muzik/ 192.168.0.186(ro,sync)
/mnt/discodue/videos/ 192.168.0.186(ro,sync)
|
Any Idea?? |
|
Back to top |
|
|
madisonicus Veteran
Joined: 20 Sep 2006 Posts: 1130
|
Posted: Fri Nov 10, 2006 3:53 pm Post subject: |
|
|
Kimmo_S wrote: | Well, the original problem was to have machine 2 play (decode) the video, i.e. run mplayer and see the video on machine 1.
* With ssh encryption this almost works. 15% of machine 1's CPU goes to decoding and 85% goes to encrypting.
* With plain X the network's bandwidth was not enough. With ssh the bandwidth got almost used up, but the limiting factor was anyway the CPU usage caused by the encryption.
Now that I gave up with that, and decided to go with running the decoder in machine 1, while still storing the files on machine 2, I found ftpmount, FUSE and sshfs the easiest solutions. I could have done it with Samba or NFS, but have run into problems with both when toying around with them previously. |
This was the solution I found best too for doing video over the net like that. For those interested in following in your footsteps, there's a great guide on the gentoo-wiki:http://gentoo-wiki.com/HOWTO_FTP_Mount
After working with it a bunch, I came to the conclusion that trying to play video live like that, even though I loved the idea, didn't make as much sense as just scp'ing over the .avi. LAN transfers the file data much faster than I would view it, creating a buffer to prevent skips and stalls. With mplayer (at least and probably others) you can even start playing it before the whole file has transferred, so you don't have to wait to start watching. Setting up a simple cron job to clear out videos once a day on the client box will prevent you from using up disk space. That's just my experience though.
HTH,
m _________________ Please add [SOLVED] to your message title if you feel that your question has been answered.
------
Intel Q9300 Core2 Quad * Gigabyte GA-EP35C-DS3R
Samsung x360
AMD64 x2 4200+ * TF7050-M2 * HTPC
ZOTAC ION A-U Mini-ITX * HTPC |
|
Back to top |
|
|
|