Best way to extend USB cabling with as little signal loss as possible?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

Morning, gang.

Some of you may be aware of this, others may not. Greengeek and I, independently - and to a certain extent, in collaboration - have both been figuring out ways to make use of old webcams to enable a "poor man's security system".

Ian's currently working on, and steadily improving, usbcamrecord; this is ffmpeg-based, and uses V4L2.

I built MultiCam a while back; this one is built around mPlayer and also makes use of V4L2. I'm also working on an ffmpeg-based one myself, which I'm calling CamRecord; this IS fully-functional ATM, but I'm still working out a few quirks, and adding the odd extra feature......I'll release this one in good time, and y'all can have a play with it, and see what ya think.

------------------------------------

So; AFAIK, Ian's already got his in use. My software is all functional, and works fine with the 'local' Logitech c920 on the desktop rig. Once I get the car's MOT, insurance, tax, etc, out of the way by the end of this month, I'll have a bit more spare cash to play with. I'll explain where I'm going with this.....

The desktop is basically at the back of the house, right? I want to rig up a webcam in the corner of the front kitchen window, to be able to monitor the front gate/driveway, etc. Now; the desired location for the cam is around 30ft away from the 'puter, so I need to find a method of connecting the cam to the 'puter, without incurring signal loss.

There's limits to how far you can extend USB cables, and the newer standard the cable is, the shorter that permitted maximum can be, due to maintaining data transfer rates. The c920 - in fact, all my cams - are USB 2.0, for which the maximum is around 16 ft. So, that idea's out the window, TBH.

I'm probably going to use the Microsoft LifeCam 3000 I've got; after my c920 cams, this has the best range of controls and picture quality, so should be fine for the job.

-----------------------

Does anybody have any other ideas for how to do this? More importantly, has anybody got any experience of extending USB over long distances?

I'm toying with the idea of one of these 'USB over Ethernet' extenders, since Ethernet can run over hundreds of feet without significant data loss.....an important consideration with any kind of video signal. I've got a spare 10m Cat 6 Ethernet cable I bought a couple of years ago; still sealed in the packet.....never been used. I can run the cable itself up into the roof space through the same hole where the cable for my FreeSat box comes through into the bedroom. It should be a simple enough matter to drill a hole just big enough for an Ethernet cable into the corner of the kitchen, then run the cable along the top of the cupboards & curtain rail to get it where I want it.

It's then just a case of plugging both of the adapter units into the mains, and hooking the appropriate cables up.

Comments? Ideas? Alternative suggestions?

Any & all suggestions, etc, will be considered. I'm not so set on any particular method ATM. I would like to end up with the most efficient, and cost-effective method that will achieve what I want.

Over to you lot. TIA...

Mike. ;)

stevie pup
Posts: 263
Joined: Mon May 10, 2021 7:40 pm
Location: Derbyshire, UK
Has thanked: 18 times
Been thanked: 69 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by stevie pup »

@mikewalsh Well you do ask some awkward questions sometimes don't you Mike? Which may explain why nobody has responded yet! :lol:

I don't have any magical answers either, just a couple of vague ideas. Firstly I assume moving the PC is out of the question? The ethernet idea sounds ok, and obviously using at least some items you already have wins in the cost effective department. As an alternative what about HDMI, are they limited in the same way as USB? I believe there are USB to HDMI adapters available.

One other idea, could the signals from the webcam be fed into some little box then transmitted wirelessly? No idea how much trouble that would all be though.

Finally, do you live in an area where you need to monitor your garden gate? Have you had some sort of undesirable activity around your gate? Must admit I'm scratching my head a bit here and wondering why someone would want to be constantly watching their garden gate!

User avatar
mikeslr
Posts: 2944
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 905 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikeslr »

USB-Cables degrade signals after about 10 feet. But there are ways to work-around that. See https://www.avaccess.com/blogs/guides/u ... eful-tech/ which I sure you'll make more sense out of than I can.

Mike, my eldest son (currently a programmer) while he still lived at home was an IT-Tech. For whatever reason he didn't like wifi. So he connected the computer in his room to the router using an 30 foot ethernet cable. [With the piss-poor wifi signal I get in the basement I've thought of doing the same; but that would involve drilling a couple of holes in exterior walls].

So maybe an ethernet to usb combo:

The following turned up when I used the following search criteria in google:
"ethernet cable length signal degrade"
Google responded with
"328 feet
Standards for cable distance recommend that Cat5, Cat5e, Cat6 and Cat6a cables have a maximum cable segment run length of 100 meters or 328 feet. The cable distance specifications are part of the Telecommunications Industry Association (TIA) and Electronic Industries Alliance (EIA) standards."
Other links were provided, but I think that summary comes from here, https://tripplite.eaton.com/products/et ... able-types

Then use an ethernet to USB adapter, https://www.amazon.com/Cable-Matters-Et ... 4KHJ2?th=1

User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

@stevie pup :-

stevie pup wrote: Fri Sep 08, 2023 12:42 pm

@mikewalsh Well you do ask some awkward questions sometimes don't you Mike? Which may explain why nobody has responded yet! :lol:

Heh. Somebody's got to keep you lot on your toes..... :D

Um; yeah. Moving it IS out of the question, TBH; this is a full desktop rig we're talking about, with a LOT of attached peripherals. As to why I want to keep an eye on the front of the house, well; no, there's no real need, I suppose, but I've had the idea for a "poor man's security system" more or less ever since rockedge first started experimenting with ZoneMinder several years ago. In recent months, Ian and I have pretty much perfected the software side of things with our various apps.......and it's time to put theory into practice. I've had several spare webcams kicking around underfoot for ages, and webcams are somewhat smaller & more discreet than an external camera.. Might as well get some proper use out of 'em!

(AFAIK, Ian uses laptops, so it would be easier for him to move the 'puter to the cam. Unfortunately, I can't do that.)

--------------------------

@mikeslr :-

Yes, that's one of the main reasons I thought of investigating the use of Ethernet cable, Mike. I've known for a long while that it's possible to transmit data through these for long distances without serious signal degradation.....as you say, 300+ feet. I'm only talking about 30-35 feet at most, so I think it ought to work OK.

We'll see in a few weeks. I just wanted to "pick some brains" ahead of time. @peppyy might have a better idea, since he uses something like this to monitor his beehives.....

T'other Mike. ;)

User avatar
wizard
Posts: 1934
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2593 times
Been thanked: 662 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by wizard »

Here's what comes to mind (not cabling, but other ways):
1. In the states Wyze cams are inexpensive commercial cameras working over wifi.
2. Old smartphone can be setup as a cam and work over wifi.
3. Old laptop setup as remote w/cam & accessed with VNC over wifi

wizard

Big pile of OLD computers

User avatar
rockedge
Site Admin
Posts: 6481
Joined: Mon Dec 02, 2019 1:38 am
Location: Connecticut,U.S.A.
Has thanked: 2693 times
Been thanked: 2592 times
Contact:

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by rockedge »

Old smartphone can be setup as a cam and work over wifi.

DroidCam is a solid performer as a wireless network camera. I have used several old Android phones as net cams using Zoneminder. VLC also connects easily and streams DroidCam. This app made some junk phones actually useful again in a fairly straightforward manner.

User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

@wizard :-

Hiya, bud. Let me answer these in order...

1. Mmm............no. Nice idea, but it's defeating the object of the excercise. The whole point is to use as much spare tech as I've already got sitting around. I've got cameras a-plenty. Buying yet another one is pointless, really.

2. Nah. This has always been a smartphone-free zone. I've never had one, and I've no intentions of ever buying one. Many have been using 'em for at least 15 years or so; me, I don't have the slightest interest in the things. Which makes me very unusual. You will never, EVER catch me slavishly following Facebook & Twitter (sorry, should that be 'Meta' and 'X'?) while squinting at a 5-6" screen. I have more respect for both my eyesight AND my sanity than that. :lol:

3. Might have been a way of utilising the old Inspiron, in 'headless' format (if you remember, the graphics chip packed up.) But that went to the great landfill in the sky around a year ago. I have ONE desktop, and ONE good condition laptop. I'm not taking that into the kitchen; on top of the fact that I just don't want it getting covered in cooking grease over time, our kitchen is what you might call "bijou". Very compact. There really ain't anywhere I could put it where it wouldn't get in the way..!

All good ideas, but for me they're just not applicable. Sorry! :)

@rockedge :-

See above. I've heard of Droidcam, but we do NOT have a smartphone in this house, much less an old one.....

I always knew I might have to buy one new item to tie everything else together. This is what I'm considering:-

https://www.amazon.co.uk/SGEYR-Ethernet ... C87&sr=8-6

Not too pricy, and should do what I want. I thought about a couple of these USB-to-Ethernet plug adapters, but reading some of the reviews on eBay & Amazon, they don't seem to work for a lot of people.....

Mike. :D

User avatar
Flash
Moderator
Posts: 972
Joined: Tue Dec 03, 2019 3:13 pm
Location: Arizona, U.S.
Has thanked: 50 times
Been thanked: 124 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by Flash »

Mike, can you even find a USB cable long enough to reach the front of the house? If you can, or if you can make one, I'd say give it a try. The camera is probably made to USB1 specs, so its data rate isn't going to tax a good cable that meets USB2 specs, even for much longer lengths than tested..

Chaos coordinator :?
User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

Flash wrote: Sat Sep 09, 2023 1:08 am

Mike, can you even find a USB cable long enough to reach the front of the house? If you can, or if you can make one, I'd say give it a try. The camera is probably made to USB1 specs, so its data rate isn't going to tax a good cable that meets USB2 specs, even for much longer lengths than tested..

@Flash :-

Now you mention it, Flash, I'll impart what knowledge I have about the things.

  • According to the USB 2.0 specs, anything over 16 feet and you start losing signal integrity. Fine with summat like a keyboard or a mouse, but very noticeable with a webcam.

  • You CAN buy considerably longer USB cables, which are called "active" cables. These have wee amplifiers built-in, which boost the signal strength at various intervals along the cable length. However, they're quite expensive for what they are.

Having said which:-

Hah. Mm-hm....o-kay. Around £30 for a twin-chip, 15M USB 2.0 active cable.....which is about the same as what the USB-to-Ethernet boxes are going to cost.

https://www.amazon.co.uk/MutecPower-fem ... =8-11&th=1

One of the reviews for this item specifically mentions using it with a webcam, and the reviewer sounded very happy with it. Well, that gives me a couple of choices, so.....yeah.

Worth considering. Ta for the suggestion.

Mike. ;)

User avatar
wizard
Posts: 1934
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2593 times
Been thanked: 662 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by wizard »

@mikewalsh
It was just an alternate idea post.

If your objective is to see if you can do it with what you have (the tinkerer in me too) that's one thing. If it's to find the most cost effective, that's different.

Nah. This has always been a smartphone-free zone.

Personally, I carry a dumb flip phone, but for several years I 've always had a couple of old smart phones, currently have two Samsung Galaxy S5. Not connected to any phone provider, just wifi

They're little computers both fun and useful to tinker with. Here's some of my uses:
*Goggle Voice (free VOIP phone)
*calculator
*camera, still and video
*borescope camera monitor (requires borescope)
*security camera monitor (Wyze cam)
*altimeter
*level
*compass
*GPS
*music & video player
*chromecast
*wifi strength analyzer
*oscilloscope (requires probe)
*OBD2 auto computer analyzer (requires bluetooth adapter)
*PDF document scanner
*barcode scanner
*weather monitor

All the apps I use are free and the additional list of uses is huge.

Good tool or toy.

wizard

Big pile of OLD computers

User avatar
mikeslr
Posts: 2944
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 905 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikeslr »

Ditto what wizard wrote. I 'upgraded' to a smartphone when I had to. It was cheaper than the 'dumb phone' replacement would cost. T-Mobile carrier, no DATA plan. Came in handy while vacationing in England. The wife got on the Tube, while I didn't make it before the door closed*. :lol:

Carry it all the time. Never turn it on. It's only to call the wife and AAA if the car breaks down. Well, not completely true. I no longer carry a camera &/or cam-recorder.

Think of it as a tool, not a sneaky vector to make you one of the Borg Collective. And with the possible exception of younger generations, humans have the ability to press the power button to turn it off.

* This line was edited as coffee kicked in. Improper training in childhood results in 'muscle-memory' "women first" and a disinclination to be pushy in crowds. Hence, she made it; I didn't.

User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

@wizard :-

Reviewing my objectives, because I want to do this from the desktop rig - and because I want the camera at t'other end of the house - whether I use Ethernet that I already have, OR I buy some of this active USB cabling, it's going to cost me about the same.

This little project is summat I've been working at, on & off, for the last 4 or 5 years. It was only an idea initially, which I half-heartedly tinkered about with........but over the last several months, it's got a lot closer to fruition.

Back in December, greengeek started the thread entitled "MirrorCam & DrainCam":-

viewtopic.php?t=7622

I got reading this, looked through the scripts he'd created & began to realise that what my 'project' needed was simply a bit of time spent on it; researching, mainly, and then experimenting with scripts'n'stuff. Ian was just making use of standard Linux tools that have existed in the kernel for ages. I was aware of all these, but had never thought of combining some in quite this way before. So...........

The outcome of all this was MultiCam:-

viewtopic.php?t=7717

Ian had used VLC for his media 'engine', because it was in the Puppy he was using all the time. Me, I sometimes use it, sometimes not........but what I DO always have installed is mPlayer, because the wee script I have in /root/Startup for startup and shutdown 'jingles' is written to use it. I did some research, learnt about mencoder, the companion encoder to mPlayer itself, started experimenting, got it functional with some more research.......and then me being me, a GUI was next on the cards (and why not turn it into a 'portable', take & use anywhere app while I was at it?)

MultiCam works well for displaying the output of several cams at once, so long as you arange your connections to make best use of available USB 'root hub' bandwidth (this is an internal kernel function). Ian and I had both found that the practical maximum for a USB 2.0 'root hub' was 2 cams simultaneously.......but having USB 3.0 on my rig as well meant that I could double this to 4 cams if I wanted.

MultiCam will let me 'stream' live output from one cam while at the same time recording from another, but the one thing I could never figure out was how to 'preview' what was being recorded.

-------------------------

Fast-forward to today:-

I knew Ian was still pursuing ways of implementing a "poor man's CCTV system", because he'd admitted that was one of the ultimate goals for all this. A couple of weeks ago, he published UsbCamCord, and here he's switched to using ffmpeg.

viewtopic.php?t=9421

I've always shied away from using ffmpeg. Not only is it a nightmare to implement - if you don't cross every 't' and dot every last 'i' in exactly the right order AND in just the right places, you'll never make it work. I thought mPlayer's documentation was extensive; there's no end of pages of stuff, assembled over nearly 20 years.......but that pertaining to ffmpeg is SO extensive, it's like comparing Tolstoy's "War & Peace" to an infant's basic, first-year 'reader'. It is a frickin' nightmare to read through.

Anyways, I figured it was time I did some research into ffmpeg. Ian appears to have cracked the 'preview while you record' thing; I'd put together most of the necessary command myself through trial & error, but I DID 'borrow' one stanza from his script command, and researched it further. Seems there's at least a dozen different ways of implementing this very function with ffmpeg, but none of them are especially intuitive, and ALL require digging around in the documentation to find.

Yes, ffmpeg IS a very powerful tool. But it's command-line based, it's NOT for beginners, and getting the hang of using it requires you to start thinking in a new way; it's all about a 'horizontal' approach with ffmpeg, as opposed to the vertically-based approach with most other stuff, where one idea flows naturally into the next.

--------------------------------------------

I'm currently working on the next incarnation of MultiCam, now re-named to CamRecord. I'm also experimenting with ffmpeg here; I have it working with either a straight 'Live' feed, for real-time immediate viewing, or recording either video-only OR video + audio. I'm still trying to figure out how you can make this work with more than one cam at a time.

mPlayer is easy to get multiple inputs working simultaneously. You CAN with ffmpeg, but it's harder, less intuitive, and some of the concepts are very different.....despite that mPlayer and the ffmpeg Project share a number of common developers who have been contributing to both projects for some years.

So; NOW ya know! :D

Mike. ;)

User avatar
wizard
Posts: 1934
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2593 times
Been thanked: 662 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by wizard »

aha, a really ambitious project. thanks for the elaboration. Look forward to your updates

Thanks
wizard

Big pile of OLD computers

User avatar
mikewalsh
Moderator
Posts: 6115
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 779 times
Been thanked: 1952 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by mikewalsh »

@wizard :-

wizard wrote: Sat Sep 09, 2023 5:15 pm

aha, a really ambitious project. thanks for the elaboration. Look forward to your updates

Thanks
wizard

Gladly. It may not be to everyone's liking when I do publish it, but it WILL be fully-functional.....it'll "do what it says on the tin". I'm not detracting from Ian's achievements with UsbCamCord; he's got it working nicely, AND he's managed to master GTK-dialog (something I was never able to get my head round. Personally, I find YAD so much easier to work with). All credit to him.

What he has done is to effectively give me the "kick up the backside" I've needed for long enough to get on with my own project. I've had the GUI pictured in my head for at least a couple of years, so I knew how it would look, and I admit, I've borrowed a couple of things from its predecessor, MultiCam. Isn't that what all good developers do?? :lol:

Watch this space....

------------------------

@williwaw :-

Heh. Yeah, I looked at those things. At first glance, they look ideal. But heading down the bottom of the page, there's a lot more negative reviews than there are positive ones. Seems they don't work so well as the retailer would like you to believe. And the 'positive' ones rather look & sound like they're "manufactured".....know what I mean?

I think I'd rather spend a bit more and go with a method that's endorsed by a lot of the tech bloggers as actually doing what it's supposed to do. Thanks for the suggestion, though. :thumbup:

Mike. ;)

User avatar
peppyy
Posts: 330
Joined: Fri Jan 22, 2021 2:11 pm
Location: VT USA
Has thanked: 66 times
Been thanked: 28 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by peppyy »

If it is only a matter of 30 feet or so, a usb repeater cable will do the job for around 10 bucks. Look up Monoprice 32ft 10M USB 2.0 A Male to A Female Active Extension/Repeater Cable. I have used these in the past and they work well.

I currently have an eithernet cam on a 150 foot cable to my greenhouse where I have power. I set up an old router as a bridge to there and access it it over my home router.

Puppy Linux. It just works!
Foassapup 9.5 64-(Frugal) Mobo, M5A99FX PRO - CPU, AMD FX-6300 6 core - mem,32GB - Storage
ssd 128GB M4 - ssd-256GB APS - ssd-1TB PNY - GPU GeForce GTX 1060 GAMING X 6G. Yes it's a Mutt.

User avatar
wizard
Posts: 1934
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2593 times
Been thanked: 662 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by wizard »

@peppyy

set up an old router as a bridge to there and access it it over my home router.

Hi pep, just wondering why you used this on 150 foot run since cat5/6 spec will go 328 foot. Also worth noting is you may be able to put cameras in remote locations that have no power by using a POE (power over ethernet) setup.

wizard

Big pile of OLD computers

User avatar
peppyy
Posts: 330
Joined: Fri Jan 22, 2021 2:11 pm
Location: VT USA
Has thanked: 66 times
Been thanked: 28 times

Re: Best way to extend USB cabling with as little signal loss as possible?

Post by peppyy »

@wizard I tried POE and had nothing but trouble with it. I also have a line of spruce trees between the greenhouse and the bee yard which made it easy to get the cables there. Had both the cat5 and the 150' extension cord. Ran them suspended on para-cord from the greenhouse to the trees. It is another 100+ feet to my main router and I didn't want to bury cable or have an overhead there.

The first ip camera I had was a nice one and the POE fried it. I bought a cheep one with pan/tilt to replace it. Uptime is about 99.9% Needs to be reset about once a month. Might have to do with the 128gb sd card. I can access 14 days of video and alarms from my desk so it works for me. Now if I could get the .264 file type to open without drag and drop. Don't know why they don't use standard h264.

Puppy Linux. It just works!
Foassapup 9.5 64-(Frugal) Mobo, M5A99FX PRO - CPU, AMD FX-6300 6 core - mem,32GB - Storage
ssd 128GB M4 - ssd-256GB APS - ssd-1TB PNY - GPU GeForce GTX 1060 GAMING X 6G. Yes it's a Mutt.

Post Reply

Return to “Users”