Giter Club home page Giter Club logo

Comments (21)

francoisdutoit avatar francoisdutoit commented on July 24, 2024

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

camera

from amazon-kinesis-video-streams-producer-sdk-cpp.

MushMal avatar MushMal commented on July 24, 2024

@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

  1. Your application properly submits decoding timestamps and presentation timestamps - those should be properly done. I assume you are using the sample application?
  2. 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.
  3. 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.

unicornss avatar unicornss commented on July 24, 2024

Hi @francoisdutoit

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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@unicornss @MushMal

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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

Here is some of the console output from running the kinesis_video_gstreamer_sample_rtsp_app

KinesisConsoleOutput.txt

from amazon-kinesis-video-streams-producer-sdk-cpp.

MushMal avatar MushMal commented on July 24, 2024

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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@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.

unicornss avatar unicornss commented on July 24, 2024

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.

MushMal avatar MushMal commented on July 24, 2024

@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.

unicornss avatar unicornss commented on July 24, 2024

Hi @francoisdutoit

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.

unicornss avatar unicornss commented on July 24, 2024

@francoisdutoit can you also provide details of the camera model you are using ... Thanks

from amazon-kinesis-video-streams-producer-sdk-cpp.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@unicornss ,

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.

unicornss avatar unicornss commented on July 24, 2024

@francoisdutoit can you try Encode Mode as. H.264B (baseline profile) instead of H.264H ?

from amazon-kinesis-video-streams-producer-sdk-cpp.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@unicornss . Ok - Let me try that....

from amazon-kinesis-video-streams-producer-sdk-cpp.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

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.

zhiyua-git avatar zhiyua-git commented on July 24, 2024

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.

unicornss avatar unicornss commented on July 24, 2024

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.

francoisdutoit avatar francoisdutoit commented on July 24, 2024

@unicornss @MushMal

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.