rtmpt protocol dump handshake error - rtmp

When I try to dump rtmpt protocol with rtmpdump in Ubuntu, I got this error:
ERROR: RTMP_Connect1, handshake failed.
I would like to dump:
rtmpdump -v -r "rtmpt://37.130.228.52:80/atv/atv3"

I solved the problem. First of all the ip addresses for rtmp url was changing between few ip addresses.When I try the other ip numbers it was connecting to the rtmp but it was being rejected instantly. This was due swf verification, that is some rtmp urls also needs swf verification. Hence, when I typed as follow it successfully play on vlc player.
rtmpdump -v -r "rtmpt://..../atv/atv3" -s http://....swf?i=1 | vlc -
Next problem is that I want to play this rtmp with avconv/avplay not with vlc player. I could not give swfurl parameter succesfully in avplay. Instead this we can also dump with rtmpdump first and pipe it with avplay or avconv but I could not achieve this as well.
Edit: Second problem is solved with
rtmpdump ...... | avplay -i pipe:0

Related

How to print GPS location to stdout (Ubuntu 16.04 / 18.04)?

I'm a complete newbie with GPS devices on Linux.
I have a GlobalSat G-STAR IV USB device and I would just like to get the GPS location (lat, long) printed to stdout. How can I achieve that? I'm reading about gpsd, but not sure how to get the actual location. The documentation seems old.
Any common tools etc for this?
It seems that with
$ sudo stty -F /dev/ttyUSB0 4800
$ sudo cat /dev/ttyUSB0
I can read some NMEA(?) data from the device:
$GPGGA,113935.199,,,,,0,00,,,M,0.0,M,,0000*5B
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,113935.199,V,,,,,,,100918,,,N*41
$GPGGA,113936.186,,,,,0,00,,,M,0.0,M,,0000*56
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,113936.186,V,,,,,,,100918,,,N*4C
$GPGGA,113937.185,,,,,0,00,,,M,0.0,M,,0000*54
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
$GPRMC,113937.185,V,,,,,,,100918,,,N*4E
$GPGGA,113938.200,,,,,0,00,,,M,0.0,M,,0000*55
$GPGSA,A,1,,,,,,,,,,,,,,,*1E
I still don't see $GPGLL that should contain the location..?
Edit: I also get this:
$ sudo gpsd /dev/ttyUSB0 -N
gpsd:ERROR: can't bind to IPv4 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
gpsd:ERROR: can't bind to IPv6 port gpsd, Address already in use
gpsd:ERROR: maybe gpsd is already running!
I have killed all gpsd instances and deleted the socket, but still getting that..
The output you posted from sudo cat /dev/ttyUSB0 is what you would expect for a GPS module, which does not (yet) have a fix, i.e. it does not have enough information to calculate its current position (+other information).
The only information provided by the messages is the current time of day, 11h39m35s, etc. Out of the messages you receive from your GPS module, not only the $GPGLL message can tell you about your location, but also the $GPGGA and $GPRMC messages that you do receive. If your module had a fix, you would not see several commas in a row but actual values in between.
More details about the format of the different messages can be found in this overview.
What is the likely root cause for the missing GPS fix (assuming your hardware + antenna are fine)?
You have just started using this module fresh from the factory and it needs some time to get ahold of its coordinates. The time to first fix for such a brand new device can be up to 15 minutes.
The GPS signal strength is not strong enough at the location of your module.
Therefore my advice:
Make sure that at your location, the GPS signal from the satellites is strong enough. Ideally by moving outdoors.
When your module has never had a fix before, give your module some time. Wait for up to 20 minutes.
GPSD:
GPSD, if installed, is normally started automatically, when you plug in a GPS module. You can check the current status with
systemctl status gpsd.service
systemctl status gpsd.socket
If active, the gpsd deamon reads out the GPS-data coming via the serial interface and provides it to other applications via a socket on a specific port (default: port 2947). In that case the serial port is not accessible anymore by serial monitors.
Steps to make this device work were:
# Switch the device to NMEA mode
sudo gpsctl -f -n /dev/ttyUSB0
# Set baudrate to 4800
sudo stty -F /dev/ttyUSB0 4800
# Start gpsd
gpsd -S 4000 /dev/ttyUSB0
Now create a TCP/IP socket connection to localhost:4000 and say ?WATCH={"enable":true,"json":true}; or use libgps etc:
http://www.catb.org/gpsd/client-howto.html

GPG key forwarding on Debian

I'm trying to use the private key from my openpgp card from my Debian laptop to a RPi. I followed the different hints found on google, in particular:
extra-socket in ~/.gnupg/gpg-agent.conf
removed it again when founding that this extra socket already will be created in /run/user/<uid>/gnupg
forward this socket using ~/.ssh/config
Host homegear
HostName homegear
RemoteForward ~/.gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra
changed the order of the both sockets in the RemoteForward line since I'm always confused which one should be the first one
add the following into /etc/ssh/sshd_config of the RPi
StreamLocalBindUnlink yes
reload the gpg-agent on the laptop
open new ssh connection to RPi
But I always get
Warning: remote port forwarding failed for listen path ~/.gnupg/S.gpg-agent
when connecting to the RPi.
openssh on both laptop and RPi is 7.4 (Debian Stretch), gpg is 2.1.18.
Forwarding the agent connect to be used as ssh private key (for connecting to gitlab from RPi) works perfectly, forwarding gpg private key (for signing commits) doesn't. I'm a bit helpless at the moment. Is there anything obviously wrong? Or is there still a problem with forwarding unix domain socket and I need to use the socat workaround?
Thank you!
I've run into exactly the same issue except between two Macs running 10.14.2 and GPG 2.2.11, and the only way I was able to get it to work was to specify the absolute path to the sockets on both ends. :( Having a relative path for either the remote or local socket both failed in various ways, which makes it a bit of a pain if you're connecting as different usernames on various machines.
I was able to work around that by specifying a number of different Match exec blocks in my ~/.ssh/config:
# Source machine is a personal Mac, connecting to another personal Mac on my local network
Match exec "hostname | grep -F .core" Host *.core
RemoteForward /Users/virtualwolf/.gnupg/S.gpg-agent /Users/virtualwolf/.gnupg/S.gpg-agent.extra
# Source machine is a personal Mac, connecting to my Linux box
Match exec "hostname | grep -F .core" Host <name of the host block for my Linux box>
RemoteForward /home/virtualwolf/.gnupg/S.gpg-agent /Users/virtualwolf/.gnupg/S.gpg-agent.extra
# Source machine is my work Mac, connecting to my Linux box
Match exec "hostname | grep -F <work machine name>" Host <name of the host block for my Linux box>
RemoteForward /home/virtualwolf/.gnupg/S.gpg-agent /Users/<work username>/.gnupg/S.gpg-agent.extra
(SSH bits are taken from this answer).

docker Mule-server curl: (56) Recv failure: Connection reset by peer

This might just be my rookie knowledge of Docker,
but I can't get the networking to work.
I'm trying to run a Mule-server via the pr3d4t0r/mule repository.
I can run it, hot-swap applications but I can reach it.
I can run a local server without Docker, and it works flawlessly.
But not when I try it with Docker.
When I try to do a simple curl command I get "curl: (56) Recv failure: Connection reset by peer"
curl http://localhost:8090/Sven
I have tried exposing the ports via -P and separately via -p 8090:8090 but no luck.
When the docker is running it blocks the ports (I tried running Docker and the normal server at the same time but the normal one said the ports where already in use).
When I try another Image like jboss/wildfly and I use -p 8080:8080 there's no problem, it works perfectly.
The application in the mule-server will log and respond a simple "hello World", the output says that the application is deployed, but no messages or logging while I try to reach it.
Any suggestions?
In my case it was actually the app that was configured incorrectly. It had localhost as host. It should have been 0.0.0.0 without this it was acting only on localhost aka the docker container but not from outside of it.
You should not need to use -net=host.
So check if there's a configuration
In application.properties need set 0.0.0.0 ip not 127.0.0.0.
error
"curl: (56) Recv failure: Connection reset by peer"
mean that no process in docker image listening to the port. Option -p is bind of port in host system and image.
-p <port in host os to be binded to>:<port in container>
So, check your image, maybe your app in container use different port and you need
-p 8080:8090
if you have this , comment or remove it, server.address=localhost in your application.properties

IP camera with RTSP on the web, RED5 and ffmpeg

i have a ip camera with rtsp protocol and i want to stream on the web using flash video. I know i can use vlc but i do not want to use that.
I installed red5 and ffmpeg for convert RTSP to RTMP
ffmpeg -i "rtsp://46.13.85.43:8020/ch0.h264" -f flv -r 25 -s 640x480 -an "rtmp://localhost/live"
and result is: UDP timeout. retrying with TCP
Any idea where is the problem ?
You have to specify that tcp protocol is used, or at least that helped me. Please add this parameter -rtsp_transport tcp to your ffmpeg command.

modifying the flow of the apache web server

I'm decoding video get via http using gstreamer. To do that I've stored multimedia files (ogg, mp4) in my apache htdocs directory. And then I can decode them with gstreamer using the following pipeline command :
gst-launch souphttpsrc location=http://localhost/data/ ! oggdemux ! vorbisdec ! audioconverter ! autoaudiosink
In order to simulate the lost of paquets in an heavy load network connection. I wounder if it is possible to configure the trafic of the Apache web server to drop some specific paquets (from ogg or mp4 for example) or slow down the flow?
What I need to do in order to archive that.
I'm using Apache 2 install in xampp.
thanks for any reply.
Finally it get the answer from this other question here. It's not the web server to do that but the system and in my case It's Linux who will do that using the command tc
sudo tc qdisc change dev eth0 root netem loss 0.1%|
for example