w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
VLC Webcam Streaming: How to go from a single stream to parallel streaming efficiently?
You will have to use some streaming service. Very likely it will cost you a pretty penny, if you want to tailor it to your needs (embedding on your website, changing design and so on). Try Livestream.com, Ustream, TV1.EU Or you may set up your own streaming service with the help of RED5 or ErlyVideo

Categories : HTML

Node Streaming, Writing, and Memory
res.write(start) var A = fs.createReadStream() var B = fs.createReadStream() var C = fs.createReadStream() A.pipe(res, { end: false }) A.on('end', function () { B.pipe(res, { end: false }) }) B.on('end', function () { C.pipe(res, { end: false }) }) C.on('end', function () { res.write(finish) res.end() })

Categories : Node Js

Play! 2 WS library : Detect and Handle Closed Connection in Streaming HTTP response
It seems it is not longer the problem in Play 2.2.3. Function passed to map as defined below should be invoked with Unit when the stream closes: val connection = WS.url("http://example.com") .get(_ => iteratee).flatMap(_.run) map { _ => println("closed") }

Categories : Scala

What I need to know to do asp.net streaming
To limit the video as per your requirement you need to use GenericHandlers in asp.net. It must be designed in such a way that the url must expire after reaching the above condition. For Example, you can generate a random key that should append with the url (ie, QueryString) and store it in Database along with the time of generation. You can make the key expire after 3 hours then. To play the video on your website you can add jQuery plugin videojs. The documentation will help you to add that simple HTML5+Flash video player.

Categories : Asp Net

Streaming a video with PHP
The issue is in the range download function.In this function you are headers are correct.but you are printing the complete file as the response. These changes should fix your problem. // Notify the client the byte range we'll be outputting header("Content-Range: bytes $start-$end/$size"); header("Content-Length: $length"); Here you need to seek the file to start specified in the content-range headers. fseek($fp,$start) /* MISSING CODE */ Inserting the above line should fix your problem. // Start buffered download $buffer = 1024 * 8; while(!feof($fp) && ($p = ftell($fp)) <= $end) { if ($p + $buffer > $end) { // In case we're only outputtin a chunk, make sure we don't // read past the length $buffer = $end - $p + 1; } set_time_lim

Categories : PHP

Is there any public streaming api?
There is no streaming API for GitHub. I doubt they have plans of adding one either to be frank. Your initial request can get the last 30 events and then poll with the ETag header of that request for updates. You'll need to be authenticated (somehow, not necessary via an app) to make it work. Considering each request should come from a different IP address I would hazard a guess that the rate-limits wouldn't be applied globally to all visitors regardless of who they're authenticating as. That, however, would be an excellent question for the API support team at GitHub.

Categories : Api

Nodejs mp3 streaming
One very simple reason why you are getting the first response 'in here' is probably because your browser is looking for a favicon file, which your node application responds with a 404. This is what I have generally observed when you try to write a simple app in node.js. As to why the audio isn't streaming, I have to look into it properly. But I don't know why you are trying to set a content-length as node.js httpServer, as it supports writing chunked responses (Transfer-Encoding: chunked) by default (which is what you need for streaming). There is something obviously wrong with this approach, but I will have to look into it properly to give you a definate answer.

Categories : Node Js

Streaming .asf on android
Generic Android (AOSP) supports very limited set of codecs and containers - see http://developer.android.com/guide/appendix/media-formats.html Some devices do support additional codecs/containers, but as non-standard extension. ASF with MJPEG stream is not supported by AOSP. But it shouldn't be too hard to implement it in the user mode - this is a camera, so you don't need to worry about stream position (for seek and rewind) and MJPEG is simple to decode and display. Just read the stream and display as a sequence of frames.

Categories : Java

Streaming an IEnumerable
The TextReader Class exposes multiple methods to read data. If you pass an instance to some external code, it may use any of the methods, not just the ReadLine Method. The methods that you need to override at a minimum are the Read Method and the Peek Method. If you don't override them, they both always returns -1, indicating that the end has been reached. All other methods, including the ReadLine Method, provide default implementations based the Read Method. You can override them (for example, for improved performance), but you are not required to. From MSDN: Notes to Inheritors A derived class must minimally implement the Peek and Read methods to make a useful instance of TextReader. So your implementation does not work as is.

Categories : C#

HLS streaming onto IOS devices
It's normal that when the playlist is for a live stream (without the #EXT-X-ENDLIST) that the client will start playing a few segments from the end of the playlist. This is because it expects that the playlist will be continually updated with more segments and the client will retrieve the playlist in a loop. You can fix it just by adding the #EXT-X-ENDLIST tag at the end of the playlist. Or maybe you expect that the stream continues to grow, in that case, you can try with an event playlist with this tag: #EXT-X-PLAYLIST-TYPE:EVENT The expected behavior of the client is not specified, so I don't know for sure if the application will start playing it from the beginning, but at least it should be able to seek to the start.

Categories : IOS

soundcloud streaming IE8
Fundamental difference between IE8 and IE9+ is HTML5 audio support. EDIT: soundmanager has a flashplayer fallback for older browsers. Do you have flash in IE8? Does the soundmanager demo work in your IE8

Categories : Javascript

Threading with Hadoop Streaming
I tried to use threading with python, there were issues with the Global Interpreter Lock. Ported code to use the multiprocessing module, internally hadoop assigns as many mappers as there are cores in the cluster, hence multiprocessing is not the way to go if you need speed up. Multithreading if performed right might give some speedup

Categories : Python

Audio Streaming from Microphone
Create a new WaveIn object call StartRecording in the DataAvailable event handler, transmit args.BytesRecorded bytes from args.Buffer across the network. Note that this will mean you are transmitting PCM, which is not very efficient. Normally for network streaming you would use a codec. In the NAudioDemo source code there is a Network Chat demo showing this in action.

Categories : C#

Video not streaming mysql php
Is there anything in your database tables? If there isn't, you would be able to run the script, and it would run without any output or errors. The mysql query wouldn't fail, and the while loop would never run. Try putting something like this that checks to see if you get any data returned from your query. var_dump($result); And depending on the output now, as it will print something, even if there isn't any data in your table, people can have an easier time finding problems.

Categories : PHP

hadoop 1.1.2 - streaming jar not found
Um, dumb question but did you verify that A) the file exists and B) you have permissions to access it? Also, try accessing the file like ./contrib/streaming/hadoop-streaming.jar or even the fully qualified path to it. I just noticed that you were running your code from ~/hadoop/contrib. You need to take off the leading contrib from you paths

Categories : Misc

Hadoop streaming fails in R
HADOOP_HOME should be a directory. HADOOP_CMD should be a program. So since they are set to the same thing, that's wrong right there. But HADOOP_CMD should supersede HADOOP_HOME so that shouldn't be the root cause. So the only option left is debugging. If you had read the debugging guide you would have digged out stderr and would know a lot more already. With the console output only, there's nothing to work on.

Categories : R

How to prevent concurrent streaming
You should stop your media player in onPause method, and also say mediaPlayer=null; @Override protected void onPause() { super.onPause(); mediaPlayer.stop(); mediaPlayer=null; }

Categories : Android

Live streaming video in Qt
Decoding is no problem. You can use the QMediaPlayer class. Under Linux it actually uses the gstreamer libs. Encoding is not implemented. This is a bit beyond the scope of Qt5. And don't let the classes QMediaRecorder or QVideoEncoderSettings confuse you. They are mainly helper classes for QCamera or QRadioTuner, which provide an already encoded stream from their devices. If you need to encode single images into video frames and put them into a container, you need a 3rd party lib like ffmpeg. Streaming a video from on pc to another is easily implemented with Qt5. Encoding or transcoding cannot be done with Qt5 alone.

Categories : Qt

Any way to get streaming reads from a Database?
here's example of python connection to mongodb and getting data line by line from pymongo import MongoClient client = MongoClient() db = client.blog col = db.posts for r in col.find(): print r raw_input("press any key to continue...")

Categories : Database

audio streaming to the server
Question is too common, but definitely you can. As an concept you can try something like that. Override doPost method in your servlet: protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { InputStream in = (InputStream) request.getInputStream(); int read = 0; byte[] bytes = new byte[1024]; while ((read = in.read(bytes)) != -1) { // save your data } in.close(); } On the client side just post portions of data.

Categories : Java

How to do streaming with .pls files in android?
Get URL from .pls file This will return URL like http://stream2.streamq.net:8020 package com.direct.radio.global; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.util.LinkedList; import android.content.Context; import android.util.Log; public class GetStreamingUrl { private static String LOGTAG = "GetStreamingUrl"; private Context mContext; public GetStreamingUrl(Context context) { Log.i(LOGTAG, "call to constructor"); this.mContext = context; } public LinkedList<String> getStreamingUrl(String url) { Log.i(LOGTAG, "get streaming url"); final BufferedReader br; String murl = null; LinkedList<String>

Categories : Android

Twitter Streaming API unauthorized
You are either providing it with incorrect credentials or there is a bug causing the incorrect signature to be calculated. Setting log level to DEBUG might be helpful here. Using my credentials from the twitter application page I had no problems fetching the stream using from requests_oauthlib import OAuth1Session key = "<your client key>" secret = "<your client secret>" token = "<your token here>" token_secret = "<token secret>" twitter = OAuth1Session(key, client_secret=secret, resource_owner_key=token, resource_owner_secret=token_secret) r = twitter.get( 'https://stream.twitter.com/1.1/statuses/filter.json?track=twitter', stream=True ) for line in r.iter_lines(): if line: print line which

Categories : Python

Streaming in a char Number
You are reading a char at a time, which means you get '1', '3', skips the space, '1', '4', skips the space, etc. To read the values as NUMBERS, you need to use an integer type as a temporary: unsigned short s; bytes >> s; myChars[i] = s; Now, the stream will read an integer value, e.g. 13, 14, and store it in s. Then you convert it to a unsigned char with myChars[i] = s;.

Categories : C++

SoundManager2 and Streaming URLs
The URL you're using is pointing to an m3u file. To get it playing via SoundManager you need to point directly to the streaming URL: http://stereo.wavestreamer.com:3056/Live (extracted from the m3u file). To get other "streams" like that playing you'll need to build some javascript that makes an ajax request to get the listen.m3u file and then extracts the actual stream URL from the playlist.

Categories : Misc

Twitter Streaming API and Authentication
To answer your question no unless if the the connection is client side....So I would make sure that the connection to twitter is Server side...Also if the servers are in a Web Farm, make sure they have the same outgoing Public IP

Categories : Android

Streaming video with Xuggler
I think you need to do something like this: IContainer iContainer = IContainer.make(); if (iContainer.open(inputStream, IContainer.Type.READ, format) >= 0) { IMediaReader mediaReader = ToolFactory.makeReader(iContainer); ... } ... based on what the javadocs say. It looks like the format needs to be obtained using static methods of the IContainerFormat class. If you supply a null format, the open method will attempt to guess the container type ... apparently.

Categories : Java

RTSP Streaming on iOS 6 with Xcode 4.6.1
I've examined many of those projects that you mentioned, and experienced on those well.. You can use ffmpeg libraries to make a rtsp streaming client, as ffmpeg supports rtsp protocol... But there is an important issue which I've seen in my tests that ffmpeg's rtsp protocol has some important issues when using UDP transport layer for streaming... Even with the latest version (2.01) many RTP packets are dropping during streaming so images become glitchy sometimes... If you use TCP or http transport layer, then it works well... For live555 project, this library works well with both UDP and TCP transports when streaming rtsp streams.. But ffmpeg is so much powerful/has many capabilities than live555. If you decide to use ffmpeg then, basically, you should follow the below steps, make a

Categories : Iphone

SAXON Streaming XPath in .NET
You might find that the best way to tackle this is using Saxon's XQuery with document projection. Essentially this works by filtering the event stream from the XML parser and building a tree that only contains the nodes that contribute to the result of the query. XQuery works better than XSLT for this because it's more amenable to static analysis, as it lacks the polymorphism of XSLT's template rules. By a strange coincidence, my colleague O'Neil Delpratt has been working on test cases for the .NET API and spotted today that there's no direct way of invoking XQuery document projection using that API. Take a look at it though, and try it from the command line or from Java; I'm sure it can be done in .NET, it might just require digging in a bit deeper than the public API. To do the same th

Categories : Xml

Unity3d web and streaming scenes
When using a streamed build the player will include all the levels that have been set up in the build settings in the order in which they appear in the build settings. Depending on how large your levels are, this might even be sufficient when having a "random access" use case. Since you can check the current progress of level loading using GetStreamProgressForLevel you could simply display a "loading" dialog if the player selects a level which is not yet ready. If you have like 10 levels 150kb each, that would be a 1.5mb download at max, which could be downloaded within a few seconds on a reasonably fast internet line. If you need something that is non-linear AND has large levels, you need to go the asset bundles route. Building asset bundles requires Unity Pro and you can only do it w

Categories : Unity3d

Android video streaming from url
There are some requirements for streaming to work. The file might not be encoded "correctly" http://developer.android.com/guide/appendix/media-formats.html For video content that is streamed over HTTP or RTSP, there are additional requirements: For 3GPP and MPEG-4 containers, the moov atom must precede any mdat atoms, but must succeed the ftyp atom. For 3GPP, MPEG-4, and WebM containers, audio and video samples corresponding to the same time offset may be no more than 500 KB apart. To minimize this audio/video drift, consider interleaving audio and video in smaller chunk sizes. You might be on an older version of Android that doesn't support it HTTP progressive streaming was only added in 2.2, HTTPS only supported 3.0+, Live streaming is only supported in even later v

Categories : Android

Live Streaming on WindowsPhone8
You have plenty of options: Option 1: Here is a good tutorial that explains how to implement video streaming using the Smooth Streaming Client SDK: http://mingfeiy.com/building-windows-store-apps-smooth-streaming-client-sdk-beta-2 Option 2: Another approach is to use the Player Framework for Windows 8 Metro Style Applications To summarize, this is an open source, robust video player framework for Windows 8, HTML5, Silverlight, Windows Phone and other application platforms. Find it here: http://www.geekchamp.com/marketplace/components/media-platform-player-framework Option 3: A Simple Windows 8 Smooth Streaming Media Player with a Slider Bar Control as in here : http://code.msdn.microsoft.com/windowsapps/A-simple-Windows-8-Smooth-ee98f63a To summarize: This sample shows how to use Smoo

Categories : Xaml

Audio Streaming Latency
Oddly enough the latency was appearing on the client side. After trying various combinations of settings I eventually decided to give DirectSoundOut ago instead of WaveOut. I was shocked to find that the latency shot way down. Guess I'll be using that in the future. dso= new DirectSoundOut(); //Direct Sound Removed nearly all latency //WaveOut waveOut = new WaveOut(); waveProvider = new BufferedWaveProvider(codec.RecordFormat); //WaveOut.Init(waveProvider); //WaveOut.Play(); dso.Init(waveProvider); dso.Play();

Categories : C#

Twitter streaming api hangs
Well it's a streaming API, so it will stream infinitely. Hence if you are trying to read to the end of stream, it will block forever until you run out of memory or get disconnected due to network error etc. You need to process the data while connected to the stream. If I were you I'd just use a client library (see https://dev.twitter.com/docs/twitter-libraries).

Categories : Twitter

PostgreSQL 9.2 Streaming Replication
i have been working on postgresql replication right now you have not give proper description about your problem 1) how you down the master killing postgres process or stop the master there is no solution when master down using killing postgres except rsync because when master kill down master may have committed locally so there is inconsistency in data of master and slave due to master go ahead and slave left behind so next when old master try to came up as slave it will try to redo log at last checkpoint but it will not find that wal file from new master (old slave).

Categories : Postgresql

Catch exception while streaming mp3
playSong.setBackgroundResource(R.drawable.play_nr); you can't edit your layout from inside a thread, define a handler at the beginning of your activity's class Handler handler = new Handler(); then use it inside doInBackground: handler.post(new Runnable() { @Override public void run() { playSong.setBackgroundResource(R.drawable.play_nr); } });

Categories : Android

Video Streaming in WPF Application
My first thought was to just open the file using a decryption stream, but apparently MediaElement doesn't allow you to play a stream directly. If having the unencrypted file left the user's file system isn't a problem, you could just decrypt the file as one step, then assign the source of the MediaElement to the decrypted file. If leaving the unencrypted version laying around isn't an option, then you will likely need to investigate another playback component (some are outlined in the answer I referenced above).

Categories : Wpf

Streaming XML Mime Type?
Sounds like apart from your streaming requirements, your content is actually a Multipart message with several application/xml parts. With this layout application/json parts could also be mixed in your message. If your individual XML Fragments are part of larger documents take a look at the (somewhat old and understated) XML Fragment Interchange W3C Candidate Recommendation. It defines a nice syntax to wrap fragment bodies together with contextual information about the original document.

Categories : Http

How does DRM video Streaming happens under the hood?
Although quite reasonable, your question does not really fit the Stack Overflow's format. But I'll give you some hints and resources to check out: Microsoft PlayReady Overview - check it and related pages (like Learn More, White Paper) EZDRM Content Protection with Windows Azure Media Services Task Preset for Windows Azure Media Encryptor Clients of DRM protected content can be developed in Silverlgiht, Windows Store App, iOS native app (this one is not open to the wide public!). Never tried Android and HTML 5. In short - don't worry! If you use a DRM solution, your users will not be able to save the videos. However, one can always do a screen capture using [Expression Encoder Screen Capture | Camtasia Studio | Any screen capturing software]. So there is no full 100% content protectio

Categories : Azure

Streaming JPEGs from a Cellphone Camera
I've done something similar and ended up moving that into native code and made a JNI call to convert from NV21 and stick onto a circular buffer. Have a 2nd thread read off the buffer and do the network IO so you can return from onPreviewFrame as quickly as possible. Even better, copy the nv21 data to the circular buffer and have that 2nd thread do the jpg conversion before sending the data on the network. by the way, I did this for a video chat client. It worked well but I've since moved to sending H.263 frames. It's more efficient than sending JPGs if you are also doing a video chat client.

Categories : Java

How to create streaming endpoint on server?
You can do this with express (or more accurately the underlying functionality build into the http server). You can make repeated calls to request.write and call request.end once you're done sending data. Alternatively, if you have a stream, you can pipe that to the response.

Categories : Node Js

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.