3

I just installed motion but I can't get it to work. Im acessing my pi via local IP. SSH, VNC and apache works, but motion simply doesn't. I've already changed the ports at /etc/motion/motion.conf to lots of different numbers but none of them work. I've found this command: sudo motion -n When I run this, I get this message: "Problem enabling stream server in port 7043: Address already in use"

I get this for every port I try. Always when I configure a new port and run netstat -lnutp this port appears in the list and its marked as 'LISTEN'. I try to access but nothing happens. Does my camera need to work to motion at least appears when I try 192.168.1.x:7043? Can't I at least see the server running, even if the camera doesn't work? I'm using a microsoft USB camera, which appears to work with the rPi.

Here's the full list of errors:

[0] Motion thread 1 restart
[1] Thread 1 started
[1] cap.driver: "sonixj"
[1] cap.card: "USB camera"
[1] cap.bus_info: "usb-bcm2708_usb-1.3"
[1] cap.capabilities=0x85200001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: JPEG (JPEG)
[1] Selected palette JPEG
[1] Test palette JPEG (320x240)
[1] Error setting pixel format VIDIOC_S_FMT: Device or resource busy
[1] VIDIOC_TRY_FMT failed for format JPEG: Device or resource busy
[1] Unable to find a compatible palette format.
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] bind(): Address already in use
[1] Problem enabling stream server in port 7043: Address already in use
[1] Thread exiting

UPDATE:

Motion.conf file

http://pastebin.com/XF2aEJhD

Gergraf
  • 31
  • 1
  • 1
  • 3

3 Answers3

4

You are wasting your time trying to get Motion to work reliably on the PI. Others have tried and it will disconnect from your cam after an hour or 2. This happened to me as well. Requests to the author of Motion to fix the bugs resulted in nothing

Mike
  • 39
  • 1
4

Using motion V4.0 this helpful parameters are:

# change the following options in your motion.conf from on to off

stream_localhost off
stream_port 8081

webcontrol_localhost off
webcontrol_port 8080
Joe
  • 41
  • 2
0

This will not solve all your errors but will ensure that your options are set according to your expectation that the Motion server is not only reachable through http://localhost:8080

# change the following options in your motion.conf from on to off

webcam_localhost off
webcam_port 8081

control_localhost off
control_port 8080
SlySven
  • 3,631
  • 1
  • 20
  • 46
Thommy
  • 61
  • 3