streaming

Sinatra 1.3 Streaming w/ Ruby stdout redirection

一笑奈何 提交于 2019-12-23 06:03:04
问题 I would like to use Sinatra's Streaming capability introduced in 1.3 coupled with some stdout redirection. It would basically be a live streaming output of a long running job. I looked into this question and the Sinatra streaming sample in the README. Running 1.8.7 on OSX: require 'stringio' require 'sinatra' $stdout.sync = true module Kernel def capture_stdout out = StringIO.new $stdout = out yield out ensure $stdout = STDOUT end end get '/' do stream do |out| out << "Part one of a three

Streaming video of my WPF application

自作多情 提交于 2019-12-23 05:14:44
问题 I have a simple digital signage solution with a presentation application in WPF. I would like to "monitor" it from my remote machine. I would like to send a stream of the content the application is showing now (images, video, userControls, etc.). How to do this, do i need to manually take a screenshot and send it in a video stream to my monitor - how to encode it into a stream the monitoring application can playback (that one is also WPF). 回答1: Ok, if snapshots are ok then I've done this

Network Time Synchronization with Java

本小妞迷上赌 提交于 2019-12-23 04:51:08
问题 I'm creating a p2p audio-midi streaming application using Java (unfortunately) and I'm searching for a way to provide network time synchronization between certain peers (sources) using a reliable protocol implementation (like NTP) but I can't find any related libraries to use.I also have a limited amount of time to spend in order to implement something like this myself. So, does anyone know any solutions for network time synchronization using Java, NTP or alternative protocols/methods/ideas ?

FFMPEG Combining images to video and streaming in one command line

こ雲淡風輕ζ 提交于 2019-12-23 04:48:05
问题 Currently, using ffmpeg, I am using two commands on my Terminal to: 1) create a video from a bunch of images: ffmpeg -r 60 -f image2 -s 1920x1080 -i rotated-pano_frame%05d_color_corrected_gradblend.jpg -vcodec libx264 -crf 25 -pix_fmt yuv420p test.mp4 2) stream the video to a udp address: ffmpeg -re -i test.mp4 -c copy -f flv udp://127.0.0.1:48550 How can I combine these two commands, into one single ffmpeg command? A concern I have is that it takes a couple of minutes to generate the video

Writing the contents to a file from input stream

荒凉一梦 提交于 2019-12-23 04:33:58
问题 I want to write the inputstream into a file in java. How to write the contents into a text file in java? try { BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream())); //I want to write the content to a file line by line here while (!in.ready()) {} System.out.print("'\n"); in.close(); } 回答1: FileWriter fstream = new FileWriter("fileName"); BufferedWriter fbw = new BufferedWriter(fstream); while ((line = in.readLine()) != null) { fbw.write(line + "\n"); } 来源:

Is there a combine Input format for hadoop streaming?

烈酒焚心 提交于 2019-12-23 03:44:08
问题 I have many small input files, and I want to combine them using some input format like CombineFileInputFormat to launch fewer mapper tasks. I know I can use Java API to do this, but I don't know whether there's a streaming jar library to support this function while I'm using Hadoop streaming. 回答1: Hadoop streaming uses TextInputFormat by default but any other input format can be used, including CombineFileInputFormat . You can change the input format from the command line, using the option

WCF Stream- changing position

梦想的初衷 提交于 2019-12-23 03:10:15
问题 My client gets from another client a stream but my client need to read only from the middle of that stream. In WCF, the stream I get, cannot be converted to FileStream even if the other client created that stream at the start as FileStream before he gave that stream to my client. Thats why my client cant do that: Stream1.Read(Buffer, Middle_Of_Stream, Buffer.Length) Any solutions will be appreciated! *streaming mode = streaming. 回答1: The stream you get on the client cannot be converted to a

How do I support streaming in WSFederationHttpBinding?

白昼怎懂夜的黑 提交于 2019-12-23 03:09:56
问题 I have a wcf service which is used to upload and download large files to server. I'm using MTOM message encoding and I want to use streamed transfer mode. But we are using wsFederationHttpBinding. How do I support streaming in wsFederationHttpBinding? My WCF Service web.config code is given below, <wsFederationHttpBinding> <binding name="UploadserviceFederation" messageEncoding="Mtom" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647" > <readerQuotas maxStringContentLength=

Managing a large collection of music

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-23 03:03:08
问题 I'd like to write my own music streaming web application for my personal use but I'm racking my brain on how to manage it. Existing music and their location's rarely change but are still capable of (fixing filename, ID3 tags, /The Chemical Brothers instead of /Chemical Brothers). How would the community manage all of these files? I can gather a lot of information through just an ID3 reader and my file system but it would also be nice to keep track of how often played and such. Would using

Playing MMS streams within Python

此生再无相见时 提交于 2019-12-23 02:52:49
问题 I'm writing a XM desktop application (I plan on releasing the source on github when I'm finished if anyone is interested) Anyway, the one part I know very little about is how to play media within Python (I'm using PyQt for the frontend). Basically, I have a mms:// url that I need to play. I was wondering if there is a library that could accomplish this or something, really I just need someone to point me in the right direction. I know its possible, because SMplayer (Python implementation of