[Logo] Air Video Forum
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Moderation Log] Moderation Log   [Register] Register / 
[Login] Login 
Messages posted by: chri
Forum Index » Profile for chri » Messages posted by chri
Author Message
Sash wrote:Air Video Server doesn't keep computer awake while streaming video.

Fix it please!


Turn off power saving while streaming?
yapp the remuxing is great but difficult to get working. Heres something to begin with if it helps. (modified from a ps3 script, but you get the idea). Another on e can be found here http://www.dufault.info/blog/a-script-to-remux-mkv-videos-into-mp4-videos/
tulensrma wrote:Hi! Thanks to the good instructions, got AVS running on Ubuntu 10.04. The server starts up and I can connect to it with the iPhone client and browse the files. But when attempting to play something with live conversion, it won't play and the server side gives the following error:



Also, trying to convert files causes this error:



Any ideas on how to fix this?


Compile the provided ffmpeg source and link to the binaries in the confguration. The provided ffmpeg source has been patched...
Seems like the server works. Now try to connect and see if the server reports something back with the ip from sudo ifconfig (remember if you close the window you also exit your airvideo server instance).

If that doesn't work check iptables if you have anything blocking port 45631 with iptables --list .

(you will have to be on the same network as the server so if you are hosting it from home then use the wireless network at home)
Start from scratch and get it work by running it manually -=before=- you create boot scripts.

first delete the folder you have now, second remove airvideo packages by sudo aptitude purge airvideo-server

Then follow mbirths guide and start the server. Your output on the screen should be something like

DEBUG: SnapshotCache: Initializing Thumbnail Cache; Java Version: 1.6.0_18
DEBUG: SnapshotCache: Loaded existing Snapshot Index BTree with with 74 items.2011-07-28 11:39:59.171::INFO: Logging to STDERR via org.mortbay.log.StdErrLog
2011-07-28 11:39:59.194::INFO: jetty-6.1.x
2011-07-28 11:39:59.226::INFO: Started SocketConnector@0.0.0.0:45631
DEBUG: PortMapperAction: Scheduling task PortMapperAction$2 (1187526605)
DEBUG: StatusReportAction: Scheduling task StatusReportAction$2 (1313946977)

which means it works and the server is up and running, and can be verified with the previous commands whch gives something like

java 25182 1000 18u IPv6 6526447 0t0 TCP *:45631 (LISTEN)
<user> 25182 0.1 0.8 1385552 33132 ? Sl 11:45 0:00 /usr/bin/java -Djava.awt.headless=true -jar /AirVideoServerLinux.jar /test.properties

Then try to connect with your iphone while being on the same network (delete old server references on the iphone and add them again with the local ip that can be found by sudo ifconfig -a on the server)

Then everything should magically work, and if not the errors will be reported given that your phone can connect at all, meaning that if you have blocked the port in a firewall on the server then you better open it.

duc wrote:Thank you for your continue replies. I managed to stop the airvideo server by rebooting the box. When I use the lsof -Pnl +M.... command I get nothing return. So that means the server is not running? After that, I manually start the server using your suggestion 'java -Djava.awt.headless.....'. It message returned looks good as it didn't state that the port is being use.

I am in the process of updating to alpha6. I noticed when I ran '.make', I see a lot of warning messages. Is this normal? I will post back when I get the ffmpeg file installed.

Also, I am fairly new to the linux and its command. How do I debug the connection and view it's log file if it doesn't work? Thanks again.

chri wrote:His repo is apparently using the alpha 5, not the latest 6 (i am not sure how much it matters) which gives you the problem of the server being outdated. Download alpha 6 and follow mbirths guide, and use mine as inspiration if needed. It is not as difficult as it seems.

The information posted suggests that the server is running, and to debug it further you have to stop airvideo by killing it and launching it manually to access the log of your connection attempts.


Yapp seems like it works as expected, but try to connect with your phone and you should see some text appear in the terminal were you ran the command to manually start airvideo. The text will give some hints on what's wrong.

Remember when you create ffmpeg that you already have a version from the repo and you therefore only need to build the binaries of the patched one from airvideo with the commands ./configure and make (skip make install). Then just link to the libraries from your config file, and yes warnings are common. If there are serious errors the compiling (configure and make) will break with an error message before it is finished.
His repo is apparently using the alpha 5, not the latest 6 (i am not sure how much it matters) which gives you the problem of the server being outdated. Download alpha 6 and follow mbirths guide, and use mine as inspiration if needed. It is not as difficult as it seems.

The information posted suggests that the server is running, and to debug it further you have to stop airvideo by killing it and launching it manually to access the log of your connection attempts.
Try stopping it manually, use the latest beta6 jar with the latest ffmepg provided (just use ./configure and make to create the binaries), and then start it manually

sudo stop airvideo

sof -Pnl +M | grep 45631
AND
ps aux | grep airvideo

should yield no results, if not then kill the processes with kill -9 <pid>

then try start the sucker by hand to see what happens

java -Djava.awt.headless=true -jar /path/to/jar/AirVideoServerLinux.jar /path/to/config/test.properties

You should then see that it is running on the right port, and everything should be working. If not post the error. The server should be working locally.

(heres what I'am using but as it is debian and i should have created it when i first installed airvideo its probably some errors in it, but maybe it gives you some ideas.http://www.inmethod.com/forum/posts/reply/120/1856.page )

nachorevolution wrote:
chri wrote:looks like it works. The server can be found through the ios app by adding the ip adress (found by sudo ipconfig -a ) and making sure that the port is 45631. A dialogue for the password will then come where you enter the password as written in test.properties and you are ready to go.

If you can't find the server then there might be a firewall at the isp blocking your access to the port, your router needs to forward the port (portforward.com) or you have to check the rules applied to iptables

(uh what is the file airvideo-server? some kind of script to run the server?)


I was embarrassed to ask how to check for my ip address. I have no problem finding it in Windows or on OS X, but I was having some trouble with Ubuntu (still learning). I have and iMac and MacBook Pro running the supported airvideo server client and they both work over the same Router/ISP configuration. I have the cable modem going straight to my wireless router, then use a network cable for the iMac (now the Ubuntu box is in this place) and my MacBook Pro would share while on and connected to the wireless network.

I know my router pretty well so I'll go in and make sure the port forwarding is setup correctly in case the Ubuntu version works differently.

Also, one of the things I loved about airvideo is that I could view movies from my iPhone while outside my network as well. The ip address I will get from ipconfig -a will be my internal address no? Is there a way to find out what ip I would need to access the server from outside the network, or is this not supported with the Linux version?


No worries but i mixed up with win, it should be sudo ifconfig -a (The point with sudo is to perform the command with root acces, an alternative way is to use sudo su to become root permanently but this is dangerous as it enables you to do stupid things). The ipadress will be the one you received from your dhcp server. If portforwarding is needed then the modem is not in bridge mode and will route your internet connection giving you a local ip. To find the outside ip the easiest way is to access myip.dk with a browser f.ex. (lynx myip.dk where lynx is a text based internet browser)


(a tip for the future is to google stuff in the way "ubuntu find ip adress" f.ex. and when you get more comfortable with linux and just need to understand the possibilities with the command type man <command> which will explain the levers. (Ex with ifconfig -a the -a means all information. You will often see -v which means verbose aka spit out more information about the process the command performs)
looks like it works. The server can be found through the ios app by adding the ip adress (found by sudo ipconfig -a ) and making sure that the port is 45631. A dialogue for the password will then come where you enter the password as written in test.properties and you are ready to go.

If you can't find the server then there might be a firewall at the isp blocking your access to the port, your router needs to forward the port (portforward.com) or you have to check the rules applied to iptables

(uh what is the file airvideo-server? some kind of script to run the server?)
It says it pretty straight forward
"java.net.BindException: Address already in use"

so it might be that the port is in use (maybe you autostarted the program by adding it to the boot sequence?)

If you followed mbirths guide try retarting airvideo

sudo stop airvideo
sudo start airvideo

if that doesnt work try to find if the program is actually running in the background by

lsof -Pnl +M | grep 45631

or by using

ps aux | grep airvideo


(be aware that this filters the running processes by using grep which demands that the process is named airvideo. If you thin this is not the case then try "| grep video" for example or drop the filtering altogether. By using lsof you can look up whats using the port which will appear as java as airvideo is using java.)

--

Or take the easy way and reboot the computer and see what happens as it is difficult to predict what you have done ...
try sudo gedit <file> from terminal . If you want to allow the user to change it try sudo chown <user>:<user> <file>
Official linux thread

(dependencies debian is missing can be loaned from ubuntu as it is painful to compile them and ubuntu is similar to debian)

--
mkdir /home/airvideo
cd /home/airvideo
wget http://inmethod.com/air-video/download/linux/alpha6/AirVideoServerLinux.jar
wget http://inmethod.com/air-video/download/ffmpeg-for-2.4.5-beta6.tar.bz2
tar xvjf ffmpeg-for-2.4.5-beta6.tar.bz2
cd ffmpeg
./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame
(as ffmpeg now supports all aac stuff internally and therefore don't need libfaad )
make
cd /home/airvideo
nano test.properties
paste wrote:
path.ffmpeg = /home/airvideo/ffmpeg/ffmpeg
path.mp4creator = /usr/bin/mp4creator
path.faac = /usr/bin/faac
password = specify
subtitles.encoding = windows-1250
subtitles.font = Verdana
folders = Movies:path to movies

ctrl+o, ctrl+x
chmod +x AirVideoServerLinux.jar
nano /etc/init.d/airvideo
(Added new syntax (-Djava.awt.headless=true ) as the server bugged out with errors regarding the parsing of the video files)

paste wrote:

#! /bin/sh

#Original /etc/init.d/skeleton modified for http://mydebian.blogdns.org

# PATH should only include /usr/* if it runs after the mountnfs.sh script
PATH=/sbin:/usr/sbin:/bin:/usr/bin
DESC="Description"
NAME="airvideoserver"
DAEMON=/usr/bin/java
DAEMON_ARGS="-jar -Djava.awt.headless=true /home/airvideo/AirVideoServerLinux.jar /home/airvideo/test.properties"
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/airvideo
#the user that will run the script
USER=<USERNAME FOR RUNNING THE SCRIPT>

# NO NEED TO MODIFY THE LINES BELOW

# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh

# Define LSB log_* functions.
# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
. /lib/lsb/init-functions

#
# Function that starts the daemon/service
#
do_start()
{

start-stop-daemon -b --start --quiet --chuid $USER -m -p $PIDFILE --exec $DAEMON -- $DAEMON_ARGS \
|| return 2
}

#
# Function that stops the daemon/service
#
do_stop()
{
start-stop-daemon --stop --quiet --oknodo --pidfile $PIDFILE
RETVAL="$?"
rm -f $PIDFILE
return "$RETVAL"
}

case "$1" in
start)
[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
do_start
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
stop)
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
do_stop
case "$?" in
0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
esac
;;
restart)
#
# If the "reload" option is implemented then remove the
# 'force-reload' alias
#
log_daemon_msg "Restarting $DESC" "$NAME"
do_stop
case "$?" in
0|1)
do_start
case "$?" in
0) log_end_msg 0 ;;
1) log_end_msg 1 ;; # Old process is still running
*) log_end_msg 1 ;; # Failed to start
esac
;;
*)
# Failed to stop
log_end_msg 1
;;
esac
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|restart}" >&2
exit 3
;;
esac

:


ctrl+o,ctrl+x
chmod +x /etc/init.d/airvideo
./etc/init.d/airvideo start


--

Hack for changing ports:

If you take the AirVideoServerLinux.jar and unzip it, it contains the java source code.
Using a hex editor, open the file Cli.class in the subdirectory /com/inmethod/air/video/ I tried using VI but it gave me errors, so I just used a hex editor.
Scroll down to address 7EE. There is the port, listed as 45631. I changed it to the port I needed. (33517)
I then rezipped the entire folder structure into a new zip file AirVideoServerLinux33517.jar and ran with the normal

(Thx Peter)
See my post in the end of the official linux thread
Ended up with configuring the new ffmpeg package with

./configure --enable-pthreads --disable-shared --enable-static --enable-gpl --enable-libx264 --enable-libmp3lame

as ffmpeg now supports all aac stuff internally and therefore don't need libfaad

url to the source for the new mpeg for the lazy ones are

http://inmethod.com/air-video/download/ffmpeg-for-2.4.5.tar.bz2

(extracted with tar xvjf <file>

The server update seems like a huge improvement. Thanks again!

 
Forum Index » Profile for chri » Messages posted by chri
Go to:   
Powered by JForum 2.1.8 © JForum Team