w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Live video stream using OGG video chunks
I don't believe there are many popular libraries for OGG encoding out there. However, it would probably be best to create your own. I would start here: http://tools.ietf.org/html/rfc5334

Categories : C#

Stream video from iPhone to web server - compress and stream step
Take a look at http://www.gdcl.co.uk/2013/02/20/iOS-Video-Encoding.html. This sample uses an AVAssetWriter to encode the video from the camera to H264 and then uses RTSP/RTP to stream the data to a player.

Categories : Iphone

Clojure: Creating a lazy sequence of byte chunks from an input stream
There are a couple issues. First, your lazy sequence isn't entirely correct. The whole body of the function should by wrapped in lazy-seq, and it should pass in either the cons to continue the sequence, or nil to terminate it. (defn byte-chunk-seq [stream] (lazy-seq (if-let [buf (read-or-nil stream)] (cons buf (byte-chunk-seq stream)) nil))) Second, take is also lazy. So the lazy sequence is not going to be realized until after with-open has closed the stream. You can avoid this error by wrapping a doall around the lazy sequence to realize it before the stream is closed. (with-open [rdr (java.io.FileInputStream. "/tmp/wut")] (doall (take 2 (byte-chunk-seq rdr))))

Categories : Clojure

I want to stream video from my webserver, but I only want it to stream when there is a viewer
Try Page Visibility API. Supported Browsers : http://caniuse.com/#feat=pagevisibility

Categories : Javascript

401 Response after 1 hour of successfully uploading 380 previous video binary chunks
This is a due to a server side bug. See http://code.google.com/p/gdata-issues/issues/detail?id=5124 for details.

Categories : Dotnet

Creating smaller chunks from large file and sort the chunks
You have whitespace in your input: >>> int(' ') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '' >>> int(' ') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '' >>> int(' ') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: invalid literal for int() with base 10: '' Whitespace is stripped when converting to int, hence the confusing error message; note how there is nothing between the quotes in the exception message (Python 3 has fixed this). Strip spaces: current_chunk = filter(None, map(str.strip, item)) or avoid turning them to int

Categories : Python

Algorithm to unify contiguous chunks in a collection of chunks
NOTE: there was an error in my original algorithm, where I only considered blocks to the left of the current block. Use two associative tables (e.g. unordered_map), one mapping the begin address to the Chunk, another mapping the end to the Chunk. This lets you find the neighbouring blocks quickly. Alternatively, you can change the Chunk struct to store a pointer/id/whatever to the neighbouring Chunk, plus a flag to mark to tell if it's free. The algorithm consists of scanning the vector of chunks once, while maintaining the invariant: if there is a neighbour to the left, you merge them; if there is a neighbour to the right, you merge them. At the end, just collect the remaining chunks. Here's the code: void unify(vector<Chunk>& chunks) { unordered_map<Ptr, Chunk> b

Categories : C++

Video Stream Hosting
How are you streaming and what streaming protocol are you using? Server to server wont help in securing the video.it is better to stream the video direcly from your Server 2(video host) directly to the client,so that it wont be overhead for server 1(web page video embed).You need to use secure way to protect you video on server 2.if the server2 is not secure,even if you stream through server1 it wont help. Here are details of security level on different video streamings. If you are using progressive download.This can be done using normal http protocol.In this approach you would be able to see the video url in the browser.Once you got the url you can download it as a normal file download.Security is very low here.Even if you sign the video url,the user can download the video easily. Str

Categories : Security

.htaccess/php to stream a video?
If you're not bound by apache, I've heard that ffserver is the way to go. You might also want to try nginx's nginx-rtmp-module. With apache, there's a streaming module as well. Lastly, you might just want to try one of the many CDN services. I know you said that you didn't want to use a service, but I felt that it was silly not to mention it. Many developers consider CDNs the default choice (including myself).

Categories : PHP

stream video to web site asp.net
Please See Link which is given below How can I stream webcam video with C#? http://www.codeproject.com/Articles/7637/DirectX-Video-Stream-and-frame-capture

Categories : Asp Net

Android Stream Video from url
Have you tried with Intent intent = new Intent(Intent.ACTION_VIEW); instead Intent intent = new Intent(Intent.ACTION_MAIN); I think it can helps you: Play youtube video from URL in android

Categories : Android

Stream video with CocoaHTTPServer
I fixed this problem by overriding httpHeaders of HTTPFileResponse like that : - (NSDictionary *)httpHeaders { NSString *key = @"Content-Disposition"; NSString *value = [NSString stringWithFormat:@"attachment; filename="%@"", [filePath lastPathComponent]]; return [NSDictionary dictionaryWithObjectsAndKeys:value, key, nil]; } It happens because HTTPFileResponse return video without extension. And MPMoviePlayerController can't read video without extension.

Categories : IOS

How to get video stream from webcam in emgu cv?
Not sure what you want to do with the data, but this will get you a single frame from the camera (and display it in a pictureBox on a WinForm) private void Form1_Load(object sender, EventArgs e) { var capture = new Emgu.CV.Capture(); using (var nextFrame = capture.QueryFrame()) { if (nextFrame != null) { pictureBox1.Image = nextFrame.ToBitmap(); } } }

Categories : C#

How to remove stream video in next scene AS3
video.attachCamera( null ) stops audio and video but the last frame remains in the video. you should just video.visible = false afterwards so you don't see that frame. there's a bug where clear() doesn't do what it should.

Categories : Actionscript

Android MP4 stream - Video cannot be played
Try this, it played the video for me <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <VideoView android:id="@+id/videoViewa" android:layout_width="match_parent" android:layout_gravity="center" android:layout_height="match_parent" /> VideoView videoView; videoView = (VideoView) findViewById(R.id.videoViewa); MediaController mediaController = new MediaController(this); mediaController.setAnchorView(videoView); //URI either from net Uri video = Uri.parse("http://www.fieldandrurallife.tv/videos/Benltey%20Mulsanne.mp4"); videoView.setMediaController(mediaController); vid

Categories : Android

How to stream video across LAN in android VideoView
I've been able to play smb:// shares over the network in a VideoView by: Using JCIFS to scan for and "see" the share: http://jcifs.samba.org/ Implementing a simple HTTP server (NanoHttpd) to stream the content via http: https://github.com/NanoHttpd/nanohttpd Passing the http://localhost/myvideo link to the VideoView I realise this seems convoluted (and I agree) but it's the only way I've managed to get it working (and working well, with seeking, etc.). I'd be interested if there are better solutions.

Categories : Android

How to stream a mjpeg video on a website
I'm not sure how you send camerasterring commands, because I don't see the javascript code here. Anyway, I find here a good aproach (https://github.com/wilhelmbot/Paparazzo.js) for your case: JS: // JavaScript example using jQuery // Active camera will refresh every 2 seconds var TIMEOUT = 2000; var refreshInterval = setInterval(function() { var random = Math.floor(Math.random() * Math.pow(2, 31)); $('img#camera').attr('src', 'video.php?r=' + random);//send a random var to avoid cache }, TIMEOUT); Html: <img id="camera" src="video.php" width="640" height="480" /> This code is only to refresh img element in order to get a new image... Can you show us how you send requests to camera?

Categories : PHP

Creating video from stream bitmap in android
I'm a little late here but yes there is a library for this. You can find it here, opencv for android . To integrate it with your android project, follow the instructions under "Quick Start for OpenCV and FFmpeg" The best part about this library is all of the jni wrapping is done for you. Although there is lack of documentation, there are a few links of similar projects to yours and how they accomplished it using this library which you can find here. Hope this helps.

Categories : Android

How can we get H.264 encoded video stream from iPhone Camera?
Short: You can't, the sample buffer you receive is uncompressed. Methods to get hardware accelerated h264 compression: AVAssetWriter AVCaptureMovieFileOutput As you can see both write to a file, writing to a pipe does not work as the encoder updates header information after a frame or GOP has been fully written. So you better don't touch the file while the encoder writes to it as it does randomly rewrite header information. Without this header information the video file will not be playable (it updates the size field, so the first header written says the file is 0 bytes). Directly writing to a memory area is not supported currently. But you can open the encoded video-file and demux the stream to get to the h264 data (after the encoder has closed the file of course)

Categories : Iphone

How to play a video stream that requires authentication?
OK, I got it working. Basically, the solution has 2 parts: make the HTTP request manually (with any required credentials or headers) wrap the response stream in a custom IRandomAccessStream that implements Seek by making another request to the server, using the Range header to specify which part of the stream I need. Here's the RandomAccessStream implementation: delegate Task<Stream> AsyncRangeDownloader(ulong start, ulong? end); class StreamingRandomAccessStream : IRandomAccessStream { private readonly AsyncRangeDownloader _downloader; private readonly ulong _size; public StreamingRandomAccessStream(Stream startStream, AsyncRangeDownloader downloader, ulong size) { if (startStream != null) _stream = startStream.AsInputStream(); _dow

Categories : C#

Video download/stream using Java servlet
The servlet which you found is indeed insuitable for the purpose of streaming a video file. It's more intented as a simple file download servlet for static files like PDF, XLS, etc. A lot of video players require that the server supports so-called HTTP range requests. I.e. it must be able to return a specific byte range of the video file by a request with a Range header. For example, only the bytes from index 1000 until 2000 on a file of 10000 bytes long. This is mandatory in order to be able to skip a certain range of the video stream quickly enough without the need to download the whole file and/or to improve buffering speed by creating multiple HTTP connections which each requests a different part of the video file. This is however a lot of additional code in the servlet which requir

Categories : Java

Passing input stream to video view
ok i have solved it myself but it has a 3 to 4 seconds delay before the video file starts Hope it helps some one : public static String getDataSource(String path) throws IOException { if (!URLUtil.isNetworkUrl(path)) { return path; } else { URL url = new URL(path); URLConnection cn = url.openConnection(); cn.connect(); InputStream stream = cn.getInputStream(); if (stream == null) throw new RuntimeException("stream is null"); File temp = File.createTempFile("mediaplayertmp", "dat"); temp.deleteOnExit(); String tempPath = temp.getAbsolutePath(); FileOutputStream out = new FileOutputStream(temp); byte buf[] = new byte[128];

Categories : Java

HTML 5 video recording and storing a stream
RecordRTC: WebRTC audio/video recording https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC Audio recording both for Chrome and Firefox Video/Gif recording for Chrome; (Firefox has a little bit issues, will be recovered soon) Demo : https://www.webrtc-experiment.com/RecordRTC/ Creating .webm video from getUserMedia() http://ericbidelman.tumblr.com/post/31486670538/creating-webm-video-from-getusermedia Demo : http://html5-demos.appspot.com/static/getusermedia/record-user-webm.html Capturing Audio & Video in HTML5 http://www.html5rocks.com/en/tutorials/getusermedia/intro/

Categories : Javascript

HTML5 player video won't stream when deployed
I think what you're looking to do is to enable Progressive downloads on your server. I don't know anything about your config but a google search will yield good results. Some more information: http://flash.flowplayer.org/plugins/streaming/pseudostreaming.html

Categories : C#

Creating http video stream using libVLC
Libvlc is the library to develop the application. vlc player is the client AND SERVER application to do that. If you just need to stream, use vlc media player as a server. You can find the command line / GUI steps if you google "vlc how to stream". Basically in the file open dialog you get the option to configure either to load a stream from another source or local file OR RUN your own application as a streaming server. The play button at the bottom of open dialog has a small button on the right to selec "stream" instead of play. But you need to have configured all options correctly to setup the type of stream you are looking for. Lastly, you can run another instance of vlc as client to test your stream locally.

Categories : Http

How to stablize the circle from video stream using opencv?
Hough transforms are known to be error prone. For your case, you may find contours in your image and filter them by their circularity. 1- grayscale 2- low pass filter (gaussian blur) 3- canny edge detection 4- find contours and list their areas. 5- draw min enclosing circles to your contours. 6- select the contour which has min enclosing circle area closest to contour area. 7- find center of mass of the contour using moments F3 type "mass centers"

Categories : C++

How to convert VIDEOHDR data to video stream using C++
I suppose you got the video resolution Width x Height and image format (RGB24, YUYV, or ...) from another way as it'snt in the VIDEOHDR struct. The VIDEOHDR struct you receive in the callback contain : lpData and dwBufferLength to display/render image you may need of an additional lib like SDL, OpenGL, OpenCV UI, MFC, QT using 1 of those lib You can : - create a window of Width x Height - configure the window rendering to interpret data correctly depending of your capture format, RGB24 or another. - anytime you get a new HDR in the callback, pass LpData to the render but first choose your rendering framework and come back if you need help.

Categories : C++

How to convert Live video stream from YUV(HDYC) to RGB
I am not sure why you tagged it with h.264, because HDYC is a flavor of UYVY pixel format, layout and subsampling, just with ITU-R Rec. 709 defined color space. So your question is how do you convert BT.709 YUV to RGB with FFmpeg. FFmpeg's libswscale can do this: its sws_scale does the conversion, and its sws_setColorspaceDetails lets you provide color space details for the conversion. /** * Scale the image slice in srcSlice and put the resulting scaled * slice in the image in dst. A slice is a sequence of consecutive * rows in an image. [...] */ int sws_scale(struct SwsContext *c, const uint8_t *const srcSlice[], const int srcStride[], int srcSliceY, int srcSliceH, uint8_t *const dst[], const int dstStride[]); /** [...] * @param table the yuv2rgb coef

Categories : C++

C api on capturing video stream from webcam using ffmpeg
You are basically repeating the question you are referring to. FFmpeg is basically the name of the library and the ready to use tool (command line interface). Its back end is a set of libraries: libavcodec, libavformat, swscale etc. There is no comprehensive documentation on these libraries, instead there are samples, there is mailing list and other sparse resources. Also, the libraries are open source and all these are quite usable once you get the pieces together. Specific questions on ffmpeg are asked/answered on StackOverflow as well.

Categories : C

Delay in playing video file from Input Stream
This delay is due to writing data to temporary file.Instead you can use ParcelFileDescriptor to avoid writing to a temporary file.You can use link(http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system) as reference.

Categories : Android

stream audio/video files from gridFS on the browser
The PHP GridFS support has a MongoGridFSFile::getResource() function that allows you to get the stream as a resource - which doesn't load the whole file in memory. Combined with fread/echo or stream_copy_to_stream you can prevent the whole file from being loaded in memory. With stream_copy_to_stream, you can simply copy the GridFSFile stream's resource to the STDOUT stream: <?php $m = new MongoClient; $images = $m->my_db->getGridFS('images'); $image = $images->findOne('mongo.png'); header('Content-type: image/png;'); $stream = $image->getResource(); stream_copy_to_stream( $stream, STDOUT ); ?> Alternatively, you can use fseek() on the returned $stream resource to only send back parts of the stream to the client. Combined with HTTP Range requests, you can do this pre

Categories : PHP

Live mjpeg video stream from server to android
You are promted for a login because the webcam is password protected. Normally with webcams you have to pass the username and password as part of the URL. eg. username:password@ip.address.or.dyndns.com:8085/folder/stream.jpg?size=large where the number at the end is the port number.

Categories : Android

NodeJS - How to pipe same video stream to multiple clients?
Streams can be thought of as fixed-sized queues in that they "buffer" or store a certain pre-defined amount of data before they either refuse to accept more or data begin to fall off the reading end of the stream; they can be considered queues in that they store data in "first in, first out" (FIFO) order. Writing to a stream makes data available to be consumed by all of the stream's current readers (those entities which have opened the stream for reading.) Reading from a stream removes a fixed amount of data from one end of the stream, freeing up space on the other end to potentially accept more data. Once data are read from the stream and more data have been added to the stream to fill its buffer, those data which have been read are gone. Node.js streams can indeed have multiple reade

Categories : HTML

Playing RTSP Video stream with authentication Android
You can set your headers manually when using setDataSource (Context context, Uri uri, Map<String, String> headers). I'd guess (never worked with RTSP, yet) that you need an "Authorization" header with a base64-encoded username and password combination.

Categories : Android

How to send images, audio, video stream using socket.io?
Check this tutorial as starting point to implement what you need : http://net.tutsplus.com/tutorials/javascript-ajax/how-to-create-a-resumable-video-uploade-in-node-js/

Categories : Node Js

Smooth video playback with HTTP Live Stream
The basic strategy is more or less as follows. You start by processing the manifest file and downloading the first few segments to fill your buffer. You begin playback once you are happy you have enough data in the buffer, while continuing to download additional segments sequentially until the end of the manifest, at which point you request it again. If you find new segments in the refreshed manifest, you add these URLs to your download queue. If you do not, you wait for a predetermined period of time and refresh the manifest again. For example, your client could poll the M3U8 manifest depending on the (total duration of the segments * number of segments / 2). I know some commercial players enter a paranoid mode when the playback buffer is getting low and the refreshed manifest does

Categories : Misc

How can I play Apple HLS live stream using html5 video tag
These are the formats you can play using html5 source tags. Think of a video format as a zip file which contains the encoded video stream and audio stream. The three formats you should care about for the web are (webm, mp4 and ogv): .mp4 = H.264 + AAC .ogg/.ogv = Theora + Vorbis .webm = VP8 + Vorbis

Categories : HTML

save video stream to file without losing performance
Writing to disk is a low intensitivity task for the CPU, it mostly just uses a memory buffer and some memory bandwidth. However, if you have to access the disk while you are writing to it, you will experience an increased delay. As for how to do it; I have never worked with video before but I am thinking it is most easily done by using a buffer to hold the captured frames, and then writing from that buffer to the disk. Saving the frames into arrays of 125 images (5s*25fps) sounds like an inefficient way to buffer the frames. As for avoiding losing performance there really is no a way to do this; however I cannot see you losing much performance as the bitrate of the captured video and audio is comparatively low.

Categories : C#

Stream Audio/Video from an iphone app using HTTP Live Streaming
If you really want to stream from an iPhone app you can't do this with the iPhone acting as a server. You need a separate server where you can send data from the iPhone app. So you can use the camera or the microphone in the app to get live content and then you can send asynchronously data to the server, which using mediastreamsegmenter and variantplaylistcreator will convert the data to ts segments and then will append them at the end of the m3u8 file and meanwhile another iPhone app can act as a client and watch the live content that you are streaming from the first app. From my experience this is the only way to achieve that. Hope that helps.

Categories : Iphone

recording live video stream from tv card using ffmpeg in windows
First be sure that the video label you use is really the label return by: ffmpeg -list_devices true -f dshow -i dummy More info here But another solution should be ti use the old "Video For Windows" (VFW). To try that, list your device with: ffmpeg -y -f vfwcap -i list And use your device number as value of the -ioption: ffmpeg -y -f vfwcap -r 25 -i 0 out.mp4 And if finally you are able to record your stream, there is different options, but in your case everything is clear describe here ffmpeg -y -f vfwcap -r 25 -i 0 -f image2 -vf fps=fps=1 out%d.jpg

Categories : Windows



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