User Tools

Site Tools


video_pitcher

Video Pitcher

NOTE: Video Pitcher is now deprecated in favor of the new Video control and recording system. It continues to be supported for as long as the app will continue to run on newer OSX versions.

Video Pitcher is an IP Camera monitoring application with special features for easily connecting to XTension and providing the ability to record snippets of video in response to motion or other commands. It automatically creates video streams within XTension which can be used in views and also automatically appears on the list of available video streams to be viewed though the X2Web interface.

The streams and the recorded archive movies are available in XTension Views and also in the Web Remote and Mobile client web remote systems.

Version 088 fixes the sign on problem introduced with the most recent Amcrest camera firmware update. The JPEG refresh cam now supports Digest authentication and so will work with Amcrest’s latest firmware and with any other device that requires that form of authentication. Unfortunately it also removes support for RTSP streams as they are no longer a part of Apple’s video support library. They will make a re-appearence in the near future in a new form.

Version 086 is a fix for problems storing the preferences when running High Sierra, OSX 10.13 and later.

Version 080 adds reception of motion sensing and sound sensing from recent Foscam cameras.

Version 079 adds powerful filtering and enhancing features using Apple’s Core Image processing to offload much of the CPU usage of the processing to the GPU.

Video Thumbnails Video Archive Live Video Control

Whats New

  • Fix for a problem signing into Amcrest cameras with the latest firmware update. They disabled “basic” authentication and now require “Digest” authentication. This version supports Digest authentication to Amcrest cameras or any other device that requires it via the JPEG Refresh camera type.
  • Removed support for the RTSP stream type. Apple removed support for RTSP in their media handling libraries a long time ago but I’ve been linking in an old version to keep supporting it. Unfortunately I cannot link in both the older quick time libraries and the newer libraries that support the Digest authentication required by the newer amcrest cameras. I can re-do an RTSP stream in a future version if this is something people still need.
  • Download Build 86 (11/16/2017) (this version requires at least version 935 of XTension)
  • Important fixes for use with OSX 10.13 High Sierra.
  • More picture size validation before decoding. Passing corrupt jpeg images to core image for decoding and processing can cause core image to hang up for extended periods of time where no other decoding can take place. This better validates that the image is probably not corrupt but doesn’t waste the CPU necessary to decode it twice to validate.
  • Download Build 82 (6/3/2016) (this version requires at least version 935 of XTension)
  • The Foscam Motion reception is now compatible with both the newer h264 HD Foscam Cameras and the older MJPEG Foscam cameras. The proper camera API to use will be chosen automatically when connecting to the camera. It occurs to me just now that I have not updated the text in the foscam motion window however, it still claims that a newer cgi version is needed. That is not correct and I’ll update that text in the next build.
  • Added a new “Camera API” popup to the edit cameras interface. It currently has 3 selections “MJPEG Foscam”, “h264 HD Foscam” and “X10 Airsight” others may be added as requested if the cameras in question have a documented CGI API. This selection is used for communicating with the camera and pan/tilt/zoon support.
  • All the picture manipulation parameters added in build 80 can now be accessed via AppleScript from XTension. This way you can fine tune the video processing to get the best picture in whatever light or camera mode depending on the time of day or ambient light conditions. The fact that they are in the XTension dictionary and not in the Video Pitcher dictionary means that no “tell application” block is necessary allowing you to not have to block out any calls to the verbs in XTension while you were doing maintenance on video pitcher (to keep AppleScript from relaunching it constantly on you) and if your Video Pitcher installation is remote from the XTension machine you don’t have to try to pass networked apple events through the internet.
  • Using the camera api type the XTension dictionary also now supports making some changes to the cameras setup themselves. In addition to the Video Pitcher processed video settings you can set brightness and contrast on the cameras themselves through your scripts. This reduces overhead on the Video Pitcher CPU as it’s one less thing that has to be processed by core image.
  • Using the camera API you can now also set the cameras Pan/Tilt/Zoom speed via the XTension scripting dictionary. Perhaps you sometimes want to pan slowly across the lawn, but if someone rings the doorbell you want to zip to that new position quickly
  • Using the camera API you can now move to specific preset locations in all supported camera types from an XTension script.
  • Download Build 81 (5/27/2016) (this version requires at least version 932 of XTension)
    • Fixed a problem where a JPEG refresh camera may not recover the stream if more than one frame request timed out in a row. Even unplugging and re-plugging a camera some hours later will now result in the stream recovering and starting again without your having to disable and re-enable the camera.
    • Timing calculation for requesting the next frame is now again taking into account the time it took to actually get the frame so slightly better frame rates closer to the FPS setting are possible again. Most cameras, even modern ones, still take 300 to 500ms to send a single frame in this manner, so it’s not usually possible to do better than 3fps with a JPEG refresh camera. If you need more FPS then see if you can connect to the camera via MJPEG or RTSP stream. This takes a huge amount more CPU and file space for stored movie clips though. Best usage is to keep the frames in XTension at a reasonable size and a few FPS at most and if you wish to view the cam in full HD and 30fps use a dedicated camera viewing app or connect to the cameras built in web services from a browser.
    • The Foscam motion sensing will properly use the userid/password set in the cameras configuration window. It previously assumed that you had guest access turned on for that data and so would fail to read it if a password was required. When using a foscam camera via the jpeg refresh camera type you must embed the usr and password into the URL, but for the motion sensing to work you should also put them into the user id and password fields of the camera configuration window.
    • The Foscam motion sensing window now displays better error messages instead of just telling you that there was no data returned. If the user/pass was not accepted it will suggest “check pass” and other potential errors like being unable to reach the camera because of network or cable connections should be readable and make sense for easier debugging.
  • Download Build 80 (5/21/2016) (this version requires at least version 932 of XTension)
    • NEW: Creates a unit in XTension for the motion and sound sensing capability of recent Foscam cameras. Open the Foscam Motion window in the Motion menu. All potentially Foscam cameras will be listed. Since there are several ways that you might get video from a Foscam camera all RTSP, MJPEG and JPEG Refresh types will be shown. If you try to turn on foscam scanning for a non-foscam camera you’ll get an error in the status column of the window. After turning on a Foscam camera you should see “OK” in the status window and MOTION or SOUND alerts will begin to display in the appropriate column of the display. As soon as the first hit for either is received a unit will be created in XTension to correspond to it. This should work with all Foscam cameras running a firmware that support at least version 1.0.4 of the Foscam CGI API.
    • If you open a window in the web interface or in XTension that is displaying a video feed VP will no longer wait to send an image until the next frame is displayed. If a current frame is available it will be sent immediately making video begin to show up in those remote displays faster.
    • FIX: a corrupted jpeg frame in an MJPEG stream will no longer cause an error when using the preroll feature.
    • FIX: The “scale” setting was not being set in the monitor windows image manipulation controls properly when opening the window. It would have always been left unchecked and without the slider value being set even if you had previously set a scale factor. The enabled status and scale factor are now set properly when editing the image controls.
    • NOTE: the units created automatically in XTension currently have their name field locked so that you can’t rename them. This will be re-enabled in the next release build of XTension.
  • Download Build 79 (5/4/2016) (this version requires at least version 932 of XTension)
    • NEW: Core Image filters to enhance each frame of video before display. (De-noise, Brightness/contrast/saturation, gaussian blur, Shadows/highlights and Exposure)
    • NEW: Preroll feature to let you save some number of frames from before the request to record.
    • NEW: The units created automatically in XTension corresponding to the enabling of the video queues will now remain behind and therefore you can add scripts to them or add them to views or lists or the web remote making for more reliable control of the streams.
    • NEW: Units in XTension will be automatically created that you can turn on and off to begin or end recording from any stream. These units will also remain in XTension and so you can add scripts or add them to user interfaces, views or the web remote as well for manual recording.
    • NEW: While the scripting dictionary still contains the “record from” verb to record for some length of time from a stream, that verb has also been added to XTension. This simplifies scripting as you no longer have to use a tell block.
    • Moved the title bar that can be added to the frames to the top of the frame rather than the bottom. This works better on the web remote display of the archived movie as the HTML5 frame controls are at the bottom and previously would have obscured the display. It doesn’t work as well when viewing the movie in quicktime player on the Mac because it brings in a title bar at the top of the display which obscures it, can’t win with this but the web interface is probably the most common way to view them.
    • NEW: the data passed in the “info” parameter of the “record from” verb is now also written into the center of the title bar of each frame for 10 seconds after the event. So if you script a record from “my stream” for 5 * minutes into “garage motion” the time of the event and the term “garage motion” will display in the title bar of the frames being streamed to remote clients and saved to the movie so you can know exactly what triggered the recording you’re looking at.
    • NEW: when a stream is recording a “REC” indicator is displayed in any monitor windows that are open for that stream.
    • NEW: the continuous recording that can be turned on via the new units in XTension is remembered through restarts of the program. Any stream that was recording when the app quit will begin recording again as soon as the stream is back online.
    • NEW: “scale” filter to reduce the size of HD streams before passing them off to the displays in XTension and web remote, though you may want the camera to record it’s own snippets at full HD you rarely want to watch such a stream in a thumbnail view in XTension. Additionally writing that much data to disk as recording snippets takes a huge amount of CPU and disk space.
    • New shared memory distribution of images means no re-compression to JPEG before display in XTension and only 1 generation to JPEG to display in a web client view resulting in far better quality of displayed video that is faster and doesn’t hold up the control communications channel between the apps streaming video. The response of video in XTension and the web remotes is greatly improved.
    • Fixes the RTSP stream that was broken for many types of streams in the last version. If you had trouble with the RTSP stream previously please try again with this version.
    • The defaults for recording quality and frame rate are now available for customization in the preferences window.
  • build 63:
    • added support for any generic RTSP camera. Anything that you can load through quicktime should now work with Video Pitcher.
    • added the “info” parameter for the record from verb. This lets you send a date and time and a reason that the recording is happening. For example you might send the time string and the name of the motion sensor that triggered it. This will be displayed next to the video archive in the web remote. I use this like this:
set theTime to time string of (current date)
ignoring application responses
  tell app “Video Pitcher” to record from “backyard cam” for 30 info theTime & “ Backyard Motion”
end ignoring
  • when launched Video Pitcher creates temporary units in XTension with the names of the streams. You can now control them to turn the streams on and off in Video Pitcher. This is useful if you have lots of wifi cameras and need to protect your bandwidth, but it can take several seconds for a stream to become active so you may miss the event that you wish to record if you turn the camera on and off in your motion scripting. But there may be times you wish to disable cameras completely. (note: the IP9100 video servers will not let you turn off all 4 of the streams, if you try this they will turn the first one back on by themselves.)
  • build 48:
    • fixed a failure to reconnect for mjpeg streams. mjpeg streams will now resume after a power hit or other intermittent drop in communications to the camera.
  • build 44:
    • Fixed an occasional hang when creating a new movie capture.
    • Fixed a memory leak associated with flattening a captured movie to disk.
  • build 40: I've revamped the setup for saving movies in response to actions in XTension. Instead of manually managing output movies and opening and closing them a single verb you can run in the ON script of a motion or other sensor will record a snippet.
ignoring application responses
  tell app "Video Pitcher" to record from "stream name" for 60
end ignoring

would cause a minute of video to be recorded from “stream name” to a new snippet quicktime movie. As of this writing it will be h.264 encoded quick time file, date stamped in the directory. The Ignoring Responses block is not vital, but will keep XTension from hanging up if there is a problem with the beta or if things just get bogged down. At the end of the timeout the snippet will be finalized, flattened and prepared for serving up to the web automatically. If the record from verb is issued again for the same stream while it's already recording, the timeout is just advanced forward and it will keep recording to that snippet until the timer is allowed to run out. The program can record from multiple streams at the same time. Recording for a long period of time may result in long finalization and flattening times on slower machines, but no frames should be lost on other recordings that might be going on.

The new Video Pitcher module for X2Web provides a front end as shown above to the saved snippets so that you can scroll through them after they are finalized.

Requirements

Video pitcher can be used by itself to view and record from IP cameras but is better suited to being a video injector for Xtension and using the Web Remote as the internet viewer for the video streams and captured movies. Video Pitcher requires at least OSX 10.7 though video processing and compression can become very processor intensive. If a core image compatible GPU is present in the hardware it will be used to provide the filtering, if not it will fall back to the software renderer which will significantly limit the amount of filtering that can be done.

Supported Cameras

  • Anything that provides a jpeg refresh link that serves up a single picture
  • Should be anything that serves up a motion jpeg, or mjpeg stream. These are not really a standard though and some cams might not function, let me know if you find one that doesn't work.
  • The Hawking netcams
  • The IP9100 series of 4 input analog video IP servers
  • The Schlage wired IP cams that Radio Shack blew out at low cost a long time ago work too: Schlage Cam
  • Almost any camera using an RTSP stream with the exception of the Foscam C1 cameras that use a non-standard streaming format that isn’t supported by any quick time systems on OSX though can be viewed with VLC.
  • Foscam Cameras can be setup with these instructions.

It’s not possible for me to keep an up to date list of all the compatible cameras and their streaming links here for a free add on to XTension. If you search the internet for the models of camera that you wish to use you’ll be able to discover the direct streaming links or static jpeg links that will let you use almost any camera with this software.

Computer Requirements

Monitoring and recording a video stream requires a not insignificant amount of CPU power, especially for recording video. Though the program can run even on a 1ghz PPC machine running OSX 10.3 or later, a modern Intel chip and 10.5 is recommended. Video also takes up a lot of disk space, in the betas there is no provision for deleting old movie captures, you must monitor your disk usage manually during the beta phase.

Installation

Inside the current beta zip file you'll find the application and the replacement X2Web module that includes the video snippet archive pages.

  • Copy the program to anywhere convenient on your hard drive, it will run happily from inside the applications folder.
  • In the preferences window select a folder to store recorded movies in.
  • if you’re using the program with the newer WebRemote no further configuration is necessary, if you’re using it with the older X2Web interface then continue:
    • place the “videoviewer” folder inside the “modules” folder inside your instantx folder. This will replace the videoviewer folder that came with the X2Web that you're currently running. It will be included in the next official release of X2Web.
  • Lastly if you're running the program for the first time you'll need to setup any cameras by using the “new” menu item to create them.
  • If you created scripts to use the more complicated method of recording video available in earlier versions those verbs are still available in this version and will not be removed as they provide a lot of functionality for advanced users.

Download

Video Pitcher is in free for use with XTension.

Build 79 5/4/2016

Download Build 079

NOTE: this version of video pitcher requires at least XTension build 932

  • for release notes please see the Whats New section above.
Build 71 3/25/2016

Download Build 071

NOTE: this version of video pitcher requires at least XTension build 922

  • Video recordings in the automatic save folder will now be deleted starting with the oldest one from all cameras when the disk fills up. The minimum space before deletion begins can be set in the preferences window under the Movie Capture tab. The default is set to 100 meg and the minimum setting is 50 meg. Even if you’re storing your video on a separate drive from the system some space is necessary for the temporary movie files and workspace for flattening that occurs when saving a movie. Disk space scanning is done every 5 minutes or when you press the “reap files now” button on the preferences window. You cannot turn off automatic disk space deletion at the moment. All folders and files that are within the automatic recording folder will be considered for deletion.
  • Each camera now has an optional setting to delete recordings that are more than a certain number of days old. This is off by default but can be turned on in the setup dialog for any camera. You may wish to save some cameras for longer than others. The camera capture folders are scanned just after midnight each night. This is in addition to the disk space maintenance, both can work together to make sure that some cameras are limited to some time limit, while others are left available until the disk fills up.
  • Some good optimizations in internal frame handling. Less CPU is wasted decoding images when no view window is open, no video is being recorded or no other interface in XTension or web remote is watching a stream.
  • Known Bug: There is a problem in this version where the generic JPEG refresh stream won’t draw the timestamp until a view window is open in the application. This will get fixed for the next build.
Build 68 2/22/2016

Download Build 068

  • Build 68 requires, and is required by, XTension build versions 922 and newer.
  • New communications with XTension allows lower latency and better frame rates in XTension views and when embedded to the web interfaces.
  • Added some options for flipping the picture to some of the camera types. If you would like the same features added to other camera types please let me know.
Legacy Build 66
  • This version of Video Pitcher can be used with any XTension build prior to 921.

videopitcher.zip

/home/e805485/machomeautomation.com/data/pages/video_pitcher.txt · Last modified: 2023/02/13 14:52 by 127.0.0.1