meloncholy / vid-streamer

VidStreamer.js: A simple streamer for Flash and HTML5-style videos. Supports HTTP pseudostreaming and works with JW Player's bitrate switching.
http://meloncholy.com
384 stars 64 forks source link

Not able to find the file #24

Open rolero opened 8 years ago

rolero commented 8 years ago

I am already trying to get the code to run for several hours. Maybe I can't figure it our because I am a newbie in Node.js. I have everything up and running. Just I am not able to find the file. I keep on getting the message:

"Ooh dear.Sorry, I can't find that file. Could you check again?"

My rootfolder is: /home/[username]/node The videos are located in the subfolder "videos": /home/[username]/node/videos The video to stream is called: movie.mp4 and is located in the subfolder.

Configuration file: { "mode": "development", "forceDownload": false, "random": false, "rootFolder": "/home/[username]/node/", "rootPath": "/videos", "server": "VidStreamer.js/0.1.4", "maxAge": "3600", "throttle": false }

I am using this url to request the video: http://192.168.40.30:3000/?fs=/videos/movie.mp4

What am I doing wrong? I have the feeling it's something really stupid that I am missing.

rolero commented 8 years ago

Okay I solved the issue by using the Express way to install and use the configuration setup described in the following article: http://stackoverflow.com/questions/27960366/how-to-stream-avi-film-files-with-node-js-file-opens-download-screen-instead

Currently I am analyzing if I could use vid-streamer.js as a replacement for my existing PHP code that is running on Apache2. One thing I am still missing: a solution like auth_mod_token. I want to serve my videos through a secure temporary URL that just can be used for x period of time. Would it be possible to get this done with vid-streamer.js? For example by using https://github.com/bruce/node-temp ? Any idea?

Currently I generate a MD5 token on my website (server). This token contains the id of the video file and the IP address of the user. This token plus the streaming server ip address, will be used as the video URL for my html5 video player. When the visitor clicks play, the URL is send to the server using JSON. The streaming server decodes the MD5 token and checks the ip. Then it uses the video id to ask the website server for the video file name(server based). When everything is okay, it will select the needed file and streams it too the visitor.