Plase give me example of the command line on the server VLC and the command line on the client (g-streamer) protocols may be (udp,rtsp,rtp) but prefer rtsp
For RTSP the examples is as follows :-
*Run on the server:
vlc -vvv input_stream --sout '#rtp{dst=192.168.0.12,port=1234,sdp=rtsp://server.example.org:8080/test.sdp}'
On the client:-
vlc rtsp://server.example.org:8080/test.sdp
Related
I am trying to stream videos from my M1 Macbook pro's webcam to AWS Kinesis Video Streams using GStreamer. By following the instructions on this post I was able to start an RTP stream using the following command:
ffmpeg \
-f avfoundation \
-pix_fmt yuyv422 \
-video_size 640x480 \
-framerate 30 \
-i "0:0" -ac 2 \
-vf format=yuyv422 \
-vcodec libx264 -maxrate 2000k \
-bufsize 2000k -acodec aac -ar 44100 -b:a 128k \
-f rtp_mpegts udp://127.0.0.1:9988
I am able to view the live webcam stream in VLC media player by adding the link rtp://127.0.0.1:9988 to networks, so I know it is working via RTP (note, however, that rtsp://127.0.0.1:9988 does NOT work). When I try and send the webcam's view to a Kinesis video stream in AWS via GStreamer, the command errors out. I am running the GStreamer element inside a docker container, and using the command:
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:9988 short-header=TRUE ! rtph264depay ! h264parse ! kvssink stream-name=<my stream name> storage-size=128 access-key=<My account's access key> secret-key=<My account's secret key>
This command successfully detects the correct stream on AWS but ultimately fails with the output:
Stream is ready
Pipeline is live and does not need PREROLL ...
Progress: (open) Opening Stream
Progress: (connect) Connecting to rtsp://127.0.0.1:9988
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Could not open resource for reading and writing.
Additional debug info:
gstrtspsrc.c(6842): gst_rtspsrc_retrieve_sdp (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Failed to connect. (Generic error)
ERROR: pipeline doesn't want to preroll.
I have tried setting the location parameter in the gst-launch-1.0 command to rtsp://127.0.0.1:9988, udp://127.0.0.1:9988, and rtp://127.0.0.1:9988, but none of these work, as GStreamer specifically requires a RTSP address. Is there a way to stream via the webcam with RTSP, or a way to send an RTP/UDP stream to Kinesis Video Streams?
i use cURL (installed via vcpkg). Also openssl installed via vcpkg for a c++ project on VS 2019.
The problem:
CURLE_UNSUPPORTED_PROTOCOL = curl_easy_perform(curl);
I used this example:
https://curl.haxx.se/libcurl/c/ftpsget.html
with corrected connection and file data. The FTP server is filezilla. I checked the connection and file
download with filezilla client. All fine.
When i use the sample from link, i get the CURLE_UNSUPPORTED_PROTOCOL and in my FTP server i can't see
any connection try.
The error is described like this:
The URL you passed to libcurl used a protocol that this libcurl does not support..
Verbose information is:
* STATE: INIT => CONNECT handle 0x148090e0b38; line 1356 (connection #-5000)
* Protocol "ftp" not supported or disabled in libcurl
* Closing connection -1
* Expire cleared (transfer 0x148090e0b38)
I check the internet for the error message above and none of those i found solved my problem.
It seems not to be a format problem or problem related to wrong url .
So my question is, where can i enable this ? Do i need additional packages ? Or is the problem elsewhere ?
Many thanks
Mean while i figured out how to accomplish this using latest curl command line tool (version 7.68.0) on windows:
curl -u my_user:my_password --ftp-ssl ftp://my_ip/my_relative_path/my_file --insecure -o my_file
The file for download is on a server where a FileZilla FTP server is working. This server cyphers with a self created cert. The curl client only accepts this, when using flag:
--insecure
So far, i could not find the related options for my c++ curl. Perhaps it is not possible at all, because sources available through vcpkg are not (yet) up to date. But i want to stick with vcpkg. For me, this solutions: using command line tool instead, works fine.
One more hint, which is important: curl version 7.64.00 works NOT. You get error:
curl: (35) schannel: failed to receive handshake, SSL/TLS connection failed
In the end I would like to take an RSTP stream from an Axis security camera, and then make it available for re streaming using Gstreamers GstRTSPServer object. For now though I cannot even get the example videotestsrc to play in any player.
I have been following the post found here:
GStreamer Launch RTSP Server for ReStreaming IP Camera H264
I have gotten the example code built and running in a console, but am unable to view the stream in any players I find. EXACT code I am using found here:
https://github.com/GStreamer/gst-rtsp-server/blob/master/examples/test-readme.c
Both Windows 10 computers I am using are on the same network, I can ping both directions, firewall is completely off on both computers.
I have tried VLC player, Axis Media Control SDK modified examples, and GStreamer
using commands:
gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/test latency=0 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink
gst-launch-1.0 rtspsrc location=rtsp://10.2.3.10:8554/test latency=0 ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink
VLC is stating in logs that the connection was actively refused. It seems it is trying to connect to port 80? Not sure if I am reading that correctly. See VLC log below. Full log is pasted here from local machine:
https://pastebin.com/my3kTsRV
and here from a second machine:
https://pastebin.com/g1q47UBm
...Connection to server failed: No connection could be made because the target machine actively refused it
Opening connection to 127.0.0.1, port 80...
...Connection to server failed: No connection could be made because the target machine actively refused it
[06421494] live555 demux debug: connection error -10057
[06421494] live555 demux error: Failed to connect with rtsp://127.0.0.1:8554/test
The Axis Media Control (AMC) is trowing this for an error on both the local and secondary computers:
503 Service Unavailable
The maximum number of clients are already connected.
Trying to connect using the GStreamer command I get the following error, on both local and secondary computers:
ERROR: from element /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0: Unhandled error
Additional debug info:
gstrtspsrc.c(5633): gst_rtspsrc_send (): /GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0:
Service Unavailable (503)
ERROR: pipeline doesn't want to preroll.
With VLC, AMC and GStreamer I am able to pull a stream directly from a camera, so something works at least. I am also able to successfully run other GStreamer examples, without the GstRTSPServer, successfully.
Let me know if you want/need me to try anything.
I have a webservice which is developped by Tornado. Now I use FFmpeg to post video stream data to service. After some time, the process is down and rise an error like:
[I 170928 07:33:55 http1connection:253] Malformed HTTP message from 172.18.130.125: chunked body too large
I use command like:
ffmpeg -s 1240x720 -f video4linux2 -i /dev/video0 -b:v 0 -q:v 1 -f mpegts -c:v mpeg1video -b 800k -r 30 http://10.4.245.152:9090/video/live
Should I use ffmpeg to continue post video stream to a webservice?
As I test, I think the reason of this problem is about service server. I check my service server and find the size of chunk data is limit.
I'm running Windows and I'm connected to a webcam via stand-alone Video Servers.
I'm trying to save the stream to file using gstreamer,
with the following command:
gst-launch-1.0 rtspsrc location=rtsp://10.0.0.115/?multicast/mpeg4 ! decodebin ! mpegtsmux ! filesink location=D:\SomeDir\Somefile.mp4
But I get the following error:
ERROR: from element
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0 :Internal
data flow error. Additional debug info: gstbasesrc.c(2943):
gst_base_src_loop (): /GstPipeline:pipeline0/GstRTSPSrc:rtsp
src0/GstUDPSrc:udpsrc0:
Any ideas why?