mediastreamsource

Audio Level Meter for Web RTC Stream

烂漫一生 提交于 2019-12-22 09:48:30
问题 I would like to create a decibel meter for the audio that is playing in a video element. The video element is playing a WebRTC stream. At the moment WebRTC streams cannot be passed into a Web Audio Analyzer. (Although this might change soon … ) (see Web Audio API analyser node getByteFrequencyData returning blank array) Is there currently another way to get decibel information from a remote mediastream? 回答1: Chrome 50 was released: As of the 13th of April 2016 using an Analyser Node with a

How to create MediaStream from videofile?

随声附和 提交于 2019-12-20 10:53:10
问题 Most of the Mediastream examples are explanation by webCam-stream.but I need to create MediaStream from local videofile(.webm or mp4).Please tell me. 回答1: Updated at May 04, 2017 : captureStream API are now supported both on Chrome and Firefox. var stream_from_WebM_or_Mp4_File = videoTag.captureStream(); var stream_from_Canvas2D = canvasTag.captureStream(25); The parameter "25" is requested frame-rates. Now you can share the resulting stream using either RTCPeerConnection API or record using

H.264 video play (using MediaStreamSource) meet with 3100 MediaError on WP7 emulator

一个人想着一个人 提交于 2019-12-10 15:58:06
问题 We're trying to play a H.264 stream with MediaStreamSource on WP7 emulator. But met with 3100 error with video: In override method OpenMediaAsync of Mp4MediaStreamSource, videoStreamAttribute VideoFourCC is set as “H264”: Dictionary<MediaStreamAttributeKeys, string> videoStreamAttributes = new Dictionary<MediaStreamAttributeKeys, string>(); videoStreamAttributes[MediaStreamAttributeKeys.VideoFourCC] = "H264"; this.videoStreamDescription = new MediaStreamDescription(MediaStreamType.Video,

create and transmit custom mediastream in webrtc

梦想的初衷 提交于 2019-12-10 13:42:55
问题 I want to use canvas element as mediastreamsource of video part of the webrtc communication, any directions would be helpful, scoured the net, not finding much resources discussing this topic * Long Background Story * The problem, I cannot send the video from camera directly, it is part of the requirements that I process the video(some image processing stuff, out of scope for this issue) before displaying. Previously, on the other peer's browser, instead of directly displaying the video using

WP7 Background Audio - Memory Leak or Not?

落花浮王杯 提交于 2019-12-10 10:56:12
问题 I'm creating an app that plays background audio. Here's the RAM usage of my background audio playing process: Is this a memory leak or no? I'm concerned because if / when it exceeds 15MB, the OS will silently kill my player, which is undesirable. Is there a way to view what occupies that memory? My MediaStreamSource implementation only allocates single 512kb buffer on the startup, and never allocates a single byte while playing. BTW, the stream bitrate is 96 kbit/sec, which is the same as

WP7 Mp3MediaStreamSource demo not working

爷,独闯天下 提交于 2019-12-07 07:54:56
问题 I dowloaded Mp3MediaStreamSource demo on http://archive.msdn.microsoft.com/ManagedMediaHelpers but can get it worked with my stream, can you help me? my stream: private static string mediaFileLocation = "http://server2.fmstreams.com:8011/spin103"; In case 1 is RequestCallback not called: request.AllowReadStreamBuffering = true; IAsyncResult result = request.BeginGetResponse(new AsyncCallback(this.RequestCallback), null); In case 2 is RequestCallback called but I'm getting error: Read is not

WP7 Background Audio - Memory Leak or Not?

邮差的信 提交于 2019-12-06 11:24:39
I'm creating an app that plays background audio. Here's the RAM usage of my background audio playing process: Is this a memory leak or no? I'm concerned because if / when it exceeds 15MB, the OS will silently kill my player, which is undesirable. Is there a way to view what occupies that memory? My MediaStreamSource implementation only allocates single 512kb buffer on the startup, and never allocates a single byte while playing. BTW, the stream bitrate is 96 kbit/sec, which is the same as memory allocation rate of the app. Is there a way to make the GC to be less lazy, and sleep for less then

WP7 Mp3MediaStreamSource demo not working

允我心安 提交于 2019-12-05 17:55:14
I dowloaded Mp3MediaStreamSource demo on http://archive.msdn.microsoft.com/ManagedMediaHelpers but can get it worked with my stream, can you help me? my stream: private static string mediaFileLocation = "http://server2.fmstreams.com:8011/spin103"; In case 1 is RequestCallback not called: request.AllowReadStreamBuffering = true; IAsyncResult result = request.BeginGetResponse(new AsyncCallback(this.RequestCallback), null); In case 2 is RequestCallback called but I'm getting error: Read is not supported on the main thread when buffering is disabled. request.AllowReadStreamBuffering = false;

How to create MediaStream from videofile?

北战南征 提交于 2019-12-03 00:32:15
Most of the Mediastream examples are explanation by webCam-stream.but I need to create MediaStream from local videofile(.webm or mp4).Please tell me. Muaz Khan Updated at May 04, 2017 : captureStream API are now supported both on Chrome and Firefox. var stream_from_WebM_or_Mp4_File = videoTag.captureStream(); var stream_from_Canvas2D = canvasTag.captureStream(25); The parameter "25" is requested frame-rates. Now you can share the resulting stream using either RTCPeerConnection API or record using MediaRecorder API. Please check a similar answer: https://stackoverflow.com/a/42929613/552182

Play MediaRecorder chunks in MediaSource HTML5 — video frozen

主宰稳场 提交于 2019-11-30 10:24:39
I have this simple code to get chunks of video stream and play them in MediaSource. I see video, but sometimes it stops. It may work for few seconds or for few minutes. But finally it stops at some moment. chrome://media-internals/ shows no errors. What is wrong here? navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia; var mediaSource = new MediaSource(); var constraints = { "audio": true, "video": { "mandatory": { "minWidth": 320, "maxWidth": 320, "minHeight": 240, "maxHeight": 240 }, "optional": [] } };