Jump to content
zach

MIDI control

Recommended Posts

Hi All,

 

I'm new to the forum and to CCTV, so please bear with me. I am wondering if any CCTV cameras accept MIDI input. I am also interested in track systems that would allow for remotely controlled movement like a dolly system in film. Any information on these would be greatly appreciated.

 

Many thanks,

Zach

Share this post


Link to post
Share on other sites

The MIDI, and the Dolly is def out of my range of expertise.

 

I would imagine that if you are a tinkerer that you can develop something with a pic microcomputer, or something that would handle the translation.

 

I am not quite sure what it was that you wanted to control via MIDI interface?

 

If I needed to dolly a camera the I would just use a wheelchair! LOL!

 

Guerrilla Director Rodriques strikes again!

 

http://www.amazon.com/Rebel-without-Crew-23-Year-Old-Filmmaker/product-reviews/0452271878

Share this post


Link to post
Share on other sites

I've worked a lot with MIDI in the studio... I can state with 99.999999% certainty that you won't find any cameras accepting MIDI control. Aside from the fact that the two come from widely different industries, you'd have a hard time convincing any camera manufacturers to support it when MIDI cables have a range of (if memory serves) 50' maximum.

 

Besides the camera supporting it, you'd need the control units (joystick controllers, DVRs, etc.) to support it as well. With so many established standards designed specifically for camera control, adding another, more complex, more limited one would be a hard sell for any designer.

 

As for dolly systems... no idea there. I know computer-controlled broadcast cameras are the norm in newsrooms these days, perhaps something based on those designs could be adapted to CCTV. It wouldn't be cheap though - even simple fixed-mount PTZs are significantly pricier than standard fixed cameras.

Share this post


Link to post
Share on other sites

Thanks, Soundy. The reason I asked about MIDI was because I was hoping I could write my own software to control the cameras and that is an easy protocol to work with (also the basis for MAX/MSP, the language I do most of my AV work in). If it does not make sense to talk to the cameras directly, perhaps I can control the CCTV software through tcp/ip.

 

Since I'm a total noob to CCTV, I should probably do some research before asking more questions. Can you point me to a document that describes the protocols used in CCTV networks as well as software options and camera compatibility? Since you mentioned it, I should also read up on computer-controlled broadcast cameras, although they are probably outside of my price range. If you can point me to any references on these that would be great as well.

 

Thanks again,

Zach

Share this post


Link to post
Share on other sites

An excellent idea! You could program the MIDI to pan the camera up to your chimney when you play Jingle Bells

Share this post


Link to post
Share on other sites
Thanks, Soundy. The reason I asked about MIDI was because I was hoping I could write my own software to control the cameras and that is an easy protocol to work with (also the basis for MAX/MSP, the language I do most of my AV work in). If it does not make sense to talk to the cameras directly, perhaps I can control the CCTV software through tcp/ip.

 

Since I'm a total noob to CCTV, I should probably do some research before asking more questions. Can you point me to a document that describes the protocols used in CCTV networks as well as software options and camera compatibility? Since you mentioned it, I should also read up on computer-controlled broadcast cameras, although they are probably outside of my price range. If you can point me to any references on these that would be great as well.

 

Thanks again,

Zach

 

The most common protocols for PTZ cameras are Pelco D and Pelco P - a lot of cameras use their own specific control languages, but almost all support one or both of these as well, as do most DVRs. It's a relatively simple serial protocol, generally transmitted over RS-232, RS-422, or RS-485 (the transport protocol, BTW, is irrelevant to the control protocol, so you don't have to worry about that).

 

A quick Google search led me to this page: http://www.control.com/thread/1026204047

 

There you'll find a number of sources listed for the Pelco D/P specs.

 

As for doing research "first"... isn't asking here considered part of your research? Hopefully the above will give you a starting point, and you're always welcome to come back and ask more questions

Share this post


Link to post
Share on other sites

Survtech, that may sound funny, but I would be thrilled to be able to do even that.

 

I looked into Pelco a bit. Looks like I'd have to write a wrapper in C in order to control it in Max or anything high-level like that. As I'm not that great a coder, I think my best bet is to find some readymade control software that I can in turn control with Max. Do you know of any cheap or free Pelco control software for Mac that accepts serial or tcp/ip input? It seems this would be available for situations in which the CCTV setup was hooked to a computer locally, but needed to be controlled remotely over a network. The Mac thing, I'm not sure about though...

Share this post


Link to post
Share on other sites

It's not really that complicated. All you need to do is send a series of command codes to a serial port - none of it is specific to any platform, OS, or coding language. Any comm libraries for use with modems and other serial comms should do the trick.

 

If you're on a Mac, you'll need something like this: http://www.usbgear.com/USBG-232MINI.html - beyond that, just connect pins 3 and 5 to the camera's RX connectors (you only need to transmit to the camera, there's no need to receive from it), and code your software to transmit code strings over the port. There are some good examples here: http://www.232analyzer.com/RS232_Examples/CCTV/Pelco_D_Pelco_P_Examples_Tutorial.HTM#1 and http://www.codeproject.com/KB/cs/PelcoPDinC.aspx

 

Note in the second link that they're doing it via C# classes, but C# isn't necessary to this - again, it's just simple code strings sent to the serial port, so any suitable classes in your dev platform of choice will suffice.

Share this post


Link to post
Share on other sites

Wow, Pelco actually seems pretty easy now.

 

As far as recording, I'm assuming I would need a capture card and considering I have a laptop that would be quite expensive (although I may get a desktop soon). I also think this could slow down my computer. Would it be best to just get a dvr and send that Pelco messages as well?

 

Finally, back to my track discussion. Can you link me to some ptz broadcast cameras that run on tracks? I wouldn't know what to search for and just want to compare prices.

Share this post


Link to post
Share on other sites
As far as recording, I'm assuming I would need a capture card and considering I have a laptop that would be quite expensive (although I may get a desktop soon).

Why not just use a USB capture device. There are literally hundreds of them.

Share this post


Link to post
Share on other sites

Well that's what I'm asking. What format does CCTV video use? Would I be able to record high quality video through Firewire or USB without significantly slowing down my computer? From my experience, the answer has been no and I've found it's best to have any necessary conversion done in hardware.

Share this post


Link to post
Share on other sites

CCTV video comes in two flavors:

* Analog or composite video is the same as standard definition video like TV. This would be NTSC or PAL, depending on your location.

 

* IP is pure digital.

 

You need a frame grabber or capture device to record analog video on a computer. IP video can be recorded directly; usually via the ethernet port on the computer or some cameras can connect directly to a USB port.

 

Recording any video will take up some of your computer's resources. Since analog video must be encoded to digital to record on a computer, the recording will take more resources if done by the computer (in software) than IP digital. In either case, you will be taking up hard disk resources.

 

edit: By the way, remote control broadcast-quality cameras would be darned expensive. You would be better off with a good CCTV camera mounted on a remote control toy. Use your imagination and a toy catalog.

 

Otherwise, check out this link: Camera Robotics.

Share this post


Link to post
Share on other sites

Ah, I looked on wikipedia and apparently all digital CCTV cameras contain hardware that encodes the video so that it can be transmitted over an IP network. Because the technology is immature, there is no standard codec used. Rather, current models use anything from MJPEG to H.264.

 

In Max applications I have experienced a loss in framerate while recording quicktime movies and doing pretty much anything else. On the other hand, I see no downside to using a dvr, which I can tell to start and stop recording with Pelco, and exporting the video to my computer later. This probably takes up a little more resources than running dedicated control and recording software written in C, but can anyone speak to even that?

Share this post


Link to post
Share on other sites
Wow, Pelco actually seems pretty easy now.

 

As far as recording, I'm assuming I would need a capture card and considering I have a laptop that would be quite expensive (although I may get a desktop soon).

 

Not really. I use an Adaptec Gamebridge TV, a USB video-capture adapter with built-in TV tuner. Paid about $30 for it. They have (or had, at the time) a non-TV variant that I think was about $20.

 

I also think this could slow down my computer.

 

The downside to this particular Adaptec unit is that all the video processing is done in software, so it is a fair bit more taxing on the computer. There are hardware-encoding units available for <$100 though, that do all their own video processing and would present relatively little load on the machine. With Mac though, your selection may be a little more limited.

 

Would it be best to just get a dvr and send that Pelco messages as well?

 

Depends. If it's just something to tinker with, I wouldn't bother with a separate DVR. If you want something to permanently record video for security purposes, then you probably do want a dedicated system, be it a standalone DVR or a separate PC-based DVR.

 

You don't send control signals to a DVR, though... all it does is receive, digitize, and record the video. Some do have PTZ control capabilities, which means the DVR would then control the camera and you wouldn't have to code anything... but where's the fun in that?

 

All the Pelco commands do, is tell the camera how to behave: tilt up, pan left, zoom in, etc. Nothing relevant is sent back to the computer (there would probably be some serial checksum data and such for command confirmation, which may be useful to you when writing the software, so you know the camera is receiving and responding to your commands, but other than that, there camera doesn't send back any data over serial lines).

Share this post


Link to post
Share on other sites
Ah, I looked on wikipedia and apparently all digital CCTV cameras contain hardware that encodes the video so that it can be transmitted over an IP network. Because the technology is immature, there is no standard codec used. Rather, current models use anything from MJPEG to H.264.

 

First of all, take what you read on Wikipedia with a grain of salt

 

The definition of a "digital" camera is pretty nebulous, depending on each manufacturer's literature. Most modern cameras with analog video output claim to be "digital", mainly due to internal digital processing... doesn't mean they can transmit over a network. The term you're really looking for there is usually "network camera" or "IP camera". They tend to be significantly more expensive because of the hardware encoding and network interface additions.

 

Most IP cameras also tend to be "megapixel" cameras... briefly, standard analog video is very limited in its resolution (740x480, or about 0.355 megapixels, for NTSC), and regardless of how high the resolution of the camera itself is, it still has to be scaled down for analog transmission. Adding IP support to a standard-resolution camera is rare, because it adds cost without significant benefit. If you want to go beyond those resolutions, you need a different method to move the video... HDTV uses component and/or HDMI, for example (and even that is limited to under 2MP). Megapixel CCTV cameras generally start at 1.3MP and currently go to about 5MP in "common" designs. Naturally, the higher resolution makes them worth the added cost of adding the network support.

 

Hope all that makes sense... to summarize, with standard PTZ cameras, you won't have built-in encoders or network interfaces, they'll still just be outputting basic analog video (the same as comes out the back of your DVD player and into your TV via the yellow A/V jacks, for example) and you'll still need a capture device to encode it on your computer.

 

In Max applications I have experienced a loss in framerate while recording quicktime movies and doing pretty much anything else.

 

Your recording is probably using software encoding. A card/adapter with hardware encoding will help that a lot.

 

On the other hand, I see no downside to using a dvr, which I can tell to start and stop recording with Pelco, and exporting the video to my computer later. This probably takes up a little more resources than running dedicated control and recording software written in C, but can anyone speak to even that?

 

With a dedicated DVR, you're not usually going to tell it to stop and start recording, because there's simply no need to - just leave it running all the time, and if space is an issue, set it to only record when it detects motion. Almost all of them have this capability built-in. And actually, I don't think I've ever seen one that ACCEPTS Pelco control... I don't think D/P protocols even have "stop/start" recording commands...??

Share this post


Link to post
Share on other sites
Most IP cameras also tend to be "megapixel" cameras...

Actually Soundy, there are a lot of 4CIF or D1(standard res) IP fixed and PTZ cameras made by Axis, Sony, Toshiba, Lorex, IQInVision, Trendnet and many others. Of course, there are also many megapixel IP cameras too.

 

I don't think D/P protocols even have "stop/start" recording commands...??

No they don't. For that you would need Pelco "M" protocol, which is what they use for keyboard-to-device communication. That's more proprietary and difficult to obtain; and of course, only works on Pelco units.

Share this post


Link to post
Share on other sites
Most IP cameras also tend to be "megapixel" cameras...

Actually Soundy, there are a lot of 4CIF or D1(standard res) IP fixed and PTZ cameras made by Axis, Sony, Toshiba, Lorex, IQInVision, Trendnet and many others. Of course, there are also many megapixel IP cameras too.

 

That's why I said, "TEND to be".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×