FFmpegInterop流到youtube-Windows10 IoT

FFmpegInterop流到youtube-Windows10 IoT,youtube,iot,windowsiot,Youtube,Iot,Windowsiot,我需要从rtsp链接中获取数据,如下面的代码,并流式传输到youtube rtmp,如:rtmp://a.rtmp.youtube.com/live2/e1j9-ag98-vg5p-avhc 但我不知道下一步如何处理MediaStreamSource 我的应用程序将部署到RapsberryPi3-Windows10 IoT ARM 请帮帮我 try { string uri = "rtsp://27.74.XXX.XXX:55/ufirst

我需要从rtsp链接中获取数据,如下面的代码,并流式传输到youtube rtmp,如:rtmp://a.rtmp.youtube.com/live2/e1j9-ag98-vg5p-avhc 但我不知道下一步如何处理MediaStreamSource 我的应用程序将部署到RapsberryPi3-Windows10 IoT ARM

请帮帮我

        try
        {
            string uri = "rtsp://27.74.XXX.XXX:55/ufirststream";   
            // Read toggle switches states and use them to setup FFmpeg MSS
            bool forceDecodeAudio = toggleSwitchAudioDecode.IsOn;
            bool forceDecodeVideo = toggleSwitchVideoDecode.IsOn;

            // Set FFmpeg specific options. List of options can be found in https://www.ffmpeg.org/ffmpeg-protocols.html
            PropertySet options = new PropertySet();

            // Below are some sample options that you can set to configure RTSP streaming
            options.Add("rtsp_flags", "prefer_tcp");
            options.Add("allowed_media_types", "video");
            options.Add("stimeout", 100000 * 5);
            options.Add("reorder_queue_size", 1);
            options.Add("packet-buffering", 0);
            options.Add("fflags", "nobuffer");
            options.Add("probesize", 32);

            // Instantiate FFmpegInteropMSS using the URI
            mediaElement.Stop();
            FFmpegMSS = FFmpegInteropMSS.CreateFFmpegInteropMSSFromUri(uri, forceDecodeAudio, forceDecodeVideo, options);

            if (FFmpegMSS != null)
            {
                MediaStreamSource mss = FFmpegMSS.GetMediaStreamSource();
                if (mss != null)
                {
                    // Pass MediaStreamSource to Media Element
                    mediaElement.SetMediaStreamSource(mss);

                    // Close control panel after opening media
                    Splitter.IsPaneOpen = false;
                }
                else
                {
                    DisplayErrorMessage("Cannot open media");
                }
            }
            else
            {
                DisplayErrorMessage("Cannot open media");
            }
        }
        catch (Exception ex)
        {
            DisplayErrorMessage(ex.Message);
        }

我不知道,但这可能会有所帮助,接下来,你需要将流发布到youtube rtmp。你检查过了吗?我不知道,但这可能会有所帮助,接下来,你需要将流发布到youtube rtmp。你检查过了吗?