VideoView - a super simple webcam viewer/recorder

Audio editors, music players, video players, burning software, etc.
Post Reply
Message
Author
User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

VideoView - a super simple webcam viewer/recorder

#1 Post by Mike Walsh »

Afternoon, all.

6 months ago I was trying to get my webcam working in Racy 5.5:-

http://www.murga-linux.com/puppy/viewtopic.php?t=110563

Amongst the many suggestions that were gratefully received, watchdog proffered one which he said he always kept in reserve, as a last resort. When nothing else worked, this one always would. It's called VideoView.

It comes as a simple, pre-compiled binary, which you click on to start. It's also absolutely minute in size, and extremely easy to use. Compiled by a guy name of Luca Risolia, it utilises the Fast Light Toolkit library.

This got me thinking, because I do have one Pup (Racy 5.5) which I'm attempting to keep true to the spirit of Puppy.....very small, lean & lightweight. At the same time, I don't want to forgo too many useful apps & stuff.

Image

I'm not keen on having to click on binaries to start things; I like to do things 'properly'. If I don't have it on the desktop as an icon, I prefer to have it in the Menu itself. So, I've put a .pet together .....comprising the VideoView binary itself, and a .desktop entry (so you can start it from the Menu.)

I've tried this in all my Pups, and, without exception, it always runs. If you start it by clicking on the binary in its own directory, it will save your recordings (in .avi format) to that directory. If you start it from anywhere else, it will save the recording to /root (your 'home' directory).

Having recorded it, you can play it back from within VideoView. After you've quit, you can play it back fine in VLC. SMPlayer, for some reason, doesn't seem to like .avi files. I'm guessing it's one of those options that need figuring into the 'mix' at compile time.

Anyway, for those of you running very lean Pups on elderly hardware.....enjoy.


Mike. :wink:
Attachments
VideoView_120707-i686.pet
Small, simple lightweight cam recorder
(226.57 KiB) Downloaded 441 times

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#2 Post by greengeek »

Wow, that's a keeper. Nice one Mike.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#3 Post by Mike Walsh »

Morning, GG.

Ah, don't thank me; thank watchdog. It was his discovery originally.....but having tried it out, I thought it ought to be available to all Puppians, since it's so tiny. And having found that it seems to work everywhere, I just added a MenuEntry and 'petted' it.

Glad you like it.


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#4 Post by greengeek »

Did you have any success with using the resolution changing field? Seems stuck on my max res of 1280x800 for me. Would have liked to get 320x240 working for some applications.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#5 Post by Mike Walsh »

@ GG:-

I've got it to work with all of the given sizes. There's a certain order you have to do things in when you fire it up.....and there's no 'Help' file, or even basic instructions.

a) Start VideoView.
b) Click 'I accept'.
c) If you have your cam showing (normally /dev/video0), click 'Open'. (If not, click 'Detect; I presume it then searches to see if you have a camera attached, and whether the kernel has a driver module for it? Personally, I've never had the problem...)
d) Having selected 'Open', you can then select your display size.
e) Click on 'Start Preview'.....and it should be showing, in your selected display size. (The given display sizes are a 'fixed' selection. They don't necessarily correspond to those supported by your cam's chipset, so occasionally you'll get the next size up or down.)

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

Am I right in thinking you're getting stuck on d), and can't select the display size you want?

Can you let me have the output of a

Code: Select all

lsusb
...please? (I'm assuming it's a USB cam, yes?)

The vendor ID should let us see if it's supported by the kernel's uvc driver module. I've found out, over the last few years, that as far as Linux is concerned, it makes far more sense to do your research and buy devices that are known to work with the kernel.....as opposed to buying something shiny that catches your eye, then spend God knows how long trying to force it to work.....


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#6 Post by greengeek »

Mike Walsh wrote: There's a certain order you have to do things in when you fire it up.....
Hi Mike - thanks for that. Not sure what I had done differently in my first trial but working fine now that I follow the order you have shown.

I would like to find a simple way to send webcam video (probably 320x240 to save bandwidth) as well as audio across the internet. I know there is Skype and Linphone etc etc, but I feel it should be simpler.

If I could "share portion of screen" and use the feed from something like videoviewer there may be some way to use puppyphone technology to create a poor mans Skype.

(just spitballin' here...)

cheers!

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#7 Post by Mike Walsh »

Hi, GG.
greengeek wrote:I would like to find a simple way to send webcam video (probably 320x240 to save bandwidth) as well as audio across the internet. I know there is Skype and Linphone etc etc, but I feel it should be simpler.

If I could "share portion of screen" and use the feed from something like videoviewer there may be some way to use puppyphone technology to create a poor mans Skype.
Mm. Yah, I can see where you're coming from, mate. Puppyphone's already set-up for the audio component,so.....you're only talking about adding in the video component, and sync-ing, etc.

I know just who might be interested in having a go at summat like this, too. He's done our own version of the old Ubuntu 'Grive' Google-Drive client. He's put together the 'poor man's' YouTube viewer, working through the CLI. He's always coming up with novel, simple ways of doing stuff. You know who I'm talking about, don't you?

Fredx181, that's who. I'll drop him a PM.....see what he thinks. Whether it might be do-able or not.

Possibilities, possibilities.....


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#8 Post by greengeek »

I have long wondered if it would be possible (and potentially much easier) to avoid "syncing" altogether.

All I need is the ability to "push" part of the screen (either a webcam image or other part of screen) as a static image. It could automatically send itself every 5 seconds, or else be pushed manually on demand.

That way the remote party would see an image of the caller (occasionally updated static image rather than video) or see whatever else was being "pushed" (eg screen shot of a pdf or portion of jpeg etc).

No need for high quality video streaming bandwidth or syncing.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#9 Post by Mike Walsh »

Ah. Yes, I'm with you now.

Static images would certainly be a lot simpler to send, it's true. You'd only need the IP address at t'other end to send the image to, after all. Be nice if you could select the frequency for those images, too.....i.e., how many seconds between shots.

I've seen a simple application for acquiring remote webcam images, called pWebcam (I've actually got the .pet for it), but I cannot find the thread from which it may have sprung, nor do I remember where I got it!

I'm sorta wondering if it might be possible to use that, somehow. Instead of each party 'pushing' images out at regular intervals, perhaps each one could 'pull' the image from the other party's camera.....

Only an idea, but it might be possible to 'hack' things about a bit to end up with what you want, n'est-ce pas? What d'you think?


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#10 Post by Mike Walsh »

@ GG:-

Having extracted pWebcam with UExtract, and looked at the pwebcam script in /usr/local/bin, I see it's one of Ziggy's.....but I'm still no wiser as to where to find the thread for it. That's if there ever was one, of course.....

Maybe you could track it down, perhaps?


Mike. :wink:

User avatar
ETP
Posts: 1193
Joined: Tue 19 Oct 2010, 19:55
Location: UK

#11 Post by ETP »

Regards ETP
[url=http://tinyurl.com/pxzq8o9][img]https://s17.postimg.cc/tl19y14y7/You_Tube_signature80px.png[/img][/url]
[url=http://tinyurl.com/kennels2/]Kennels[/url]

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#12 Post by greengeek »

Oooohhh, pWebcam looks tasty! Although possibly is is mis-named. It appears to be set up to "pull" images from an internet camera rather than the webcam in a PC.

(I might have to add that to my folder of info discussing Rockedge's solutions for internet streaming of security camera images. A longstanding project I have made too little progress on)

I don't know if this would be a suitable method for interfacing with a SIP type solution though? Seems as if it would require the remote end to be set up as a streaming server - which has risks.

I was hopeful that the inbuilt checks and balances of the current Puppy SIP utilities could be extended to allow image transfer (I assumed push rather than pull).

Maybe what I am visualising is "FTP over SIP" or similar.

I will keep playing with pWebcam though - maybe I missed something.

EDIT: I tried a few public IP camera addresses to see if pwebcam is still capable of connecting and it seems t depend on how the camera security is set up. Here is one link that works:
http://services.royalresorts.com/webcam ... mrpool.jpg

EDIT2: This site has a few links to publicly available webcams:
https://www.cctvview.info/Cameras

and maybe this one:
https://www.ttrix.com/apple/iphone/ipvi ... meras.html
.
Last edited by greengeek on Mon 11 Jun 2018, 19:27, edited 4 times in total.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#13 Post by Mike Walsh »

ETP wrote:Hi Mike,
Is this the one perhaps?

http://www.murga-linux.com/puppy/viewto ... 498#508041
Thanks, ETP. Yep, that's the one; no wonder I couldn't find it.....its only reference is a post in another thread. :roll:

I still can't remember where I got the pet. I know what the purpose of the .pet is now, but when I 'found' the package (2 or 3 yrs ago), I was looking everywhere for a webcam package for Racy 5.5.

Anyway; mucho appreciated, mate. Cheers.


Mike. :wink:

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#14 Post by Mike Walsh »

GG :-
greengeek wrote:I don't know if this would be a suitable method for interfacing with a SIP type solution though? Seems as if it would require the remote end to be set up as a streaming server - which has risks.

I was hopeful that the inbuilt checks and balances of the current Puppy SIP utilities could be extended to allow image transfer (I assumed push rather than pull).
No, I don't think that's quite how it works, TBH.

As near as I can figure it out, it's set to 'pull' static PNG images.....not streaming video. Which is why I thought of it, and put it forward for consideration.....bearing in mind the idea you outlined. And as for 'internet camera' versus 'webcam'; what's the difference? They're both devices that produce a digital image (which can then be manipulated.)

If this thing should ever begin to 'come together', then once you have the phone connection established, I can't see that it makes a scrap of difference as to whether the images are 'pushed' or 'pulled'; it would have to be done from both ends anyway, for what you have in mind. You'd still end up with the same net effect, wouldn't you?

Perhaps some of Ziggy's pWebcam script could be incorporated into Puppyphone's? Just an idea, but I for one would be quite happy with a static image say, every couple of seconds (or every second, if you like). I think you'd still need a basic server of some kind, whether you're looking at video or static images, whether you're 'pushing' or 'pulling'.

I could be wrong, but that's how it seems to me. (*shrug*)


Mike. :wink:
Last edited by Mike Walsh on Mon 11 Jun 2018, 19:22, edited 1 time in total.

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#15 Post by greengeek »

Mike Walsh wrote:I can't see that it makes a scrap of difference as to whether the images are 'pushed' or 'pulled'; it would have to be done from both ends anyway, for what you have in mind. You'd still end up with the same net effect, wouldn't you?
Bear in mind that I really don't understand the complexities of how a SIP phone works - but I imagine that both ends have to establish a secure link to an appropriate SIP server in the middle.

My guess is that this setup absolutely forbids "pulling" of data (voice or other) from the remote end. I would imagine that each end is allowed to "push" data to the SIP server and the SIP server then pushes that data to the other end through an agreed open channel.

I just would not expect pull requests to be permitted.

I've been wrong before though...
:-)

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#16 Post by Mike Walsh »

Fair comment.

I still think you could incorporate some of pWebcam's script into Puppyphone, and modify it to 'push' rather than 'pull'.....but that's just an idea.

I'm no 'script-jockey' (far from it). I'm good at coming up with ideas (a 'blue-sky' man!), but not really suited to actually putting them into practice. I've modified a fair number of scripts over the years to make them do what I want, but as for writing them from the ground up, that's rather above my pay grade, I'm afraid!

I'm more than happy to test stuff out, and submit bug reports, etc., but I just don't understand Bash that well.... :)


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#17 Post by greengeek »

For the sake of posterity I will post this self-reminder here:
https://stackoverflow.com/questions/964 ... s-over-sip

I hope to investigate the future possibilities of adding screenshare, image transfer or document transfer within an SIP session. Subject for a different thread really.

User avatar
Mike Walsh
Posts: 6351
Joined: Sat 28 Jun 2014, 12:42
Location: King's Lynn, UK.

#18 Post by Mike Walsh »

GG:-

Smokey PM'd me earlier on today. Apparently the PSIP 'engine' does support video already, although the ability has never been compiled into Puppyphone, since it wasn't envisaged as being used for that.

He's made enquiries about this with jamesbond on several occasions, apparently, but James is a busy man, and hasn't really got the time to look at it.

Just thought you'd like to know.


Mike. :wink:

User avatar
greengeek
Posts: 5789
Joined: Tue 20 Jul 2010, 09:34
Location: Republic of Novo Zelande

#19 Post by greengeek »

Thanks Mike - good to know the tantalising possibility is there.
cheers!

Post Reply