Streaming video with VLC from webcam - errormain access out error: socket bind error (Permission denied) - sockets

I would like to use the webcam of my old laptop (my laptop is a Packard Bell EasyNote MX37) in order to do streaming video.
I try to do this streaming video through VLC by following this tutorial from Ubuntu 14.04 LTS.
Unfortunately I'm stuck when I apply this command line :
cvlc v4l2:///dev/video0 :v4l2-standard= :input-slave=alsa://hw:0,0
:live-caching=300
:sout="#transcode{vcodec=WMV2,vb=800,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:8080/stream.wmv}"
Indeed, I get this error message:
VLC media player 2.1.6 Rincewind (revision 2.1.6-0-gea01d28)
[0x19....] dummy interface: using the dummy interface module...
[0x7f1................] main access out error: socket bind error (Permission denied)
[0x7f1................] main access out error: socket bind error (Permission denied)
[0x7f1................] main access out error: cannot create socket(s) for HTTP host
[0x7f1................] access_output_http access out error: cannot start HTTP server
[0x7f1................] stream_out_standard stream out error: no suitable sout access module for `http/asf://:8080/stream.wmv'
[0x7f1................] main stream output error: stream chain failed for `transcode{vcodec=WMV2,vb=800,acodec=wma2,ab=128,channels=2,samplerate=44100}:http{dst=:8080/stream.wmv}'
[0x7f1................] main input error: cannot start stream output instance, aborting
Thanks a lot for your help!
PS: The goal is to keep an eye on my parking space.

Just like the error message says, VLC is not allowed to open the port you specified. This might be because it is already in use by another app on your OS or because your user account simply does not have the rights needed to open a port. Consider using a different port like 32000, etc.

Related

why is loading image from network using uri gives 'Failed host lookup' in flutter?

when i try to load image from network error using URL in android emulator .
Image.network('https://images.unsplash.com/photo-1547721064-da6cfb341d50',
height=350)
the following error appears
The following SocketException was thrown resolving an image codec:
Failed host lookup: 'images.unsplash.com' (OS Error: No address associated with hostname, errno = 7)
Did you add the required permissions? See https://docs.flutter.dev/development/data-and-backend/networking
For me in a simple PoC this works fine.
If you did add permissions, it is likely an issue with your network, the device might simply not have a connection.

Flutter - Socket.Connect() - SocketException: OS Error: Connection timed out

When I was working on debug mode (with "flutter run") by using my device (real), Socket.Connect() method doesn't work.
Also I would like to say that this Connect method is in "dart:io" library.
In shortly;
I opened a server (TCP) with Python.
I wrote the Flutter client like below to be able to connecting to the server in Python.
Future den() async {
print("Started");
Socket sock = await Socket.connect("192.168.0.159", 5431);
print("Done +++++++++++++++++++++++++"); }
However, I took a SocketError as Connection time out.
The error message I took:
E/flutter (17655): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: SocketException: OS Error: Connection timed out, errno = 110, address = 192.168.0.159, port = 43836
NOTE:
I tried to change the manifest file by adding INTERNET permission, but it is not working.
It was a strange problem, because there is no problem the code I shared. Windows Defender performed a rule to block to open a port as server. Hence, I started the server on my machine, however, I couldn't connect it from my Android device.
Maybe, the error code that is shown by Flutter isn't clear. If you took a error about socket programming for connection or binding, looking to Defender (or firewall) can be affective method. Unfortunately, as I was just starting to learn Flutter, I thought of checking out Defender afterwards.

How to disable Tensorflow js error log for my server host?

As if right now I am in a bit of a rush to get an answer to my problem. The model has been trained and the server works locally with the NN running in the background, but on the server we get the following error message:
2020-04-08 11:54:15.787274: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency: 2799865000 Hz
2020-04-08 11:54:15.787801: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x4b5ca00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-04-08 11:54:15.787830: I tensorflow/compiler/xla/service/service.cc:176] StreamExecutor device (0): Host, Default Version
terminate called after throwing an instance of 'std::system_error'
what(): Resource temporarily unavailable
It seems that the server host doesn't like the fact that Tensorflow is trying to log the following error/warning message:
2020-04-08 11:53:42.453164: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to
use: AVX2
Is there a way in JS to disable these error logs so we can run the trained model on the server? Thanks in advance!

alsa cannot read control invalid argument - raspberry pi

I am trying to record audio with the PS Eye on a raspberry pi model b plus (I have tried with older b models and the same issue occurs as below).
I am able to record, and playback the recording with arecord/aplay so the mic is working. However, I want to increase the mic volume as the recording is very low.
When I attempt this in alsamixer, it exits with the following error when I use F6 to change to the PS Eye soundcard:
cannot load mixer controls: Invalid argument
I also notice that the alsa-utils service will fail when the PS Eye is plugged in (fine otherwise):
sudo service alsa-utils restart
[FAIL] Shutting down ALSA...warning: 'alsactl store' failed with error message 'alsactl: get_control:259: Cannot read control '2,0,0,Mic Capture Volume,0': Invalid argument'...failed.
[....] Setting up ALSA...warning: 'alsactl restore' failed with error message 'No state is present for card CameraB409241
Found hardware: "USB-Audio" "USB Mixer" "USB1415:2000" "" ""
Hardware is initialized using a generic method
No state is present for card CameraB409241'...amixer: Mixer hw:1 load error: Invalid argument
amixer: Mixer hw:1 load error: Invalid argument
amixer: Mixer hw:1 load error: Invalid argument
amixer: Mixer hw:1 load error: Invalid argument
amixer: Mixer hw:1 load error: Invalid argument
...
done.
The problem seems to be the controls definition of the PS Eye. I would like to know the following:
Where does alsamixer load the controls for a particular device from? Are they in the driver?
Is there a way to increase the mic volume another way?
I am not using Pulseaudio yet but will try it if I can't fix this in alsa.
thanks
Sytem logs:
Without pulseaudio installed, neither restarting alsa or trying to open the controls in alsamixer produce anything in the system log. If pulse audio is installed however, trying to open the controls in alsamixer gives:
Oct 30 10:21:26 signaler pulseaudio[19000]: [pulseaudio] alsa-util.c: Unable to load mixer: Invalid argument
Oct 30 10:21:27 signaler pulseaudio[19000]: [pulseaudio] server-lookup.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Oct 30 10:21:27 signaler pulseaudio[19000]: [pulseaudio] main.c: Unable to contact D-Bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11

java.net.SocketException : permition denied on simulator for socket program

java.net.SocketException : permition denied . on simulator for socket program.
When i am executing the program from simulator for socket it throws java.net.SocketException : permition denied exception but when i am running same code on the tablet, it get response from the socket server.
Do i have to setup anything to run socket program using simulator??
Problem is resolved now..
we have to update Manifest file by allowing security level to internet outside the application tag.