Comments (21)
Also - below are the commands I am using and attached my camera settings
//OnUbutntu - RTSP
AWS_ACCESS_KEY_ID=MyKeyID AWS_SECRET_ACCESS_KEY=MySecret./kinesis_video_gstreamer_sample_rtsp_app "rtsp://192.168.0.108:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif" MyOnvifStream1
//FromWindows
ffmpeg -f lavfi -i anullsrc -rtsp_transport udp -i "rtsp://192.168.0.108:554/cam/realmonitor?channel=1&subtype=1&unicast=true&proto=Onvif" -tune zerolatency -vcodec libx264 -t 12:00:00 -pix_fmt + -c:v copy -c:a aac -strict experimental -f flv rtmp://a.rtmp.youtube.com/live2/youtubekey
from amazon-kinesis-video-streams-producer-sdk-cpp.
@francoisdutoit the KVS end-to-end does not modify the encoded bits so the quality should be what your application/pipeline is producing.
I looked at the attached videos. The visual artifacts are not related to the quality of the encoder but the fact that the elementary stream is broken - either the timestamps are incorrect or frames are missing.
Could you please ensure that
- Your application properly submits decoding timestamps and presentation timestamps - those should be properly done. I assume you are using the sample application?
- There are no dropped frames on the producer side. Please run for the duration of the test and collect all the detailed logs so we can see whether there are any dropped frames, failed frames.
- Less likely, your browsers support for MSE might have issues with properly decoding (I wouldn't even consider this at this stage)
from amazon-kinesis-video-streams-producer-sdk-cpp.
The demo RTSP app has been tested with streams having video resolutions of 1900x1200 without any visual quality issues.
- Could you tell us what environment you are running this demo app?
-- what is the Ubuntu configuration ( CPU / Memory / Network / Wired / Wireless Speed )? - Is it possible to run the ffmpeg also in the same environment and send us the screenshots?
Thanks
ss
from amazon-kinesis-video-streams-producer-sdk-cpp.
So running ffmpeg from the ubuntu vm still gives quality results on youtube - the only difference between the two streams is that I am directly pushing a RTSP stream to kinesis and with youtube I am converting the stream to rtmp using ffmpeg and then pushing to youtube.
See attached videos.
Captures.zip
from amazon-kinesis-video-streams-producer-sdk-cpp.
PS: My Windows 10 PC is an i7-7700 4.2Hgz with 16GB Ram
The Ubuntu VM that runs on the windows pc has 8GB of ram assigned.
My line speed is 8-10Mbps
from amazon-kinesis-video-streams-producer-sdk-cpp.
Here is some of the console output from running the kinesis_video_gstreamer_sample_rtsp_app
from amazon-kinesis-video-streams-producer-sdk-cpp.
Check if you have errors from KVS Producer SDK. As I mentioned, please attach the full logs for the run so we can help.
from amazon-kinesis-video-streams-producer-sdk-cpp.
@MushMal - Where can I check for errors on the Producer SDK and where are the log files saved? - I am just running the sample app from the command line
from amazon-kinesis-video-streams-producer-sdk-cpp.
As @MushMal has mentioned the sample app sends the incoming data stream directly to KVS as it is received. The quality of the streams you are seeing in the console relates directly to the stream it receives from the source.
You may want to check your camera options (higher bitrate , subtype ) to send the best quality RTSP stream .
from amazon-kinesis-video-streams-producer-sdk-cpp.
@francoisdutoit by default the sample applications output the logs on the console. You can capture the entire output from the console.
from amazon-kinesis-video-streams-producer-sdk-cpp.
From your logs, it shows frames are getting dropped due to timestamp issue in the incoming stream.
ERROR - Failed to submit frame to Kinesis Video client. status: 0x32000002 decoding timestamp: 713726356 presentation timestamp: 713416203
For any errors you see in the logs, You can refer the details in https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-sdk-errors.html
Also, make sure you are using the latest sample application from the Github.
Thanks
from amazon-kinesis-video-streams-producer-sdk-cpp.
@francoisdutoit can you also provide details of the camera model you are using ... Thanks
from amazon-kinesis-video-streams-producer-sdk-cpp.
It a Dahua IPC-HFW1120S,
Device Type
IPC-HFW1120S
Software Version
2.420.0000.19.R, Build Date: 2016-06-24
WEB Version
3.2.1.355658
ONVIF Version
2.4.2
from amazon-kinesis-video-streams-producer-sdk-cpp.
@francoisdutoit can you try Encode Mode as. H.264B (baseline profile) instead of H.264H ?
from amazon-kinesis-video-streams-producer-sdk-cpp.
@unicornss . Ok - Let me try that....
from amazon-kinesis-video-streams-producer-sdk-cpp.
@unicornss
That does not seem to make a difference...... I'm trying a few different settings with the main stream now that are not available in the substream. - Just to see what effect that has...
from amazon-kinesis-video-streams-producer-sdk-cpp.
@unicornss ,
I'm going to install the latest version of the app to see if that makes a difference...... Will let you know if that makes any difference. Thanks!
from amazon-kinesis-video-streams-producer-sdk-cpp.
I'm getting the following error with the latest version....
describeStreamResultEvent(): Describe stream result event.DEBUG - describeStreamHandler invoked
INFO - Refreshing credentials. Force refreshing: 0 Now time is: 1521577521 Expiration: 0
ERROR - curl perform failed for url https://kinesisvideo.us-west-2.amazonaws.com/describeStream with result Problem with the SSL CA cert (path? access rights?): error setting certificate verify locations:
CAfile: /etc/ssl/cert.pem
CApath: none
WARN - HTTP Error 0: Response:
Request URL: https://kinesisvideo.us-west-2.amazonaws.com/describeStream
Request Headers:
Authorization: AWS4-HMAC-SHA256 Credential=AKIAJ2WGXLCSWYBFSUFQ/20180320/us-west-2/kinesisvideo/aws4_request, SignedHeaders=content-type;host;x-amz-date, Signature=101dc453907fe8293648b6ce28be254a11d63f2b30a0553dbe97aa46ca1056fb
content-type: application/json
host: kinesisvideo.us-west-2.amazonaws.com
X-Amz-Date: 20180320T202521Z
DEBUG - describeStream response:
INFO - Describe stream did not find the stream MyOnvifStream1 in Kinesis Video (stream will be created)
describeStreamResultEvent(): Describe stream result event.ERROR - Submitting event result for stream: 94696165351990 failed with: 1375731729
ERROR - Reporting stream error. Errored timecode: 0 Status: 1375731729
ERROR - Failed to create Kinesis Video Stream - timed out.
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to create Kinesis Video Stream - timed out.
Aborted (core dumped)
from amazon-kinesis-video-streams-producer-sdk-cpp.
This is caused by certificate issue. Please refer to https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp#certificate-store-integration to fix this.
from amazon-kinesis-video-streams-producer-sdk-cpp.
As @zhiyua-git mentioned this is due to the certificate issue and you need to copy the certificate as in https://github.com/awslabs/amazon-kinesis-video-streams-producer-sdk-cpp#certificate-store-integration . Then follow the steps in #40 to rebuild the curl.
Basically curl is not able to refer the cert ca bundle and thus fails validation. curl which was downloaded as part of the install-script uses libssl and other dependencies from the local folder (<producer_sdk_path/kinesis-video-native-build/downloads/local/lib). Looks like your curl was not build properly. Can you please reinstall curl by following below steps? This should fix the issue.
rm <producer_sdk_path>/kinesis-video-native-build/downloads/local/lib/libcurl*
rm <producer_sdk_path>/kinesis-video-native-build/downloads/local/bin/curl*
cd <producer_sdk_path>/kinesis-video-native-build/downloads/curl-7.57.0
export DOWNLOADS=<producer_sdk_path>/kinesis-video-native-build/downloads
make clean
./configure --prefix=$DOWNLOADS/local/ --enable-dynamic --disable-rtsp --disable-ldap --without-zlib --with-ssl=$DOWNLOADS/local/ --with-ca-bundle=/etc/ssl/cert.pem
make
make install
from amazon-kinesis-video-streams-producer-sdk-cpp.
So running the latest version has resolved the issue :) The quality is fine now :)
Thanks for the help :)
from amazon-kinesis-video-streams-producer-sdk-cpp.
Related Issues (20)
- [QUESTION] Gstreamer event/message for streaming/connection releated issues in KVS SDK HOT 2
- [QUESTION] kvs_gstreamer_sample hanging after "pad link successful" HOT 1
- compilation error on Ubuntu HOT 1
- [QUESTION] Struggling with KVS streams on iOS HOT 6
- Not able to access media on Media Playback on Kinesis Video Streamer
- [QUESTION] Raspberry Pi からの映像送信でエラーが発生
- I am getting this error while running: cmake -DBUILD_GSTREAMER_PLUGIN=TRUE .. HOT 4
- [BUG] Streaming h.265 video from RTSP HOT 5
- [BUG] HOT 1
- [BUG] Gst plugin kvssink is built as static library
- [FEATURE] Make log level in kvssink configurable. HOT 1
- [BUG] `kvssink` occasionally generates non-monotonic PTS HOT 1
- How to resolve a "MAX_FRAGMENT_DURATION_REACHED" error when trying to stream RTSP camera feed into KVS HOT 3
- Failed to allocate memory HOT 3
- [BUG] HOT 1
- Stream video to your Kinesis video stream and view the live stream HOT 5
- [BUG] KVS Fails to build due to Threadpool.c.o issue HOT 4
- kvs_gstreamer_sample fails to run on Raspberry Pi bookworm
- [QUESTION] Streaming MP4 file data to Kinesis Video Streams results in Transferred a partial file error with CURL HOT 1
- [BUG] "Make" resulting in "incompatible pointer to integer conversion" Errors HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from amazon-kinesis-video-streams-producer-sdk-cpp.