streaming

GStreamer rtp stream to vlc

只谈情不闲聊 提交于 2019-12-28 03:35:26
问题 I'm having some trouble figuring out how to create a simple rtp stream with gstreamer and display it on vlc. I've installed GStreamer 0.10.30 and VLC 1.1.3. My only requirement is to use MPEG4 or H.264 codecs. Right now, I can stream the GStreamer videotestsrc through this simple pipeline: gst-launch videotestsrc ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink host=127.0.0.1 port=5000 which outputs the "caps" needed by the client to receive the stream: /GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad

Convert video Input Stream to RTMP

喜欢而已 提交于 2019-12-28 03:18:09
问题 I want to stream video recording from my android phone to network media server. The first problem is that when setting MediaRecorder output to socket, the stream is missing some mdat size headers. This can be fixed by preprocessing that stream locally and adding missing data to stream in order to produce valid output stream. The question is how to proceed from there. How can I go about output that stream as an RTMP stream? 回答1: First, let's unwind your question. As you've surmised, RTMP isn't

How do I scale a streaming bitmap in-place without reading the whole image first?

ぃ、小莉子 提交于 2019-12-28 02:39:13
问题 I have an Android application that is very image intensive. I'm currently using Bitmap.createScaledBitmap() to scale the image to a desired size. However, this method requires that I already have the original bitmap in memory, which can be quite sizable. How can I scale a bitmap that I'm downloading without first writing the entire thing out to local memory or file system? 回答1: This method will read the header information from the image to determine its size, then read the image and scale it

Streaming input to System.Speech.Recognition.SpeechRecognitionEngine

谁都会走 提交于 2019-12-28 02:05:47
问题 I am trying to do "streaming" speech recognition in C# from a TCP socket. The problem I am having is that SpeechRecognitionEngine.SetInputToAudioStream() seems to require a Stream of a defined length which can seek. Right now the only way I can think to make this work is to repeatedly run the recognizer on a MemoryStream as more input comes in. Here's some code to illustrate: SpeechRecognitionEngine appRecognizer = new SpeechRecognitionEngine(); System.Speech.AudioFormat.SpeechAudioFormatInfo

Streaming input to System.Speech.Recognition.SpeechRecognitionEngine

佐手、 提交于 2019-12-28 02:04:41
问题 I am trying to do "streaming" speech recognition in C# from a TCP socket. The problem I am having is that SpeechRecognitionEngine.SetInputToAudioStream() seems to require a Stream of a defined length which can seek. Right now the only way I can think to make this work is to repeatedly run the recognizer on a MemoryStream as more input comes in. Here's some code to illustrate: SpeechRecognitionEngine appRecognizer = new SpeechRecognitionEngine(); System.Speech.AudioFormat.SpeechAudioFormatInfo

How to send image generated by PIL to browser?

…衆ロ難τιáo~ 提交于 2019-12-28 01:46:06
问题 I'm using flask for my application. I'd like to send an image (dynamically generated by PIL) to client without saving on disk. Any idea how to do this ? 回答1: First, you can save the image to a tempfile and remove the local file (if you have one): from tempfile import NamedTemporaryFile from shutil import copyfileobj from os import remove tempFileObj = NamedTemporaryFile(mode='w+b',suffix='jpg') pilImage = open('/tmp/myfile.jpg','rb') copyfileobj(pilImage,tempFileObj) pilImage.close() remove('

Live-stream video from one android phone to another over WiFi

半城伤御伤魂 提交于 2019-12-28 01:39:24
问题 I have searched the internet for days now on how to implement a video streaming feature from an android phone to another android phone over a WiFi connection but I can't seem to find anything useful. I looked on android developers for sample code, stackoverflow, google, android blogs but nothing. All I can find are some sort of phone-to-desktop or desktop-to-phone solutions for streaming, but nothing that I can borrow in my implementation. I need to control a robot using an arduino ADK, so I

UISlider with ProgressView combined

时光毁灭记忆、已成空白 提交于 2019-12-27 18:24:24
问题 Is there an apple-house-made way to get a UISlider with a ProgressView. This is used by many streaming applications e.g. native quicktimeplayer or youtube. (Just to be sure: i'm only in the visualization interested) cheers Simon 回答1: Here's a simple version of what you're describing. It is "simple" in the sense that I didn't bother trying to add the shading and other subtleties. But it's easy to construct and you can tweak it to draw in a more subtle way if you like. For example, you could

UISlider with ProgressView combined

时光总嘲笑我的痴心妄想 提交于 2019-12-27 18:23:53
问题 Is there an apple-house-made way to get a UISlider with a ProgressView. This is used by many streaming applications e.g. native quicktimeplayer or youtube. (Just to be sure: i'm only in the visualization interested) cheers Simon 回答1: Here's a simple version of what you're describing. It is "simple" in the sense that I didn't bother trying to add the shading and other subtleties. But it's easy to construct and you can tweak it to draw in a more subtle way if you like. For example, you could

How to write super-fast file-streaming code in C#?

天大地大妈咪最大 提交于 2019-12-27 18:23:03
问题 I have to split a huge file into many smaller files. Each of the destination files is defined by an offset and length as the number of bytes. I'm using the following code: private void copy(string srcFile, string dstFile, int offset, int length) { BinaryReader reader = new BinaryReader(File.OpenRead(srcFile)); reader.BaseStream.Seek(offset, SeekOrigin.Begin); byte[] buffer = reader.ReadBytes(length); BinaryWriter writer = new BinaryWriter(File.OpenWrite(dstFile)); writer.Write(buffer); }