Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Mon 06 Apr 2020, 13:41
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Puppy tech for LOCAL communication during virus lockdown
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [36 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Wed 25 Mar 2020, 03:10    Post subject:  

dancytron wrote:
This is an intercom server for android and apple phones.

It is for the Raspberry Pi, but I think it would work on a regular computer too.

https://www.electromaker.io/project/view/create-your-own-home-intercom-using-raspberry-pi-and-mumble
As far as I can tell this requires the internet and/or cellphone connectivity unfortunately. (Unless I misunderstood...)
I was hoping for local connectivity if possible. Just minimal tech.
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Wed 25 Mar 2020, 03:14    Post subject:  

Mike Walsh wrote:
What's wrong with PSIP? It's existing Puppy technology, it's proven, and it works.

Anybody who's tried Smokey01's BackSeatDriver (and I'm pretty sure you have, GG, 'cos you were asking me about it, months ago) will know it's perfectly possible to chat with just the PSIP portion, without needing to run the remote desktop function.
Can't remember why I stalled on the back seat driver tests. Didnt realise psip can communicate locally without a sip account so that's good news.

Quote:
Normally PSIP requires a SIP account & all sorts of faffing-about to get it to connect & work. The beauty of the version that's part of BackSeatDriver is that it works direct, via an encrypted VPN tunnel
Is that a VPN on a local LAN or via internet? Can it run totally without WAN?
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Wed 25 Mar 2020, 03:25    Post subject:  

tallboy wrote:
That is the real problem, because all the above mentioned solutions need internet. Confused
There is of course the old fashioned alternative technique, named talk... Laughing
Ahh yes - but what if I am quarantined downstairs and my wife can't hear my repeated requests for more lemon and honey drink???
wifecall.jpg
 Description   
 Filesize   38.71 KB
 Viewed   228 Time(s)

wifecall.jpg

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Wed 25 Mar 2020, 03:28    Post subject:  

Mike Walsh wrote:
I've got Jami up-and-running in Xenialpup64.

Download the 64-bit .deb for Ubuntu 16.04 from here:-

https://jami.net/download-jami-linux/

You'll need the Qt5-5.5.1.sfs loaded. Get it from here:-

http://distro.ibiblio.org/puppylinux/pet_packages-tahr64/qt5-5.5.1_amd64.sfs

I know these are huge packages, but I've found that, unlike Qt4 where you can just load the relevant modules, Qt5 insists on having the full infrastructure to draw on; without it, it just won't function.

You'll also need the following from the PPM:-

libclutter
libclutter-gtk
libnm
libwebkit2gtk
libqrencode
libcanberra-gtk3

This is the Jami interface:-





.....after setting up a 'local' account. As wiak says, this appears to permit accounts across a LAN, without needing internet access.

I've got it 'working'.....but don't ask me how the hell you actually use it. This, you will need to discover for yourselves..... :
Thanks Mike - worth a look. If it absolutely needs 64bit then so be it. Whatever works is good.
cheers!
Back to top
View user's profile Send private message 
Mike Walsh


Joined: 28 Jun 2014
Posts: 6092
Location: King's Lynn, UK.

PostPosted: Wed 25 Mar 2020, 08:29    Post subject:  

@ GG:-

Let us know how you get on with this, because you're more concerned with purely 'local' communication, aren't you? Most of the other suggestions are designed to work across the WAN, as opposed to LAN.....

I'll be interested to hear the outcome, mate. Smile


Mike. Wink

_________________
MY 'PUPPY' PACKAGES

Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Thu 26 Mar 2020, 03:53    Post subject:  

Just want to chuck into the mix a couple of thoughts:
- i read that pulseaudio and Jack are two good alternatives for streaming audio
(Speed and ease of use comparison here: https://unix.stackexchange.com/questions/68772/jack-vs-pulseaudio-how-is-it-faster)

BUT apparently both pulseaudio and Jack "sit on top of" ALSA and so ALSA is said to be a better low level option with less latency.

That seems ideal for me as my system uses ALSA and it is apparently ideal for this purpose (although probably harder than pulseaduio to set up). (plus - i have never succeeded with setting up Jack)

In recognition of that the following web pages regarding "trx" seem very promising:

http://www.pogo.org.uk/~mark/trx/streaming-desktop-audio.html

http://www.pogo.org.uk/~mark/trx/

This doesn't address the desire to send video over the network, but audio will do as a starting point.
Back to top
View user's profile Send private message 
Moose On The Loose


Joined: 24 Feb 2011
Posts: 908

PostPosted: Thu 26 Mar 2020, 11:22    Post subject:  

greengeek wrote:


This doesn't address the desire to send video over the network, but audio will do as a starting point.


You may want to check into this
https://www.guidingtech.com/9554/vlc-stream-media-live-camera-feed-how-to/

I had VLC streaming my webcam on puppy-528 at one point
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Thu 26 Mar 2020, 12:29    Post subject:  

Moose On The Loose wrote:
You may want to check into this
https://www.guidingtech.com/9554/vlc-stream-media-live-camera-feed-how-to/
I had VLC streaming my webcam on puppy-528 at one point
Thanks Moose. I have tried VLC recently and couldn't get the receiving end working properly. Need to go back to this for more trials.

https://www.guidingtech.com/9554/vlc-stream-media-live-camera-feed-how-to/

also:

https://www.howtogeek.com/118075/how-to-stream-videos-and-music-over-the-network-using-vlc/
Back to top
View user's profile Send private message 
rockedge


Joined: 11 Apr 2012
Posts: 1700
Location: Connecticut, United States

PostPosted: Thu 26 Mar 2020, 12:54    Post subject:  

do you want to stream webcams? I can help you possibly
Back to top
View user's profile Send private message Visit poster's website 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Thu 26 Mar 2020, 16:03    Post subject:  

Hi rockedge, yes there is definitely a need for webcam streaming in this application.

Imagine two scenarios:

1) Two people in an apartment building (on same wifi network) needing to communicate with no cellphones and no extenal internet connection. That is where puppy psip phone seems to provide an easy answer - although without video capability. It would be nice to maybe add a small webcam feed in one corner of the screen so the combo of puppy psip and separate webcam feed would be a poor man's skype alternative.

2) A patient is sick (and quarantined) in one of the bedrooms and being monitored by some one else in the kitchen. The patient may sometimes be able to initiate a psip call - but some times may not be capable of that and instead the person monitoring them needs a full time audio and video feed. Sort of like a baby monitor.

I thought about zoneminder but the requirement here is for local data only - no internet or ISP connection
Back to top
View user's profile Send private message 
Burn_IT


Joined: 12 Aug 2006
Posts: 3663
Location: Tamworth UK

PostPosted: Thu 26 Mar 2020, 17:37    Post subject:  

What is wrong with VNC??

When my son was knocked off his Motorbike and needing help we set up communication via VNC and broadband.
If both ends have always on connections it is dead simple and it only needs a little extra thought if regular dial up is needed for a quick check.

_________________
"Just think of it as leaving early to avoid the rush" - T Pratchett
Back to top
View user's profile Send private message 
OscarTalks


Joined: 05 Feb 2012
Posts: 2142
Location: London, England

PostPosted: Thu 26 Mar 2020, 18:16    Post subject:  

If you want to add video you should try Linphone. Uses SIP protocol so should be same as PSIP but also adds webcam video feed. Call alerts are both on-screen and audio ringtone provided the receiver has speakers on and sound set up. The packages I compiled are very small compared to some of the other calling and conference programs often suggested. Using PPM is also possible but will drag in more dependencies than if Linphone is custom compiled and may not have quite as many codecs to choose from. It is available for other platforms as well so no problem if people on the network are using things other than Puppy.
http://smokey01.com/OscarTalks

_________________
Oscar in England

Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1957
Location: not Bulgaria

PostPosted: Thu 26 Mar 2020, 18:47    Post subject:  

You can stream from one computer on a network to another using ffmpeg. My first attempt below has a huge lag on the video though - however if you use a faster codec than libx264 (older/less-complex/poorer quality one) I expect you can get rid of that lag at cost of video quality:

https://trac.ffmpeg.org/wiki/StreamingGuide

Here are the steps I did:

1. Find the receivers IP address (e.g. with ifconfig). On my lan the receiver IP was 192.168.1.8

2. On the sending machine (I did this on my XenialDog64 but should work with Puppy too if new enough ffmpeg installed):

NOTE WELL: Use the IP address of YOUR receiver machine, which may not be 192.168.1.8. Might be better with lower rate, -r 10, below (haven't tried that yet).

Code:
ffmpeg -y -thread_queue_size 512 -f alsa -ac 2 -ar 44100 -i plughw:0,0 -thread_queue_size 64 -f video4linux2 -s 640x480 -i /dev/video0 -r 30 -filter_complex asyncts -c:v libx264 -preset superfast -crf 23 -pix_fmt yuv420p -c:a libmp3lame -ac 2 -ar 44100 -b:a 192k -f mpegts -threads 0  -flush_packets 0 udp://192.168.1.8:5000?pkt_size=1316


Note that I got most of the above ffmpeg line from studying log of what I use for webcam video recording in my weX audio/video/screencast application; however, you don't need weX for any of the above.

3. On receiver machine, I viewed the stream via mpv (but could use VLC and, I imagine, mplayer, if you know how to play streams on them) using:

Code:
mpv udp://@127.0.0.1:5000

or alternatively mpv udp://@0.0.0.0:5000

Then wait a bit as the stream gets buffered. Nothing appears for a little while and then the mpv video window will pop up showing you the webcam output of the sender machine. The audio works very well - didn't seem to have any audio delay (so audio/video will be out of sync by default, but as I say, using a simpler codec than libx264 will probably give better results in terms of sync - you just need to experiment... I may experiment with other video codec; things like mjpeg, MPEG-1, MPEG-4/10 maybe, though I don't know off the top of my head which can be used to stream (I'll install old pavrecord to help me test some of these alternatives out conveniently on my machine, since it used some of these, until I find low lag video ffmpeg streaming command from its logs).

Should also be able to send to say an Android if you have a suitable media player on it (for example: VLC for Android, MX Player etc).

https://www.tomsguide.com/round-up/best-android-video-players

So perhaps somebody so inclined (which isn't me) can make a gtkdialog utility/app to make above easier, or to enhance PSip or something?...
A similar post: http://www.murga-linux.com/puppy/viewtopic.php?p=206406#206406 is what got PSip started come to think of it http://murga-linux.com/puppy/viewtopic.php?t=31061 Wink

EDIT: NOTE WELL For 'some' older and some newer ffmpeg, which either don't understand thread_queue_size or filter_complex asyncts, or both, you need step 2 above modified to:

NOTE WELL: Use the IP address of YOUR receiver machine, which may not be 192.168.1.8

Code:
ffmpeg -y -f alsa -ac 2 -ar 44100 -i plughw:0,0 -thread_queue_size 64 -f video4linux2 -s 640x480 -i /dev/video0 -r 30 -c:v libx264 -preset superfast -crf 23 -pix_fmt yuv420p -c:a libmp3lame -ac 2 -ar 44100 -b:a 192k -f mpegts -threads 0  -flush_packets 0 udp://192.168.1.8:5000?pkt_size=1316


OR:

For the ffmpeg that comes with BionicDog (and therefore I expect BionicPup) you don't want filter_complex asyncts but thread_queue_size is good, so could use:

Code:
ffmpeg -y -thread_queue_size 512 -f alsa -ac 2 -ar 44100 -i plughw:0,0 -thread_queue_size 64 -f video4linux2 -s 640x480 -i /dev/video0 -r 30 -c:v libx264 -preset superfast -crf 23 -pix_fmt yuv420p -c:a libmp3lame -ac 2 -ar 44100 -b:a 192k -f mpegts -threads 0  -flush_packets 0 udp://192.168.1.8:5000?pkt_size=1316


I'll report back some time later if/when I find a faster streaming video codec that works with less or no video lag (but lower video quality). Meanwhile just experiment with that yourself - it is actually simpler to try than libx264, which requires lots of extra ffmpeg parameters for best results.

EDIT2: I'm only just trying on other than XenialDog64 and I'm getting error message on my BionicDog64, which I'm currently looking into... So fine on XenialDog, if you want to try that. BionicDog64 currently giving me error:

Code:
Unable to find a suitable output format for 'udp://192.168.1.8:5000?pkt_size=1316'
udp://192.168.1.8:5000?pkt_size=1316: Invalid argument


Looks at a glance that newer (Bionic) ffmpeg needs a different format for udp streaming, but I don't know yet.

EDIT3: Well 'was' working on my XenialDog64 system, but for some reason I'm now getting above error message on that too... I must have done something I can't immediately remember on my first attempts (which all worked), I guess. I'll keep trying till I sort this out but I can at least assure you it can be made to work... Wink

EDIT4: I think I fixed it above now. I had accidentally missed out -f mpegts when I posted to murga forum. Note that I have only tried on XenialDog64 just now. Going to try on BionicDog in a moment, all going well... As I said, the main ffmpeg came from weX. I note that weX has duplicated some audio options in line above, so can be simplified (should work fine as is though).

wiak

_________________
New Puppy/Dog forum: https://puppylinux.rockedge.org
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
wiak

Joined: 11 Dec 2007
Posts: 1957
Location: not Bulgaria

PostPosted: Thu 26 Mar 2020, 22:02    Post subject:  

Have now tried ffmpeg audio/video streaming on local LAN per my above post on both XenialDog64 and BionicDog64 and both working as described (so should be able to make working on XenialPup or BionicPup using official ubuntu ffmpeg released for these). Note that it is very important to get the receiver IP address correct or you will get a "Cache is not responding - network slow/stuck network connection" error on the receiving machine.

I will try and simplify the ffmpeg line (since as I said there seems to be some duplicated options; though maybe not, ffmpeg is pretty fussy about input and output options and I new better what I was doing when I wrote weX, so maybe best to leave alone...) and also to try alternative encoding to try and remove the video lag. Video quality excellent though (of course, it is using same excellent quality settings as in weX...), and audio good too (using mp3 but could change to aac with appropriate option modifications).

If no-one else gets round to writing a gtkdialog or yad frontend to this I might get round to doing so later, but for the moment I'm more interested in experimenting with the commandlines involved to try and minimise audio/video lag. If I could eliminate that it would provide a convenient way of watching the main room TV when I have to rush to the toilet when a movie is on... (just point my laptop webcam/microphone at the TV and use an android phone/tablet as the receiver...) It is useful already for communicating with anyone quarantined in another room or building.

EDIT: I'm beginning to suspect the video lag may be cache buffering at the receiver end, but I'm not sure, and don't know how to remedy that at present. But I had though audio would be interleaved with the video, so I'm not sure what the issue actually is - maybe the audio being interleaved late at sender (but I have no idea...). I've tried MPEG4-10 in form of vcodec libxvid, but still have video lagging audio by several seconds on my machines connection.

EDIT2: Ok!!! The following worked for me without delay between video and audio. Not sure what video codec used here... default one I guess. I have to remind myself ffmpeg - haven't worked with it since making weX and pAVrecord prior to that:

Code:
ffmpeg -y -f alsa -ac 2 -ar 44100 -i plughw:0,0 -f video4linux2 -s 640x480 -i /dev/video0 -r 10 -c:a libmp3lame -ac 2 -ar 44100 -b:a 192k -f mpegts -flush_packets 0 udp://192.168.1.8:5000?pkt_size=1316


And, as in above post, on receiver ( 192.168.1.8 ) you can playback with mpv (or mplayer or VLC or say MX Player on Android) with (for mpv):

Code:
mpv udp://@127.0.0.1:5000

or alternatively mpv udp://@0.0.0.0:5000

Note that there was a delay before image and audio were received, but they did get received in sync, which is what I am looking for, so trick is to use a simpler codec than libx264 on slower machines like mine anyway... Again, it is important that the udp IP address is that of the receiving machine or you'll get error message about cache etc... I'm guessing mjpeg cause of option -f mpegts. Need to check. EDIT: No, mpegts is a 'container' I think - more research needed... I think might be using mpeg2 as default video encoder, which is fine, and mp2 as the default audio encoder, which might be fine too (in which case ffmpeg option "-c:a libmp3lame" could maybe also be removed (though not sure on congestion effect on network if less compression being used by a particular codec and/or the effect on receiver or sender buffer/caches getting somehow swamped).

Not sure if you need the "?pkt_size=1316" or if can add "-tune zerolatency" to above options (can't test further at present since other machine now being used by my son...). Anyway, main code above seems to work - will try to watch TV next time I need to rush to the toilet... Wink

EDIT: NOTE WELL: for audio/alsa, you may well need to change option "-i plughw:0,0" to match your own hardware setup. Might need changed to, for example, -i plughw:0,1 (or 1,0 or 1,1) or even, direct with, -i hw:0,0 (etc), and different if wanting to use pulseaudio instead. If you install weX and play with that you can find out a lot more about such options from its help info (including hovering over its entry boxes), but I think original had an error in help for pulseaudio unfortunately - latest weX on the Dogs may have its help support fixed. But remember, you DO NOT require weX for any of the above - it is just ffmpeg required.

wiak

_________________
New Puppy/Dog forum: https://puppylinux.rockedge.org
Tiny Linux Blog: https://www.tinylinux.info/
Check Firmware: http://murga-linux.com/puppy/viewtopic.php?p=1022797
Back to top
View user's profile Send private message 
greengeek


Joined: 20 Jul 2010
Posts: 5717
Location: Republic of Novo Zelande

PostPosted: Fri 27 Mar 2020, 03:36    Post subject:  

wiak wrote:
And, as in above post, on receiver ( 192.168.1.8 ) you can playback with mpv (or mplayer or VLC or say MX Player on Android) with (for mpv):

Code:
mpv udp://@127.0.0.1:5000

or alternatively mpv udp://@0.0.0.0:5000
Thanks wiak - can you explain why the mpv syntax does not contain the IP of the originating PC? I am confused by this as I would have expected the receiver to need a specific IP to hunt for.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [36 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0751s ][ Queries: 13 (0.0075s) ][ GZIP on ]