mofarrell / p2pvc Goto Github PK
View Code? Open in Web Editor NEWA point to point color terminal video chat.
License: MIT License
A point to point color terminal video chat.
License: MIT License
After ./p2pvc 127.0.0.1 -v
in terminal, too much noise. No mic or speakers plugged, not mute the sound.
I have looked at a few source files for your current software. I have noticed that some checks for return codes are missing.
Would you like to add more error handling for return values from functions like the following?
wish skin do you use it on your os
Your terminal looks interesting! 😄
And I can not get what to write before make command . I am very interested to taste this task . But 6 month ago I failed . Now determined to taste this . Please help
as soon as i define video width of more than 99 chars, p2pvc segfaults
gcc -Isrc/inc -O2 -Wall -DPA_USE_ALSA pkg-config --cflags opencv
objs/audio.o objs/display.o objs/p2plib.o objs/p2pvc.o objs/pa_allocation.o objs/pa_converters.o objs/pa_cpuload.o objs/pa_debugprint.o objs/pa_dither.o objs/pa_front.o objs/pa_process.o objs/pa_ringbuffer.o objs/pa_stream.o objs/pa_trace.o objs/pa_unix_hostapis.o objs/pa_unix_util.o objs/video.o -o p2pvc -lpthread -lncurses -lportaudio -lm pkg-config --libs opencv
objs/pa_unix_hostapis.o:(.data+0x0): undefined reference to `PaAlsa_Initialize'
collect2: ld returned 1 exit status
make: *** [p2pvc] Error 1
Hi.
I created a aur package for this nifty program: https://aur.archlinux.org/packages/p2pvc-git/
If you have any objections / remarks please let me know (e.g. license).
Cheers
FUCK:p2pvc tx$ brew install ncurses portaudio opencv
Warning: ncurses-5.9 already installed
Warning: portaudio-19.20140130 already installed
Warning: opencv-2.4.10.1 already installed
FUCK:p2pvc tx$ git log | grep commit | head -n 1
commit 53deb08bc1904171ae777f337be781f93f174063
FUCK:p2pvc tx$ make
uname: illegal option -- o
usage: uname [-amnprsv]
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO `pkg-config --cflags opencv` src/audio.c -c -o objs/audio.o
src/audio.c:34:10: fatal error: 'portaudio.h' file not found
#include <portaudio.h>
^
1 error generated.
make: *** [objs/audio.o] Error 1
$ make
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO pkg-config --cflags opencv
src/audio.c -c -o objs/audio.o
src/audio.c:34:10: fatal error: 'portaudio.h' file not found
^
1 error generated.
make: *** [objs/audio.o] Error 1
Hi, I believe I have installed portaudio properly, why does this show every time? I can see portaudio.h in my usr/local/include/, what should I do? Many thanks.
I suggest to reuse a higher level build system than your current small make file so that powerful checks for software features will become easier.
Hello,
I would like to thank you for p2pvc but I cannot install it on OS X (10.10.3 Beta 1). I have Homebrew installed and did install the depending packages like so, because at least with one package I got an error notice when I first tried to "make" p2pvc:
brew install homebrew/science/opencv
brew install pulseaudio
brew install ncurses
When all those installs are finished I'm still confronted with error messages, when I try to "make" p2pvc:
src/p2plib.c:275:7: warning: implicit declaration of function 'clock_gettime' is invalid in C99 [-Wimplicit-function-declaration]
clock_gettime(CLOCK_MONOTONIC, &prevPacket);
^
src/p2plib.c:275:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &prevPacket);
^
src/p2plib.c:278:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &currPacket);
^
src/p2plib.c:280:21: error: use of undeclared identifier 'CLOCK_MONOTONIC'
clock_gettime(CLOCK_MONOTONIC, &prevPacket);
^
Any help would be appreciated.
Kind regards.
gcc -I / usr / local / include / opencv -I / usr / local / include
-Isrc / inc -O2 -Wall -DPA_USE_ALSA src / video.c -c -o objs / video.o
/ bin / sh: -I / usr / local / include / opencv: There is no such file or directory
src / video.c: 1: 10: fatal error: cv.h: There is no such file or directory
#include <cv.h>
^ ~~~~~
compilation aborted.
make: *** [Makefile: 49: objs / video.o] Error 1
Running Ubuntu 14.04
Cheese and other webcam tools open my camera fine but p2pvc does not do anything.
When I launch p2pvc one of my CPU cores jumps to 100% and stays there until the program is terminated. It shows "User defined signal 1" upon termination. Using "-e" does nothing.
gcc -Isrc/inc -O2 -Wall -DPA_USE_COREAUDIO pkg-config --cflags opencv
src/video.c -c -o objs/video.o
In file included from src/video.c:1:
In file included from /usr/local/Cellar/opencv/3.4.0/include/opencv/cv.h:63:
In file included from /usr/local/Cellar/opencv/3.4.0/include/opencv2/core/core_c.h:48:
/usr/local/Cellar/opencv/3.4.0/include/opencv2/core/types_c.h:929:13: warning: implicit declaration of function
'cvRound' is invalid in C99 [-Wimplicit-function-declaration]
ipt.x = cvRound(point.x);
^
src/video.c:18:8: error: unknown type name 'CvCapture'
static CvCapture* cv_cap;
^
src/video.c:52:3: warning: implicit declaration of function 'cvReleaseCapture' is invalid in C99
[-Wimplicit-function-declaration]
cvReleaseCapture( &cv_cap );
^
src/video.c:99:12: warning: implicit declaration of function 'cvCaptureFromCAM' is invalid in C99
[-Wimplicit-function-declaration]
cv_cap = cvCaptureFromCAM(0);
^
src/video.c:107:17: warning: implicit declaration of function 'cvQueryFrame' is invalid in C99
[-Wimplicit-function-declaration]
color_img = cvQueryFrame(cv_cap);
^
4 warnings and 1 error generated.
make: *** [objs/video.o] Error 1
Hi,
This repository contains a nice job, however it isn't release without any license or I couldn't find.
Could you consider to add one? people would be clearer if they can use for the purpose that they think.
Many thanks.
This looks like quite the fun little project. It seems like it would be incredibly helpful to be able to specify a width and height of the image so that the full terminal size could be used if the webcam supports the terminal's aspect ratio.
Post installation of the ibncurses-dev libopencv-dev libpulse-dev I was compiling the source code and I got the following error -
mkdir -p objs
gcc -Isrc/inc -O2 -Wall pkg-config --cflags opencv
src/audio.c -c -o objs/audio.o
src/audio.c: In function ‘stream_write_callback’:
src/audio.c:75:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:77:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:77:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
src/audio.c:77:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t’ [-Wformat]
src/audio.c:85:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:85:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
src/audio.c:85:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘size_t’ [-Wformat]
src/audio.c: In function ‘stream_read_callback’:
src/audio.c:109:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c: In function ‘callback’:
src/audio.c:241:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:241:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘size_t’ [-Wformat]
src/audio.c:247:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:251:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
src/audio.c:261:5: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘size_t’ [-Wformat]
gcc -Isrc/inc -O2 -Wall pkg-config --cflags opencv
src/display.c -c -o objs/display.o
gcc -Isrc/inc -O2 -Wall pkg-config --cflags opencv
src/p2plib.c -c -o objs/p2plib.o
gcc -Isrc/inc -O2 -Wall pkg-config --cflags opencv
src/p2pvc.c -c -o objs/p2pvc.o
gcc -Isrc/inc -O2 -Wall pkg-config --cflags opencv
src/video.c -c -o objs/video.o
src/video.c:1:16: fatal error: cv.h: No such file or directory
compilation terminated.
make: *** [objs/video.o] Error 1
Alos, it would be nice if you add to your README that ubuntu users should do the following to install dependencies:
sudo apt-get install libncurses-dev libopencv-dev libpulse-dev
sudo apt-get install libncurses5-dev libopencv-dev portaudio19-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
portaudio19-dev : Depends: libjack-dev
E: Unable to correct problems, you have held broken packages.
sudo apt-get install libjack-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libjack-dev : Depends: libjack0 (= 1:0.121.3+20120418git75e3e20b-2.1ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Any suggestions?
JARVIS:Desktop admin$ brew install portaudio
Warning: portaudio-19.20140130 already installed, it's just not linked
JARVIS:Desktop admin$ sudo easy_install PyAudio
Searching for PyAudio
Reading https://pypi.python.org/simple/PyAudio/
Best match: pyaudio 0.2.8
Downloading http://people.csail.mit.edu/hubert/pyaudio/packages/pyaudio-0.2.8.tar.gz#md5=
Processing pyaudio-0.2.8.tar.gz
Writing /tmp/easy_install-7xXMsw/PyAudio-0.2.8/setup.cfg
Running PyAudio-0.2.8/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7xXMsw/PyAudio-0.2.8/egg-dist-tmp-mkPGUD
warning: no files found matching '*.c' under directory 'test'
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
^
1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1
JARVIS:Desktop admin$ sudo find / -name "portaudio.h"
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
/opt/local/include/portaudio.h
JARVIS:Desktop admin$ export C_INCLUDE_PATH=/usr/local/Cellar/portaudio/19.20140130/include:/usr/local/include; make clean; make
make: *** No rule to make target `clean'. Stop.
make: *** No targets specified and no makefile found. Stop.
JARVIS:Desktop admin$
JARVIS:Desktop admin$
What should I do now ?
Is there some way to choose to not color each character in favor of the current terminal's color scheme? My friends and coworkers really like the "matrix mode" factor, but they want to see themselves in pure, unadulterated green.
Mac osX 10.10.2
brew install ncurses portaudio opencv
Error: No available formula for ncurses
Searching formulae...
Searching taps...
homebrew/dupes/ncurses
Currently there is no video buffering on the receiving end. Irregular rates of data transfer will cause irregular frame rates.
the line in the README export TERM=xterm-color256
should really be export TERM=xterm-256color
.
It is, on debian based systems, provided by the package ncurses-term
- perhaps useful to mention this as well.
The brew instructions need updating.
$ brew tap homebrew/science
Error: homebrew/science was deprecated. This tap is now empty as all its formulae were migrated.
Running on OS X (10.10.1) results in the following error when built with homebrew pulseaudio and openvc:
W: [] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.
Connection failure: Connection refused
pa_context_connect() failed: Connection refused
its a directory
gcc -Isrc/inc -O2 -Wall -DPA_USE_ALSA pkg-config --cflags opencv src/audio.c -c -o objs/audio.o
\In file included from src/audio.c:36:0:
src/inc/pa_util.h:78:9: error: unknown type name ‘PaHostApiTypeId’
PaHostApiTypeId type );
^
src/inc/pa_util.h:91:9: error: unknown type name ‘PaDeviceIndex’
PaDeviceIndex hostApiDevice, PaDeviceIndex device,
^
src/inc/pa_util.h:91:39: error: unknown type name ‘PaDeviceIndex’
PaDeviceIndex hostApiDevice, PaDeviceIndex device,
^
src/inc/pa_util.h:111:35: error: unknown type name ‘PaHostApiTypeId’
void PaUtil_SetLastHostErrorInfo( PaHostApiTypeId hostApiType, long errorCode,
^
src/audio.c:90:5: error: unknown type name ‘PaStreamCallbackTimeInfo’
const PaStreamCallbackTimeInfo timeInfo,
^
src/audio.c:91:5: error: unknown type name ‘PaStreamCallbackFlags’
PaStreamCallbackFlags statusFlags,
^
src/audio.c:114:5: error: unknown type name ‘PaStreamCallbackTimeInfo’
const PaStreamCallbackTimeInfo timeInfo,
^
src/audio.c:115:5: error: unknown type name ‘PaStreamCallbackFlags’
PaStreamCallbackFlags statusFlags,
^
src/audio.c: In function ‘start_audio’:
src/audio.c:169:3: error: unknown type name ‘PaStreamParameters’
PaStreamParameters inputParameters,
^
src/audio.c:212:19: error: request for member ‘device’ in something not a structure or union
outputParameters.device = Pa_GetDefaultOutputDevice(); /* default output device /
^
src/audio.c:212:3: warning: implicit declaration of function ‘Pa_GetDefaultOutputDevice’ [-Wimplicit-function-declaration]
outputParameters.device = Pa_GetDefaultOutputDevice(); / default output device /
^
src/audio.c:213:23: error: request for member ‘device’ in something not a structure or union
if (outputParameters.device == paNoDevice) {
^
src/audio.c:217:19: error: request for member ‘channelCount’ in something not a structure or union
outputParameters.channelCount = NUM_CHANNELS;
^
src/audio.c:218:19: error: request for member ‘sampleFormat’ in something not a structure or union
outputParameters.sampleFormat = PA_SAMPLE_TYPE;
^
src/audio.c:219:19: error: request for member ‘suggestedLatency’ in something not a structure or union
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
^
src/audio.c:219:72: error: request for member ‘device’ in something not a structure or union
outputParameters.suggestedLatency = Pa_GetDeviceInfo(outputParameters.device)->defaultLowOutputLatency;
^
src/audio.c:220:19: error: request for member ‘hostApiSpecificStreamInfo’ in something not a structure or union
outputParameters.hostApiSpecificStreamInfo = NULL;
^
src/audio.c:229:7: error: ‘writeCallback’ undeclared (first use in this function)
writeCallback,
^
src/audio.c:229:7: note: each undeclared identifier is reported only once for each function it appears in
src/audio.c:230:7: warning: passing argument 2 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘PaDeviceID’ but argument is of type ‘void ’
PaError Pa_OpenStream( PortAudioStream stream,
^
src/audio.c:230:7: warning: passing argument 3 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘int’ but argument is of type ‘int ’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:230:7: warning: passing argument 5 of ‘Pa_OpenStream’ makes pointer from integer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘void ’ but argument is of type ‘int’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:230:7: warning: passing argument 8 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘PaSampleFormat’ but argument is of type ‘struct paTestData ’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:230:7: error: too few arguments to function ‘Pa_OpenStream’
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: declared here
PaError Pa_OpenStream( PortAudioStream** stream,
^
src/audio.c:235:18: error: request for member ‘device’ in something not a structure or union
inputParameters.device = Pa_GetDefaultInputDevice(); /* default input device /
^
src/audio.c:235:3: warning: implicit declaration of function ‘Pa_GetDefaultInputDevice’ [-Wimplicit-function-declaration]
inputParameters.device = Pa_GetDefaultInputDevice(); / default input device /
^
src/audio.c:236:22: error: request for member ‘device’ in something not a structure or union
if (inputParameters.device == paNoDevice) {
^
src/audio.c:240:18: error: request for member ‘channelCount’ in something not a structure or union
inputParameters.channelCount = NUM_CHANNELS;
^
src/audio.c:241:18: error: request for member ‘sampleFormat’ in something not a structure or union
inputParameters.sampleFormat = PA_SAMPLE_TYPE;
^
src/audio.c:242:18: error: request for member ‘suggestedLatency’ in something not a structure or union
inputParameters.suggestedLatency = Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency;
^
src/audio.c:242:70: error: request for member ‘device’ in something not a structure or union
inputParameters.suggestedLatency = Pa_GetDeviceInfo(inputParameters.device)->defaultLowInputLatency;
^
src/audio.c:243:18: error: request for member ‘hostApiSpecificStreamInfo’ in something not a structure or union
inputParameters.hostApiSpecificStreamInfo = NULL;
^
src/audio.c:252:7: error: ‘readCallback’ undeclared (first use in this function)
readCallback,
^
src/audio.c:253:7: warning: passing argument 2 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘PaDeviceID’ but argument is of type ‘int ’
PaError Pa_OpenStream( PortAudioStream stream,
^
src/audio.c:253:7: warning: passing argument 3 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘int’ but argument is of type ‘void ’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:253:7: warning: passing argument 5 of ‘Pa_OpenStream’ makes pointer from integer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘void ’ but argument is of type ‘int’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:253:7: warning: passing argument 8 of ‘Pa_OpenStream’ makes integer from pointer without a cast [enabled by default]
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: expected ‘PaSampleFormat’ but argument is of type ‘struct paTestData ’
PaError Pa_OpenStream( PortAudioStream* stream,
^
src/audio.c:253:7: error: too few arguments to function ‘Pa_OpenStream’
&data);
^
In file included from src/audio.c:34:0:
/usr/include/portaudio.h:325:9: note: declared here
PaError Pa_OpenStream( PortAudioStream** stream,
^
make: *** [objs/audio.o] Error 1
Feature request: could you set it up so that it converts local video to ascii and then sends the ascii to the client, thus greatly reducing bandwidth, instead of sending video and processing it locally? I was able to ssh into each other and connect to the localhost, and that worked but at the cost of sound.
You can connect to your own computer and have someone else connect to it and it will try and display both video feeds. You can also connect multiple computers this way. Audio is being kinda buggy but this potentially means super easy conference calls? with a bit of testing this bug could almost be called a feature.
Hi, it compiled everything good without any warning, but when I try to test it locally
"./p2pvc 127.0.0.1 -v", I get a really loud weird noise, and also the screen prints a lot of "Received failed. errno: 22".
Something I might be doing wrong? thanks!
http://www.opus-codec.org/
May be a useful compression library.
Making the video target alone fails because of a bad call to start_video on lines 97 to 101 in video.c. This looks like leftover code, but it causes the build to fail because of the bad arguments.
would it be possible to adopt one of the libcaca's todos (http://caca.zoy.org/browser/libcaca/trunk/TODO?rev=676)?
allow to select the characters that will be used for bitmap
12 rendering, for instance halftoning (░ ▒ ▓ █) and quarter
13 blocks (▀ ▄ ▌ ▐ █ ▖ ▗ ▘ ▝ ▚ ▞ ▙ ▛ ▜ ▟).
not sure if this could extend into: create a custom font (x11/ttf) that would allow for downscaled but very accurate version of bi-color image). in theory unicode has support for 65536 characters, so having a 3x5 (2^15) grid could be possible.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.