locked
How to use Phone camera for live streaming rather than using WireCast camera in Live streaming using Azure Media Services

    Question

  • Hi,

    am planning to develop a live streaming app using C# and xaml.

    I have gone through the below sample and am able to stream the live content using wireacst camera.

    Azure Media Services Live Streaming Sample

    But i want to use Phone camera to stream the live video rather using wirecast camera.

    How can i use that? How to get the published URL from the C# code, is there any API to get that?

    Anybody please help me

    Regards,

    Santhosh



    Wednesday, April 01, 2015 8:51 AM

Answers

  • Hello,

    There are no in box components that will allow you to transmit captured video from a Windows Phone device to Azure Media Services. You will need to create you own implementation. You can do this by creating a custom Media Foundation sync that can plug into the MediaCapture element's pipeline. You will then need to modify the captured and compressed video to align to one of the two protocols that Azure Media services can use. At this time Azure Media services can use either Smooth Streaming or RTMP for ingestion. You will need to create your own packager (or find compatible packager code from a 3rd party) to package the MP4 encoded data into the necessary format.

    Here is an example of how to create a custom Media Foundation sync (please note you must write your Media Foundation components using C++ MoCOM. We do not support Media Foundation components written in managed languages):

    Real-time communication sample

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, April 01, 2015 8:29 PM
    Moderator

All replies

  • Hello,

    There are no in box components that will allow you to transmit captured video from a Windows Phone device to Azure Media Services. You will need to create you own implementation. You can do this by creating a custom Media Foundation sync that can plug into the MediaCapture element's pipeline. You will then need to modify the captured and compressed video to align to one of the two protocols that Azure Media services can use. At this time Azure Media services can use either Smooth Streaming or RTMP for ingestion. You will need to create your own packager (or find compatible packager code from a 3rd party) to package the MP4 encoded data into the necessary format.

    Here is an example of how to create a custom Media Foundation sync (please note you must write your Media Foundation components using C++ MoCOM. We do not support Media Foundation components written in managed languages):

    Real-time communication sample

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, April 01, 2015 8:29 PM
    Moderator
  • Hi James,

    Thanks alot for your reply.. i ran the Real-time communication sample

    In Video Chat Scenario after entering the IP address of a remote PC am unable to make a video call?

    Do i need to enable any firewall settings or do i need to make any changes in the Real-time communication sample code?

    It would be great if you can please help me more on this..

     

    Thursday, April 02, 2015 10:51 AM
  • You must run the sample on two different machines. You cannot run two instances on the same machine. You need to make sure that you have setup the firewall appropriately as well to allow the communication protocol to connect. There are a large number of possible error conditions. What errors are you seeing when you try to connect?

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, April 02, 2015 6:20 PM
    Moderator
  • HI James,

    I ran the sample on two different machines. No problem with firewall too.No errors occurred in the code.

    After entering the host IP address and when i click on call the status is initializing and it is taking few seconds and it is not connecting to the host call.

    When i click on Call button the status is "Initializing Connection Please wait.." 

    After some time the call button is enabled and the call is not connecting

    I tried using hostname too, still no luck with that.

    In the code we are giving the source like 

     RemoteVideo.Source = new Uri("stsp://" + address);

    What does stsp do?

    Any help on this please??


    Tuesday, April 07, 2015 2:49 PM
  • STSP is the custom communications protocol that the sample uses. Have you tried getting a network trace? Have you tried debugging the code to see what component is re-enabling the call button when the connection fails? Taking a closer look at what the code is doing in the failure scenario should help you understand why it is failing.

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Tuesday, April 07, 2015 10:21 PM
    Moderator
  • Hi James,

    again thanks for your reply.

    Whenever i hit the call button the status is "Initializing Connection Please wait.." 

    after some time 

    InitializeAsync(CancellationToken cancel = default(CancellationToken)) this method is re enabling the call button.

    Wednesday, April 08, 2015 7:08 AM
  • Did you get a network trace? Do you see any outbound traffic?

    -James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Wednesday, April 08, 2015 10:03 PM
    Moderator
  • Hi James,

    I dont know about Network Trace, i goggled it and have gone through the below link

    Network Trace

    performed some actions as per the instructions given in the Url, but i'm unable to locate the nettrace-boot.etl file in my PC.

    Any other possibilities to track Network Trace? Any suggestions please??



    Thursday, April 09, 2015 10:09 AM
  • There are many network tools that can produce a network trace on Windows. Microsoft has a tool called Microsoft Message Analyzer that may work for your scenario.

    Before using this tool I would recommend that you watch all three parts of the following videos created by my colleagues: Defrag Tools: #71 - Message Analyzer - Part 1

    Please keep in mind that the Message Analyzer tool is not supported in this forum. I mention it here for completeness but without warranty as to the suitability of your debugging scenario. Please visit the Message Analyzer forum for tool specific assistance.

    I hope this helps,

    James


    Windows SDK Technologies - Microsoft Developer Services - http://blogs.msdn.com/mediasdkstuff/

    Thursday, April 09, 2015 6:29 PM
    Moderator