video-streaming

Why is fs.createReadStream … pipe(res) locking the read file?

谁都会走 提交于 2019-12-05 20:33:11
I'm using express to stream audio & video files according to this answer . Relevant code looks like this: function streamMedia(filePath, req, res) { // code here to determine which bytes to send, compute response headers, etc. res.writeHead(status, headers); var stream = fs.createReadStream(filePath, { start, end }) .on('open', function() { stream.pipe(res); }) .on('error', function(err) { res.end(err); }) ; } This works just fine to stream bytes to <audio> and <video> elements on the client. However after these requests are served, another express request can delete the file being streamed

Playing video from app cache dir

本秂侑毒 提交于 2019-12-05 17:24:33
Can anyone explain why downloading/playing a video from my applications cache directory does not work, but downloading/playing the same video from my sdcard does work? Note: this video is being downloaded. I am saving to memory before calling VideoView.setVideoPath(...) . // Works File file = new File(Environment.getExternalStorageDirectory(), "vid-test.3gp"); // Does not work File file = new File(getCacheDir(), "vid-test.3gp"); In each case the file in question does exist. If I attempt to call VideoView.setVideoURI(...) and "stream" the video to my VideoView , it is hit and miss whether or

Local Video Renderer in Android WebRTC

时间秒杀一切 提交于 2019-12-05 17:17:28
I am using this library: https://bintray.com/google/webrtc/google-webrtc What I want to achieve (at least, at the beginning of my project) is render video locally. I am using this tutorial (which is the only one around the Internet) https://vivekc.xyz/getting-started-with-webrtc-for-android-daab1e268ff4 . Unfortunately, the last line of code is not up-to-date anymore. The constructor needs a callback which I have no idea how to implement: localVideoTrack.addRenderer(new VideoRenderer(i420Frame -> { // no idea what to put here })); My code is exactly the same as in the posted tutorial. This is

Change Frames Per Second for VLC Stream

可紊 提交于 2019-12-05 15:59:56
We are currently experimenting with streaming a webcam attached to one of our Linux servers (Ubuntu 12.04) using VLC, and although we are able to successfully stream the video and view it remotely, we need to change the number of frames per second (which is defaulting to 24). We are currently using the following command to create the stream: vlc v4l2:// :v4l2-dev=/dev/video0 \ :v4l2-width=640 \ :v4l2-height=480 -- \ sout="#transcode{vcodec=theo,vb=256}:standard{access=http,mux=ogg,dst=:8090}" \ -I dummy Would someone be able to show us how to modify this to change the number of frames per

PHP Streaming video handler

别来无恙 提交于 2019-12-05 13:56:10
I'm trying to implement a video streaming solution based on user access. I have many video streams located on a private network connected to the server (http//192.168.100.101/mpeg4/1/media.amp), and I want to "proxy" that video stream through the web server. I know how to setup the user access part, but how can I proxy the video stream to the user? I have tried something like this, but it does not seem to work. header('Content-type: application/x-rtsp-tunnelled'); $ch = curl_init (); curl_setopt ($ch, CURLOPT_URL, "http//192.168.100.101/mpeg4/1/media.amp"); curl_setopt ($ch, CURLOPT

How to simulate a webcam device [closed]

允我心安 提交于 2019-12-05 13:39:15
I am working on a project which I need to synthesize a video from existing frames and then format it exactly like a webcam device and make it available to external computers. In other words, this USB output should look exactly as if it was generated by a webcam. Can someone provide some hints about any existing library or any methodology to do this? The target system to create "webcam" output via USB is UBUNTU. Thanks Web cams are usually accessed through a library or the operating system rather than as low level USB devices. In python, one option to read webcam frame is https://github.com

Generate Thumbnail from server video link android

柔情痞子 提交于 2019-12-05 12:55:47
Is it possible in android to get thumbnail of any kind of video of someone has a url link of that video only and video can be from any source like youtube or whatever is source.Please tell me if it is possible or not.Here is my java code by which i am trying to get a thumbnail of youtube video.. public class MainActivity extends Activity { String path = "http://www.youtube.com/watch?v=HMMEODhZUfA"; Bitmap bm; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); ImageView image_View = (ImageView) findViewById

Detecting and intercepting video playback in UIWebView

 ̄綄美尐妖づ 提交于 2019-12-05 11:49:46
I would like to intercept a click in an UIWebView and then use the URL of the video. How is this possible? I found a somewhat similar post which pointed met to the webView:shouldStartLoadWithRequest:navigationType: delegate. I cant seem to get the loaded url of the video with this delegate. I am trying to get the code working in iOS8 There is a hacky way of finding the URL by listening for the AVPlayerItemBecameCurrentNotification notification. This notification is fired when a UIWebView shows the media player, and it sends an AVPlayerItem as the notification's object. For example: [

Ios rotate, filter video stream in ios

若如初见. 提交于 2019-12-05 10:53:10
Hello There I am rotating and applying image filters by GPUImage on vide live stream The task is consuming more time than expected resulting over-heating of iPhone Can anybody help me out in optimising my code Following is my used code: - (void)willOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer{ //return if invalid sample buffer if (!CMSampleBufferIsValid(sampleBuffer)) { return; } //Get CG Image from sample buffer CGImageRef cgImageFromBuffer = [self cgImageFromSampleBuffer:sampleBuffer]; if(!cgImageFromBuffer || (cgImageFromBuffer == NULL)){ return; } //We need rotation to perform

Android Widevine HLS/DRM support

拟墨画扇 提交于 2019-12-05 10:24:16
It will be soon 2 years since Google acquires the Widevine company that provides the DRM support for protecting e.g. the HLS H.264/AAC streams. According to the http://www.widevine.com/ not only Android, but also iPhone/iPad and game consoles like Wii or PS3 ares supported. Does anybody experience with the Android Widevine DRM? Regards, STeN you must be certified by google to work with the Widevine APIs. the certification is called CWIP and requires paying a substantial sum and going through a course. 来源: https://stackoverflow.com/questions/10350245/android-widevine-hls-drm-support