FAQ Database Discussion Community


Streaming binary file from SQL Database through Apache Camel back to endpoint

java,rest,servlets,streaming,apache-camel
I'm trying to get some varbinary data out of an SQL database, when a REST call is made to my Camel service. I can get the data as a byte array and set that as the body of the Camel Exchange, and then Servlet will return that as raw bytes...

hadoop streaming don't untar archives

hadoop,streaming
when writing hadoop streaming task. i used -archives to upload a tgz from local machine to hdfs task working directory, but it has not been untarred as the document says. I've searched a lot without any luck. Here is the hadoop streaming task starting command with hadoop-2.5.2, very simple hadoop...

approximate histogram for streaming string values (card catalog algorithm?)

string,algorithm,sorting,streaming,histogram
I have a large list (or stream) of UTF-8 strings sorted lexicographically. I would like to create a histogram with approximately equal values for the counts, varying the bin width as necessary to keep the counts even. In the literature, these are sometimes called equi-height, or equi-depth histograms. I'm not...

How to have current [indexPath.row +1]?

ios,streaming,avfoundation,spotify,music-player
I'm building a Spotify iOS SDK music client and am stuck at how to get it to play the next track. The SDK comes with a SPTAudioStreamingPlayer takes in the URI of a track. I have an array of Spotify SPTSavedTracks and would like to be able queue/skip to next...

Nodeschool's Stream-Adventure #7 HTTP Server

node.js,streaming
I'm doing something wrong in Nodeschool's stream-adventure exercice #7 - Http server. Here's an exercice description gist. This is the code I've done so far: var http = require('http'); var through = require('through2'); var server = http.createServer(function (req, res) { if (req.method != 'POST') return; var stream = through(function write(buffer,...

H.264 encoding using Windows media foundation

.net,windows,c++11,streaming,h.264
I am developing an server application that stream high quality real-time video of a windows application. Looking at the advantages of H.264, I am planning to use this format for video stream. I know there are many third party codecs, but can I use windows media foundation API to encode...

How to in RTSP protocol TEARDOWN only one track?

streaming,rtsp
I do: PLAY rtsp://addr/track1 I get ok response and I send another one but for track2. One is for audio and another one is for video, question is: How can I TEARDOWN only one of them only? let's say: TEARDOWN rtsp://addr/track1. Is this even possible or should I just TEARDOWN...

How to get direct streaming url from this flash online streaming radio station?

flash,streaming,audio-streaming
I checked the web console and source code of http://www.allindiaradio.gov.in/Gold.htm but could not figure out

decoding android h264 encoded stream on windows using media foundation

android,streaming,video-streaming,live-streaming,ms-media-foundation
I am trying to decode h264 encoded camera frames streamed from an android device on a windows pc. I am using the MediaFoundation H264 decoder to decode every frame sent from the android device. However I keep on getting the error 'more input samples are required to process output error'....

Check if a Radio Streaming url is working or not with Javascript

javascript,php,jquery,streaming,radio
Hi I'm doing a website which contains several radios. I need to know, through javascript, if a radio stream url is working or not. I achieve this in PHP doing a file_get_contents($radio_source, false, NULL, -1, 600);, doing this I know that if the request reached the limit (600) then the...

Send 2 different camera feeds to ffserver from ffmpeg

ffmpeg,streaming,ffserver
I'm currently working in a project where I have to stream 2 webcams streams from a computer to another through a TCP connection, I can stream 1 without problem: using ffserver.conf: HTTPPort 8090 HTTPBindAddress 0.0.0.0 MaxClients 40 MaxBandwidth 30000 CustomLog - NoDaemon <Stream status.html> Format status ACL allow localhost ACL...

MarkLogic 8 - Stream large result set to a file - JavaScript - Node.js Client API

javascript,node.js,streaming,marklogic
Let's say I have a query that is going to return a very large response. Possibly thousands of records and possibly gigabytes of data. Normally in the UI, we just show a single page of this data. Now I need an option to take the entire result set and stream...

How to implement this TCP stream reader in Spring Integration?

java,spring,tcp,streaming,spring-integration
I would like a Spring Integration implementation of a stream reader. Another application (outside of java) sends streams of data (delimited by dollar-signs) to port 9999. This server listens. First I made sure the stream was streaming by connecting to it with telnet 127.0.0.1 9999. Then I created a simple...

Why is Spark fast when word count?

parallel-processing,streaming,apache-spark,bigdata,rdd
Test case: word counting in 6G data in 20+ seconds by Spark. I understand MapReduce, FP and stream programming models, but couldn’t figure out the word counting is so amazing fast. I think it’s an I/O intensive computing in this case, and it’s impossible to scan 6G files in 20+...

Using flume to read IBM MQ data

hadoop,streaming,message-queue,flume
I want to read data from IBM MQ and put it into HDFs. Looked into JMS source of flume, seems it can connect to IBM MQ, but I’m not understanding what does “destinationType” and “destinationName” mean in the list of required properties. Can someone please explain? Also, how I should...

How to do audio stream processing in Linux(RPi) via C?

linux,audio,streaming,raspberry-pi,portaudio
Hej I would like to build an audio effect into a RPi. This effect should be programmed in C. I am not familiar with the software audio interfaces in Linux. The ALSA interface looks very complicated. Port Audio seems to be an alternative. Any ideas(maybe with a tutorial)?

Stream audio using ionic and phonegap will it make compression?

streaming,ionic-framework
If I use Ionic framework and phonegap to build a streaming app, will those technologies make any compression on the audio I'm streaming? I have some wav files I need to stream, and there must be no compression at all. Best regards Rasmus Christensen...

ZeroMQ word count app gives error when you compile in spark 1.2.1

scala,streaming,sbt,apache-spark,zeromq
I'm trying to setup zeromq data stream to spark. Basically I took the ZeroMQWordCount.scala app an tried to recompile it and run it. I have zeromq 2.1 installed, and spark 1.2.1 here is my scala code: package org.apache.spark.examples.streaming import akka.actor.ActorSystem import akka.actor.actorRef2Scala import akka.zeromq._ import akka.zeromq.Subscribe import akka.util.ByteString import org.apache.spark.streaming.{Seconds,...

iOS Streaming MP3 File

ios,audio,streaming,buffer,mp3
I am a relatively new developer to iOS and I am writing an application that deals with streaming audio from an mp3 file on a website. I want to play the audio as I stream it and I want the user to be able to scrub through the audio. I...

Buffer a stream piped to res in node.js/express

node.js,ffmpeg,streaming
I have a command I'm running for video streaming via ffmpeg, that basically pipes the response to res within express. For example: var args = ['-re','-i','/video.mkv','-loglevel','quiet','-r',24,'-threads',7,'-b:v','512k','-b:a','96k','-c:v','libx264','-c:a','libfdk_aac','-ar',22050,'-f','flv','pipe:1'] , command = spawn('ffmpeg', args); command.stdout.pipe(res); What I'd like to do is "buffer" this for a few seconds before the output is piped to...

Spark streaming example calls updateStateByKey with additional parameters

scala,streaming,apache-spark
Wondering why the StatefulNetworkWordCount.scala example calls the infamous updateStateByKey() function, which is supposed to take a function only as parameter with instead: val stateDstream = wordDstream.updateStateByKey[Int](newUpdateFunc, new HashPartitioner (ssc.sparkContext.defaultParallelism), true, initialRDD) Why the need (and how does that get processed - this is not in the signature of updateStateByKey()?) to...

play framework Java chunked response

java,playframework,playframework-2.0,streaming
I am trying for java chunked response part of play framework. But it is not working .It seems like client side will start getting the data until all data is provided in server side. Code is pretty much like this , passing an infinite string to chunks. public static Result...

What's the best protocol for live audio (radio) streaming for mobile and web?

audio,streaming,protocols,shoutcast,internet-radio
I am trying to build a website and mobile app (iOS, Android) for the internet radio station. Website users broadcast their music or radio and mobile users will just listen radio stations and chat with other listeners. I searched a week and make a prototype with Wowza engine (using HLS...

Node js stream is pending

node.js,download,streaming
I have the following node route: router.route('/resource/:encodedString/:mediaType') .all(function (req, res) { var decoded = jwt.decode(req.params.encodedString, require('../secret')()); var mediaObject = decoded.mediaObject; res.header('content-disposition', 'filename="' + mediaObject.fileName + req.params.mediaType + '"'); var stream = fs.createReadStream(mediaObject.targetDir + mediaObject.fileName + req.params.mediaType); res.pipe(stream); }) Which is called by my client. However this does not give me...

Live streaming HLS via ffmpeg, How to force client to start playing from the beginning? From 1st segment

ffmpeg,streaming,video-streaming,http-live-streaming,hls
Is there a way, maybe via an ffmpeg option or flag, to force the client player to always start the playlist from the beginning when live streaming rather than the real time mid-stream? Say the user comes in 1mn after the stream has started, rather than starting to watch at...

How to convert real-time video streaming to chunk for P2P sharing

streaming,vlc,p2p,wowza
I am trying to implement a real-time video streaming broadcasting system, and using P2P technology to save the bandwidth of streaming server. I am using Wowza Streaming Engine to implement my streaming server. So the streaming server will receive real-time streaming of my camera. And I am using VLC library...

WCF Streaming Convert Byte[] to Class Object

c#,wcf,serialization,streaming,deserialization
I have a Streaming WCF service. It receives a stream of a serialized class called ContentObjectData. The bytes I receive in from the stream I have temporarily placed in an ArrayList as I don't know how big the Stream is and to be honest I don't know what to do...

Pausing sounds with SoundCloud API

javascript,audio,streaming,soundcloud
I'm fairly new to JS and I'm having trouble getting audio that is currently playing to pause or stop using the SoundCloud JavaScript SDK. I'm using a MEAN stack. In the 'ready' function I initialize the SC player: SC.initialize({ client_id: "my_client_ID", redirect_uri: "http://example.com/callback.html", }); ... $('#trackList table tbody').on('click', 'td a.linkplaytrack',...

How to embed RTMP live-stream?

html5,streaming,video-streaming,rtmp
I want to embed an RTMP Live Stream in a HTML document. I want to use HTML5 instead of flash (That it can work under *nix/osx/mobile devices). How can I do this? Do I need to use 3rd party libraries? When yes: Can you recommend one? I've found an answer...

Django: Passing value from template to view

django,django-forms,django-views,streaming,httpresponse
I HAD this situation: Clicking on a html submit button, I call views.stream_response which "activates" views.stream_response_generator which "activates" stream.py and return a StreamingHttpResponse and I see a progressive number every second up to m at /stream_response/: 1 2 3 4 5 6 7 8 //e.g. my default max value for...

Is twitter streaming api exactly 1 percent of the whole streaming?

api,twitter,streaming,tweepy
I am using tweepy package to crawl tweets. Just wonder whether the tweets I get are exactly 1 percent of all the tweets in the streaming? Anybody know that? Thanks in advance....

Why does Video JS HLS not work as expected only with 60 second segments?

streaming,video-streaming,m3u8,hls
To make a streaming service, I am serving m3u8 and ts files generated with AWS elastic transcoder. The video player I am using is video js with videojs-contrib-hls. I am providing the player with the master playlist 01.m3u8, which has the url to two different bitrate playlists 1M_.m3u8 amd 2M_.m3u8...

Can npm request module be used in a .pipe() stream?

node.js,request,streaming,npm-request
I am parsing a JSON file using a parsing stream module and would like to stream results to request like this: var request = require("request") fs.createReadStream('./data.json') .pipe(parser) .pipe(streamer) .pipe(new KeyFilter({find:"URL"}) ) .pipe(request) .pipe( etc ... ) (Note: KeyFilter is a custom transform that works fine when piping to process.stdout) I've...

Android - cast screen to chromecast via custom app

android,streaming,chromecast
I need to do the same thing of the Chromecast App (com.google.android.apps.chromecast.app) "Mirror screen" functionality: pressing a custom button the app asks to select the chromecast device to stream to and then start the screen mirroring to the selected chromecast device. Actually this feature is not documented anywhere. Have i...

Sending file as chunks from a java client to server

java,streaming,client-server
I wrote a java client which takes in the buffer_size for the byte array as a command line argument and declares a byte array in which as file will be read and sent to the server in chunks. Client will send the buffer_size to the java server before starting to...

How to read or write MP4 file from file stream in silverlight and vb.net application?

vb.net,silverlight,streaming,video-streaming,mp4
In my Silverlight web application,I am accessing mp4 audio file from client bin folder.I am saving this file stream to local folder on client machine using save file dialog box. I can play mp4 file in media element and can hear audio without any problem,But when I save file to...

3 seconds latency while streaming with Wowza Server

ffmpeg,streaming,rtsp,latency,wowza
I'm trying to develop a live streaming application with RTSP protocol. On the PC with the Wowza Server, I execute the following command : Code: ffmpeg -f dshow -i video="Name_Of_My_Cam":audio="Name_Of_My_Microphone" -vcodec h263p -f rtsp -muxdelay 0.1 rtsp://<Wowza_server_ip_adress>:1935/live/test And I'm trying to play this stream on a VideoView on my Samsung...

How to send data in a java socket program without closing socket

java,sockets,streaming,apache-spark,serversocket
i created a sever socket program to send a stream data to Apache spark.But data is received by spark after i close the socket or termination of program.i need to send data without closing socket and terminating program. import java.io.DataOutputStream; import java.net.ServerSocket; import java.net.Socket; import java.util.Scanner; public class SocketServer {...

Comet streaming: XHR streaming and Forever iFrame still possible in 2015?

iframe,xmlhttprequest,streaming,comet
I know I should probably use WebSockets or Server-Side Events, but what happened to the Comet Streaming techniques that involved writing chunked data from a server to either an iFrame or as a response to a xmlHttpRequest? I have stumbled upon multiple demos but none of them work as intended...

WCF Streaming System.OutOfMemoryException

vb.net,wcf,streaming,out-of-memory
In my streamed WCF application I get System.OutOfMemoryExceptions in my service for large messages (querying >7GB MSSQL tables using a datareader, messages might even exceed 7GB) while small messages work just fine. I can observe the memory usage grow constantly during the execution of DataReaderToExcelXml (see below). The weird thing...

Howto unzip a big zip file containing one file and get the progress in bytes with swift?

ios,swift,streaming,unzip
I try to unzip a big zip file containing only one file (more then 100MB) and like to show the progress during unzipping. I found solutions, which the progress can be determined based on the amount of files unzipped. But in my case I have only one big file. So...

Abstraction for stream interface (binary read-only input source)

c++,design,streaming
I am trying to provide a proper API for a read-only stream class. The std::istream interface is a little too complex since it contains formatting read, while I am only interested in binary read (have to deal with compressed streams). I came up with (requires C99 <stdint.h>): struct stream {...

HTML5 video rtsp not working

html5,video,streaming
I use this code: <video src="rtsp://stream.tn.com.ar/live/tnhd1" controls></video> Doesn't work. But in VLC media player rtsp://stream.tn.com.ar/live/tnhd1 works! In localhost shows me: Failed to load resource: net::ERR_UNKNOWN_URL_SCHEME Uploaded to a web server it shows me: Failed to load resource: the server responded with a status of 404 (Not Found) Failed to load...

Is it possible with linux to share a usb hdd via usb and network?

linux,streaming,dlna
i wonder if its possible with linux (esp raspberry pi) to attach my cable TV Receiver to my raspberry (master/slave?) that the Cable TV Receiver thinks the raspberry is a hdd but at the same time to allow clients in the network to get the recorded movies (for sure not...

Restart Python Script after BadStatusLine Error

python,api,python-2.7,streaming
I have a program here that streams market prices and executes orders based on the prices, however, every once in a while (few hours or so) it throws this error: Exception in thread Thread-1: Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner self.run() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763,...

Deadlock When Streaming From subprocess.Popen And Using Two Subcommands

python,python-3.x,streaming,subprocess,wsgi
In my wsgi application, I have to call a commandline tool to generate data and sometimes another commandline tool to convert that data. It all works through stdout/stdin. I'm using subprocess and I formerly used communicate, which worked fine but was slower since it's not streaming and trying to convert...

Video encoding pipeline - threads design

multithreading,encoding,streaming,video-capture,video-processing
I work on a system which does video capture & encoding of multiple channels. each stage takes time. The capture/encoding is done in HW, but still can take its time to finish. capture frames->encode->file-save (or stream to network) I have a dillema what would be a better approach/design: one thread...

How Does YouTube Stream Long-Form Videos to Mobile

html5,video,mobile,youtube,streaming
I'd like to know how YouTube plays long-form videos so quickly, with seeking, on mobile. This is an example video: https://www.youtube.com/watch?v=eyU3bRy2x44 I can load it just fine on mobile within 5-15 seconds and I can even seek through it. Are they using HLS? Or are they using any other streaming...

How to load additional JARs for an Hadoop Streaming job on Amazon EMR

python,hadoop,jar,streaming,amazon-emr
TL;DR How I can upload or specify additional JARs to an Hadoop Streaming Job on Amazon Elastic MapReduce (Amazon EMR)? Long version I want to analyze a set of Avro files (> 2000 files) using Hadoop on Amazon Elastic MapReduce (Amazon EMR). It should be a simple exercise through which...

What is the purpose of MustUnderstand property in WCF?

c#,.net,wcf,streaming
I have read some samples about the streaming communication in WCF and I noticed that the MessageHeader attributes are specified with the MustUnderstand property set to true. What is the purpose of this property? Why is this property set to true?