locked
How to get response from live video stream using Video Indexer API RRS feed

  • Question

  • User-1160502994 posted

    I am using Video Indexer API to analyse my videos.I don't know how to analyse the live stream video .How o sort out this issue?

    Tuesday, November 21, 2017 6:28 AM

Answers

  • User283571144 posted

    Hi Mohan srinivas,

    I am using Video Indexer API to analyse my videos.I don't know how to analyse the live stream video .How o sort out this issue?

    According to your description, I have searched the Video Indexer API , it doesn't contain the api which support the live stream video.

    I have also search the same feedback about the Video Indexer.

    I suggest you could follow this feedback to ask product team for more details information.

    Link : https://cognitive.uservoice.com/forums/598144-video-indexer/suggestions/19293739-add-live-ingest

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 22, 2017 7:00 AM

All replies

  • User991499041 posted

    Hi Mohan,

    I am using Video Indexer API to analyse my videos.I don't know how to analyse the live stream video .How o sort out this issue?

    When you call the API that gets video breakdowns for the specified video, you get a detailed JSON output as the response content. For details about the returned JSON, see this topic.

    The following C# code snippet demonstrates the usage of all the Video Indexer APIs together.

    var apiUrl = "https://videobreakdown.azure-api.net/Breakdowns/Api/Partner/Breakdowns";
    var client = new HttpClient();
    client.DefaultRequestHeaders.Add("Ocp-Apim-Subscription-Key", "...");
    
    var content = new MultipartFormDataContent();
    
    Console.WriteLine("Uploading...");
    var videoUrl = "https:/...";
    var result = client.PostAsync(apiUrl + "?name=some_name&description=some_description&privacy=private&partition=some_partition&videoUrl=" + videoUrl, content).Result;
    var json = result.Content.ReadAsStringAsync().Result;
    
    Console.WriteLine();
    Console.WriteLine("Uploaded:");
    Console.WriteLine(json);
    
    var id = JsonConvert.DeserializeObject<string>(json);
    
    while (true)
    {
        Thread.Sleep(10000);
    
        result = client.GetAsync(string.Format(apiUrl + "/{0}/State", id)).Result;
        json = result.Content.ReadAsStringAsync().Result;
    
        Console.WriteLine();
        Console.WriteLine("State:");
        Console.WriteLine(json);
    
        dynamic state = JsonConvert.DeserializeObject(json);
        if (state.state != "Uploaded" && state.state != "Processing")
        {
            break;
        }
    }
    
    result = client.GetAsync(string.Format(apiUrl + "/{0}", id)).Result;
    json = result.Content.ReadAsStringAsync().Result;
    Console.WriteLine();
    Console.WriteLine("Full JSON:");
    Console.WriteLine(json);
    
    result = client.GetAsync(string.Format(apiUrl + "/Search?id={0}", id)).Result;
    json = result.Content.ReadAsStringAsync().Result;
    Console.WriteLine();
    Console.WriteLine("Search:");
    Console.WriteLine(json);
    
    result = client.GetAsync(string.Format(apiUrl + "/{0}/InsightsWidgetUrl", id)).Result;
    json = result.Content.ReadAsStringAsync().Result;
    Console.WriteLine();
    Console.WriteLine("Insights Widget url:");
    Console.WriteLine(json);
    
    result = client.GetAsync(string.Format(apiUrl + "/{0}/PlayerWidgetUrl", id)).Result;
    json = result.Content.ReadAsStringAsync().Result;
    Console.WriteLine();
    Console.WriteLine("Player token:");
    Console.WriteLine(json);

    Use Azure Video Indexer API

    https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/cognitive-services/video-indexer/video-indexer-use-apis.md

    Regards,

    zxj

    Tuesday, November 21, 2017 7:52 AM
  • User283571144 posted

    Hi Mohan srinivas,

    I am using Video Indexer API to analyse my videos.I don't know how to analyse the live stream video .How o sort out this issue?

    According to your description, I have searched the Video Indexer API , it doesn't contain the api which support the live stream video.

    I have also search the same feedback about the Video Indexer.

    I suggest you could follow this feedback to ask product team for more details information.

    Link : https://cognitive.uservoice.com/forums/598144-video-indexer/suggestions/19293739-add-live-ingest

    Best Regards,

    Brando

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, November 22, 2017 7:00 AM
  • User-1160502994 posted

    Thank you so much.

    Thursday, November 30, 2017 10:07 AM