PTZ camera replacement

I just replaced an 18-year-old Pelco analog PTZ camera with a brand spanking new digital PTZ (Hanwha XNP-6320RH). Besides new cabling, here were a few odd issues I encountered:

1. The old camera had an RS-485 connection with 4 wires. The new camera had only 2 wires. I put both negatives together as one and both positives together and cabled it that way. I had to go into the camera settings webpage and tell it to use the settings of the old 485 controller (in this case Pelco-P protocol at 2400 baud), then it worked fine. Some new security installers like to remove the 485 controller and use a mouse instead. I find that approach cumbersome, and my customers do too. They were happy to have their controller working.

2. The DVR is an older Pelco Digital Sentry Version 1. When I set up the camera, it could not see video. I checked the camera webpage and it was working. After a reboot, I recalled that this system requires that the camera date and time match the recorder date and time. I went back to the camera settings webpage and synced with the viewing PC time, then told it to sync to a local time server (the DVR itself). Then the video appeared on the recorder.

3. The PTZ draws more power than a standard digital camera. When I first hooked it to a POE switch, it kept clicking but not turning on. It came with a POE injector, so I hooked it to that and it was happy. So I just hooked the switch to the passthru port on the injector and was good to go.

The visual difference between the old and new cameras is extreme. The old one was fuzzy and felt like a 1970s TV signal. The new one is crisp and detailed, and has great infrared night vision. Happy customers!

Review of ToteVision LED-710-4KIP test monitor for IP cameras

I needed a portable field unit for setting up IP security cameras that I install. It needed to have POE, a good battery, and a good screen so I can see the video clearly and any camera menus.

I tried out the ToteVision LED-710-4KIP based on the feature set it has. It has several tools such as cable testing, POE voltage testing, and various camera tests.

It has some interesting features for setting up cameras, such as detecting camera IP and auto-setting itself to the subnet range of the camera.

But the primary purpose of using it to set up IP cameras in the field doesn’t work because the buttons it has for focus and zoom do not work with all cameras, even ones that have ONVIF (as almost all do these days).

I connected it to a Samsung SNV-6084 dome camera (about 2 years old), and it was able to find the camera’s IP address and take me to a login screen. It brought up the live video, which was out of focus. I tried the various physical buttons such as Near, Far, Tele, and Wide, but none of them had any effect on the camera.

I tried it on two Vicon cameras, and the live video screen would instantly close as soon as it tried to show video. That makes this unit useless to me.

I was able to go to a webpage in Firefox on the unit (I just happened to know the URL for focusing on this camera) and it brought up controls that I could use for focusing, but no image. That is another problem with this unit. If the IP camera requires a plugin such as Silverlight in order to view video on submenus, then there is no way to get the plugin to load and function on the ToteVision unit. The built-in menus have buttons specific to Hikvision cameras, so perhaps it was designed around their use rather than other brands, but nothing in the literature suggested this.

Those problems make this unit useless to me. I’ve used cameras from other companies that also require plugins to view video and make changes to the cameras, so this isn’t an uncommon situation. Camera makers are starting to move away from plugins, which is good. But I have so many cameras in the field already that I have to be able to use plugins. This puts me back to using a laptop and a POE switch instead of a more portable unit.

Summary:

  • Unit seems designed around Hikvision cameras
  • Control buttons don’t work on Samsung or Vicon cameras
  • It has interesting features that would make it great, but since the most basic don’t work with my cameras, the unit is pointless.
  • The manual was incomplete and was clearly written by non-native English speakers, A section showing a screen shot of “live video” shows an icon for needing to install a plugin, the very issue I had with Samsung cameras, but no mention of it in the text of the manual.

4.3GB file limit when shooting in HD modes (Panasonic HC-WXF1 camcorder)

I recently shot in regular HD mode (MP4, 1080p, 28M) and something odd happened that I didn’t see in the documentation for the camera. It auto-split the file when it reached 4.3GB, actually it did this twice during the show.

I used to use a Sony camera that did this at 2GB due to file size limits of the operating system of Windows, and they were trying to make it easier for most customers. I assume that this 4.3GB limit is for people that make DVDs (4.7GB size limit).

I had shot in this mode to save time downsampling from 4K later. Since the split happened partway through a song, I had to do some geekery to join the two files and then extract the song. That took hours of running scripts, so I didn’t save any time. Would have been nice to know about it ahead of time, so I’m posting here for others.

The geekery (which worked but may have been overkill) was to turn the video files into M2TS files, save the audio files as WAV, use Audacity to join the WAV files, use tsmuxer to join the M2TS files, use ffmpeg to turn the joined WAV into AAC, then use ffmpeg to blend the audio with the video and extract the songs clips that had been arbitrarily divided by the camera. Sheesh!

Q-SEE QCN8099B camera pinout

I had to work on an IP camera that had the pigtail cut off. It is a Q-SEE (Hikvision) QCN8099B camera, and had a pigtail with an RJ45 jack built-in. However, the wire colors that the company used inside the camera were not the standard colors normally encountered in CAT6 cabling. And there were only 6 wires instead of 8, and the wires were very thin which meant I couldn’t punch them to a jack directly because they were too fragile.

I figured out that there were two pairs being used for communication, and one pair being used for POE.

cam wires3

I cut apart the remains of the jack which still had wires attached to it.
IMG_0826

From this, I determined which colors went to which pins, and used a cross-reference to the T568B standard to figure out how to splice the wires to a CAT6 cable.


CAMERA T568B POE-B
1 BROWN ORN/WH
2 PURPLE ORN
3 ORANGE GRN/WH
4 YELLOW BLU DC+
5 (NONE) BLU/WH DC+
6 BLUE GRN
7 GRAY BRN/WH DC-
8 (NONE) BRN DC-

I taped the ends of the CAT6 cable and camera cable together to remove stress from the individual wires. I used 3M Scotchlok UY2 connectors to splice the wires of the CAT6 cable to the wires of the camera. (I didn’t get a picture of the splices)

Initially, I tried connecting the resulting cable to a POE switch to see if it would recognize the camera. But Q-See likes to keep things proprietary, so I drove back out to the location of the Q-See NVR and plugged the cable into the unit. After a minute or so the camera came up!

I found no pinout documentation online, nor any info about a default IP address for these cameras. It appears that they were made for use only with their own brand NVR. I’ve seen other blurbs that say “Just type in the IP address into a browser”, but that assumes I know if it has one, and what the address is.

Viewing angle of monitor affects color perception

On a flat screen computer monitor, color perception changes with the angle of view, even slight angles. Something pink can appear red or even blue from some angles.

I have a reclining office chair at my computer, and skin colors were appearing a bit green, which led me to think I needed to apply a color filter to the video I had shot. But when I reclined a bit to view straight-on, everything looked fine. (Some depends on the quality of the monitor also). This is why it’s also important to calibrate the monitor, if you are in the business of photos or video.

I had calibrated about six months ago with a Spyder5 device, and the free DisplayCAL software for Linux (took an hour or so to calibrate). The software also will automatically load the changes it makes at boot time, and I see this happen just after the wallpaper becomes visible after log-in.

Typically, the screen top should be just below eye level in the position where you normally work. My monitor is a bit cheap, so even that angle gives a slight green to skin color. I have to view directly on at the middle to see things in the correct color. I’ll upgrade when I build a new computer in the next year.

Pana$onic battery message

RANT: Bought a new Panasonic video camera which came with a small battery. I bought a couple of “compatible” batteries and a charger for $50 online which seemed to work fine for a day or so. Then the camera said “This battery cannot be used” and shut off. Both batteries didn’t suddenly develop issues. I did some looking online and Panasonic created some circuitry to tell them when a 3rd party battery is being used:
http://av.jpn.support.panasonic.com/support/global/cs/info/dsc_battery.html

This was allegedly to “protect” their customers. Somehow I don’t buy that.

It is certainly their right to build their cameras to only support their own batteries. I get that. Except they charge about 6 times the amount for one battery. I guess they assume if I’m willing to pay $1000 for a camera, I wouldn’t balk at $120 for a battery. But it is a LOT more customer friendly to make their cameras the focus, and let customers tell others how great the camera is instead of trying to squeeze extra dollars out of us for accessories.

I’ve had no trouble using 3rd party batteries on my older camera, so didn’t anticipate it on this one. Now I’ll have to find a reputable dealer and buy known Panasonic batteries.

Another thing, even the Panasonic shopping website says the large battery is out of stock. I can’t use the small battery to shoot a whole jazz gig. Sheesh!

Amazon is listed as a dealer, and their price for one Panasonic brand battery is $118. I’ll try that one.

NOTE: The brands that currently fail on the new HC-WXF1 video camera are Powerextra and Wasabi. Neither brand claims to work with the new camera, but they do say their batteries work like the VW-VBT380 which Panasonic says is the large battery for this camera. I had to return both of the 3rd party batteries.

NOTE: I learned from some comments on YouTube that I could use a “powerbank”, so purchased an Anker PowerCore II 20000. The camera power cord has a USB connection on the power end, so this attaches to the powerbank and works very nicely for powering the camera for several hours, and it thinks it is attached to wall power. Leave the onboard battery attached in case the powerbank loses power or gets turned off.

FFMPEG using x265 vs x264

I just recompiled ffmpeg (see previous post for that bit of hell) and included h.265 encoding. I’m going to be processing 4K video soon, so wanted to get the hang of this codec. It works with any video, of course, but up until today I hadn’t used it.

The command line is very similar to x264, but includes a new parameter “crf” (constant rate factor). This can also be used for x264, but until now I never used it.
For x265 28 is the default rate in the range of 0-51.
For x264 23 is the default in the recommended range of 18-28.

Lower number = higher quality (lower compression) and larger file size.
Higher number = lower quality (greater compression) and smaller file size.

ffmpeg -i pam.m2ts -c:v libx265 -c:a libfdk_aac -crf 28 pam_265.mp4

The file size difference between raw, x264, and x265 is amazing!

My current HD video camera produces MTS high-def files.
Here are the file sizes for a 12 minute clip:
MTS: 830MB
x264: 439MB (not quite half the size of MTS)
x265: 122MB (about 1/7 the size of MTS!)

To my eyes, there was no discernible difference in quality, using the default settings. x265 seems like a great codec for file sharing and should save a ton of space when I’m uploading video clips for singers. That assumes they will be able to view the clips. Microsoft Windows does not by default play MP4 files (by choice, even though millions use this format). One has to install a 3rd party media player or codec package for Windows to play MP4. VLC is one common 3rd party media player.

FFMPEG “stack smashing detected”

I wanted to encode some new video I shot with h.265 and hadn’t included that in ffmpeg configuration previously. So I began removing ffmpeg sources from previous installs, and recompiling all the libraries and then the main program. After all was done, I tried encoding and got an error I hadn’t seen before (and apparently isn’t common or I would have found an answer by searching).  I saw:

*** stack smashing detected ***: terminated
Aborted (core dumped)

After much experimentation I found that it is somehow tied to ffmpeg trying to use any audio library. If I skip audio with -an or copy, then the file will be produced. Any attempt at using an audio library of any kind produces the stack smashing error.

I’m still plugging away at it trying to find a solution or find an error in compiling. No luck yet.

UPDATE:
I wiped and reloaded ffmpeg x264 x265 and reloaded according to the Ubuntu guide for installing ffmpeg, but I found I had to add a couple of things to get the static x264 to work (otherwise during make, x265 would complain about needing to be recompiled with fPIC)

Once I did the git clone for x264 as described on the guide, I did these steps
cd x264
./configure --enable-static --enable-pic
make
sudo make install
sudo ldconfig

“ldconfig creates the necessary links and cache (for use by the run-time linker, ld.so) to the most recent shared libraries found in the directories specified on the command line…” See the man page for full description.

With the enable-pic option during configure, the static build worked. I then tried ffmpeg again and all was well.

New PC time – 4K video editing – But then… Intel SGX

I’m buying a new Panasonic HC-WXF1 4K video camera for recording local jazz singers (one of my hobbies). But my 10-year-old PC isn’t going to handle that kind of processing. It already takes its sweet time doing regular HD video.

So I’m busy putting together the specs on my new system, with a hot new processor and 32GB of fast RAM. I’ve been looking at the ASRock X299 Taichi XE and the new Intel i9-7960 processor. That is, I was until a minute ago when I read that the latest greatest processor and the X299 chipset from Intel doesn’t support their own Intel SGX! SGX is yet another Digital Rights Management hoop that was added to the pile, and it is required for doing playback of 4K/UHD movies from BluRay, and may affect online streaming of 4K.

Ho-ly-shit. What were they thinking leaving that out of the chipset?! Additionally, the motherboard has to have SGX support built into the BIOS even of your processor (like the i7-7700K) supports it. Some boards apparently don’t have the available memory to store the SGX firmware, so consumers that bought these boards are out of luck. X299 used to support full playback, but then the manufacturers decided to add more DRM requirements, and that broke the ability of these motherboards to playback or view streaming 4K.

ASRock support says “Unfortunately, the Intel X299 CPU (Skylake-X + Kabylake-X) don’t support Intel SGX function.” (see review by Jeremy S.)

Yes, I can still edit my own video, as far as I know. But still, for Intel to be that out of touch with their own stuff is insane. Will SGX be required for receiving streaming 4K? Industry, MAKE IT EASIER ON CONSUMERS WHO PAY BIG BUCKS TO WATCH YOUR STUFF!

https://canicompare.com/en/processors/intel-core-i9-7960x-specification/compare-intel-core-i9-7960x-and-find-compatible-parts-pbvsCs.html

I’m happy to update if this information is not correct. It was shocking to read tonight on the Newegg review, and then other sites that confirmed it. I’m hoping it isn’t as nasty as it sounds right now. The flip side is that I’ve never bought a BluRay since my earlier experiences with DRM prevented me from viewing rented movies on a player that was a year old. Honestly, DRM is such a pain for consumers, and pirates get around it nearly as soon as a new kind is released. I wish the industry would quit punishing consumers with these hoops.

From other forums I saw this from an owner of :
“What it WONT play is:
4k Netflix streams
4k Amazon Prime video streams
4k BluRay disks.

What it will play:
Any 4k content with DRM removed. This is very simple.”

Monitors have to be HDCP 2.2 compliant (not just 2.0)

Apparently only Intel graphics chipsets are allowed to pass the signal due to Digital Rights Management. There is no intention or ability for motherboard makers to update the boards already sold that do not have SGX incorporated into the BIOS (and which were not designed with space to incorporate SGX).

To get 4k/60hz, you have to use a DisplayPort cable and have a monitor that accepts it, and a graphics card with that port. HDMI cable limits the output to 24Hz, at least on certain monitors (check specs).

FFMPEG to NTSC-DVD, odd pulsing…

I’ve been using FFMPEG for years to create DVD compatible video. Recently, I made a change on my Sony Handicam from 60i to 60p video, and suddenly I’m getting an odd pulsing in the resulting video, but only when I convert to MPEG2. Converting to MP4 still works fine or I’d be sunk. By pulsing, I mean that the light seems to pulse every 1 second like someone is turning up the color contrast knob and then back down. Very brief, but continuous.

[EDIT: I just did a recording in 60i and it still pulses when I try to encode using “-target ntsc-dvd”, so either FFMPEG changed something, or there is a deeper issue happening on my computer, but I doubt that since all other encodings work fine, and encoding in DVD quality via Corel Visual Studio works fine on the same PC in Windows.]

Here is the code I normally use:

ffmpeg -i part1.m2ts -target ntsc-dvd part1.mpg

Pretty straightforward code, and it has always worked up until I made this change to recording in 60p. I must say that 60p has a more professional appearance to my eyes. I’m not sure what I’m seeing differently, but it does create a good impression.

I suspect that if I took apart the mechanics of what -target ntsc-dvd does that I may find a setting that I might be able to tweak.

I found one entry about the macro creating progressive output, so it should (I would think) preserve the progressive input. He said that he tried this code to get his to work, though I admit I don’t understand what it is doing yet. (It didn’t work for me at all. I still got the pulsing video.)

ffmpeg -y -i 00000.MTS -pass 1 -target ntsc-dvd -b:v 4000K -flags ildct+ilme -top 1 /dev/null && ffmpeg -y -i 00000.MTS -pass 2 -target ntsc-dvd -b:v 4000K -flags ildct+ilme -top 1 test.mpg

(ilme means interlaced motion estimation)
(ildct means use interlaced dct)

Another described what I’m seeing from a post back in 2006, and said his solution was “I’ve found the solution to my own question. I simply needed to set motion estimation to full (-me full) and the problem went away.”

That would imply that changing my code to
ffmpeg -i part1.m2ts -target ntsc-dvd -me_method epzs part1.mpg
should fix it. But it didn’t, I get the same pulsing as I did without that additional code. [method full is not available, only zero or epzs]

So I’m open to suggestions. Right now, the only solution I have is to go back to 60i, or use Corel Video Studio x9 in Windows. Video Studio is able to create the DVD video without any pulsing (though I have to create an MP4 file for it to use, since it seems to choke badly on MTS or m2ts files, each click takes a few minutes to process).