How to get thumbnail with built-in HttpProvider - wowza

I test Wowza on trial license and I follow this article to get a thumbnail from wowza transcoder. My Application name is live2 and stream name is test. Wowza transcoder is turned on and restarted. In wowza streaming engine manager in incoming streams I can see: test rtmp://127.0.0.1:35412 , test_160p local (Transcoder), test_360p local (Transcoder) etc.
But when I enter folowing url in my browser localhost:8086/transcoderthumbnail?application=live2&streamname=test&format=jpeg&size=320x240
It doesn't work. Even in logs file there is no mention unless I put in url wrong stream name. What I do wrong?

Related

How to use AWS WebRTC signed url in the frontend?

The aws repo https://github.com/awslabs/amazon-kinesis-video-streams-webrtc-sdk-js provides the backend code to generate a presigned url.
I was able to log it and it looks like this (modified by adding/removing some characters to avoid misuse):
wss://v-7bd53a347.kinesisvideo.ap-south-1.amazonaws.com/?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-ChannelARN=arn%3Aaws%3Akinesisvideo%3Aap-south-1%3A3514502525359%3Achannel%2Fwebcam-signalling-channel-4%2F1637856477339&X-Amz-ClientId=U5PAWCWS5VE&X-Amz-Credential=ASIAVDVAVN2XSBEJVNOK%2F20211207%2Fap-south-1%2Fkinesisvideo%2Faws4_request&X-Amz-Date=20211207T160335Z&X-Amz-Expires=299&X-Amz-Security-Token=IQoJb3JopZ2luX2VjEND%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaCmFwLXNvdXRoLTEiRzBFAiEA50TmitWwvooci6xG3i1M4jGzt7c7lfEu36TcdzOOFm8CIBNZLLDLB%2FDiBGIkU1PymctAcnobgu4WX%2F4KptvG%2BTOjKtMECKn%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEQAhoMMzUxNDUwNTI1MzU5IgzlJEvF6NfKu43Rf70qpwRckEnOpVflPcE%2FvLtSXqgUCDI5qE5F9RUSpqtVKEA0Q6qPClsXw9IJMx2PWWQdgQ5I2uuMG1Ql1EH5DbY%2Fac0%2B%2BXWUJnPeHjDvpuNRk4J52YWAO02s4692U0EayCJsyxD57z5OKuQ8y9xkfjd60ju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host
I am not able to understand how to use it in the frontend to view the video stream.
I have come across other comments seeking examples but there are no responses:
How to use Kinesis Video Stream WebRTC SDK in the browser without providing credentials?
Has anyone been able to use it?
In case you are still looking for an answer, the signed url can be used while creating a signalling client in the front end code and can be used for connecting with AWS WebRTC Signalling service. You may find an example at below
https://blog.learningdollars.com/2021/05/09/aws-kinesis-video-stream-with-signed-url/
I implemented the above but was unable to see request from one front-end module to the other front-end module using AWS Kinesis WebRTC.

AWS Cloudfront ERR_CACHE_OPERATION_NOT_SUPPORTED

I'm using AWS Cloudfront to service audio files to user. Recently several user reported that they are unable to play my audio file. A browser refresh is required to make it work if the audio is stuck.
In the Google Chrome console, it outputs
Failed to load resource:
net::ERR_CACHE_OPERATION_NOT_SUPPORTED
I already have a cache settings in my Cloudfront Behavior settings,
Only default settings is on the origin s3 bucket.
CF cache settings
Any suggestion?
I faced the same issue with a cloudfront video failing to load due to this error. I was able to resolve it using javascript like this:
var videoLink = videoControl1.children[0].src; // videoControl1 is the HTML5 video element, should work similarly for audio.
if (!videoControl1.readyState){
videoControl1.children[0].src = videoLink + "?v=" + Math.random();
videoControl1.load();
}
I followed the suggestion from here: https://github.com/igvteam/igv.js/issues/424#issuecomment-336336788
If you are going to change audio/video source dynamically and play that video/audio, you need to load with load() JS function first that resource before playing.

GRPC create channel link for Google Assistant API

I'm trying to write a C++ code to create Google Assistant on UDOO x86 board (See https://developers.google.com/assistant/sdk/).
I have tried to follow all the steps regarding in the tutorial, but I'm not sure what URL I should have when I call the creatChannel method?
I do have the credentials JSON downloaded and using it through the "GOOGLE_APPLICATION_CREDENTIALS" environment variable
Object creation:
GAssistantClient greeter(grpc::CreateChannel(
"google.com", grpc::GoogleDefaultCredentials()));
Contructor:
GAssistantClient(std::shared_ptr<Channel> channel)
: stub_(Greeter::NewStub(channel)) {}
When I put google.com in there, I get the following error:
E0505 18:30:34.959710444 7635 ssl_transport_security.c:1226] Invalid toplevel subdomain: com
E0505 18:30:34.959836517 7635 ssl_transport_security.c:1226] Invalid toplevel subdomain: com
You have to authenticate using your credentials and then create a channel, after that you have send audio config request about your audio and then send an audio data request which contains your audio captured etc.
You can use ALSA sound API library to capture and playback audio.
and then send and receive in api requests and responses.
You should follow the following order in this doc
The Service name for the Google Assistant API is embeddedassistant.googleapis.com. So your object creation call would look like:
GAssistantClient greeter(grpc::CreateChannel(
"embeddedassistant.googleapis.com", grpc::GoogleDefaultCredentials()));

Uploading data to Amazon S3 directly from a URL [duplicate]

Is it possible to upload a file to S3 from a remote server?
The remote server is basically a URL based file server. Example, using http://example.com/1.jpg, it serves the image. It doesn't do anything else and can't run code on this server.
It is possible to have another server telling S3 to upload a file from http://example.com/1.jpg
upload from http://example.com/1.jpg
server -------------------------------------------> S3 <-----> example.com
If you can't run code on the server or execute requests then, no, you can't do this. You will have to download the file to a server or computer that you own and upload from there.
You can see the operations you can perform on amazon S3 at http://docs.amazonwebservices.com/AmazonS3/latest/API/APIRest.html
Checking the operations for both the REST and SOAP APIs you'll see there's no way to give Amazon S3 a remote URL and have it grab the object for you. All of the PUT requests require the object's data to be provided as part of the request. Meaning the server or computer that is initiating the web request needs to have the data.
I have had a similar problem in the past where I wanted to download my users' Facebook Thumbnails and upload them to S3 for use on my site. The way I did it was to download the image from Facebook into Memory on my server, then upload to Amazon S3 - the full thing took under 2 seconds. After the upload to S3 was complete, write the bucket/key to a database.
Unfortunately there's no other way to do it.
I think the suggestion provided is quite good, you can SCP the file to S3 Bucket. Giving the pem file will be a password less authentication, via PHP file you can validate the extensions. PHP file can pass the file, as argument to SCP command.
The only problem with this solution is, you must have your instance in AWS. You can't use this solution if your website is hosted in other Hosting Providers and you are trying to upload files straight to S3 Bucket.
Technically it's possible, using AWS Signature Version 4, Assuming your remote server is the customer in the image below, you could prepare a form in the main server, and send the form fields to the remote server, for it to curl it. Detailed example here.
you can use scp command from Terminal.
1)using terminal, go to the place where there is that file you want to transfer to the server
2) type this:
scp -i yourAmazonKeypairPath.pem fileNameThatYouWantToTransfer.php ec2-user#ec2-00-000-000-15.us-west-2.compute.amazonaws.com:
N.B. Add "ec2-user#" before your ec2blablbla stuffs that you got from the Ec2 website!! This is such a picky error!
3) your file will be uploaded and the progress will be shown. When it is 100%, you are done!

Django url port forwarding

I have set up a page in django which currently streams a video from another server on xxxx port.
Everything works fine except that one customer has a firewall and for x reason he can not modify it and the firewall is blocking the port where the video is streamed.
I was wondering if there is any way where i can serve the streaming url as one of my project url.
For example:
The streaming url: http://streamingurl.com:9999/video
My url: http://project.com/video
What i want is with my project to serve the streaming url with my url.
Is this possible with django? :)
This is not really a Django issue, but here are a number of possible options to pursue:
Have your customer contact their network administrator and see if an exception rule can be made for the firewall to allow the streaming video across this particular port from this website.
Look into using a web proxy that supports video streaming to get around the firewall rule if it cannot be changed.
See if there is an option to embed the video into your website that uses a different port.
Contact "streamingurl.com" and see if there is an alternative port that can be used to stream the video - some websites have an alternative even if it is not actively advertised.