How to pass parameter in a link to open VLC? - html

It's an HTML page which I use only locally.
I have a link to a video in my HD like this:
Watch video
When clicking it, it launches the video with VLC directly as expected.
Now, I'd like to pass parameter inside like the starting time for this video.
In the shell for example you can do:
vlc /path/to/myvideo.mp4 --start-time=126
And it will launches the video at the 126 second point.
How can I do that with my HTML link?
I've tried for example:
Watch video
But it still launches it from the beginning of the video.

At this point I think you would need to use some kind of server-side wrapper/listener, as I had commented in a related question's old answer, the plugin is not available on modern web browsers anymore.
Depending on how badly you need to control the start time (and if its a thing you need to build into an application) then you could call the VLC HTTP Server via its web API and remote control to scrub the player forward on the user's desktop. If you had some kind of push mechanism in place you could even control that via a regular link on the web.
I would suggest to combine a framework like Pusher for the web controls:
https://github.com/pusher/pusher-js
Followed by your choice of backend language to listen over HTTP(S), and remote control VLC via its API (either HTTP or native):
LibVLC:
https://www.videolan.org/developers/vlc/doc/doxygen/html/group__libvlc.html
How to Use VLC Media Player API in a C Program:
https://progur.com/2017/06/how-to-use-vlc-api-in-c.html
VLCJ -- Java framework for the VLC media player: https://github.com/caprica/vlcj
Node.JS -- VLC API: https://github.com/jfhbrook/node-vlc-api .Net
Interface to VLC: https://wiki.videolan.org/.Net_Interface_to_VLC
PHP/Python/Perl options -- Linux control a running vlc process through command line:
Linux control a running vlc process through command line
No code option, just use the basic web interface that comes with VLC: https://www.howtogeek.com/117261/how-to-activate-vlcs-web-interface-control-vlc-from-a-browser-use-any-smartphone-as-a-remote/

Related

IP camera multicast stream on web

We are developing a project and a part of this project is showing live preview on web page. I should use multicast stream because there will be too many clients and none of them will directly connect to camera. I want to use multicast property of camera and no need to increase network traffic. I want to this very simple, I mean I want to show the stream on html img tag or something like this and give the source path (for ex : ) multicast IP address of the camera. I googled and could not find any clear solution. By the way I want to support all browsers so html img tag I prefered. I do not want to embed any video stream plugin because cross platform supporting. I need ideas or suggestion and a clear example. Thanks in advance..
There are many ways,
you can directly insert rtsp link inside your webpage using vlc plugin or Quicktime plugin, or you can make a server to read stream from the camera(may be using nodejs or gstreamer or opencv etc) and broadcast it to a http ip or send it in base64 images to webport and on the website you can read it using websockets, socket.io library

How to open html link to local file in its default program, NOT browser?

Basically, I'm creating a webpage filled with images of movie posters that link to video files, as a means of making a more visually-appealing form of my local video library.
I'm using
<a href="C:\blah\movie.mkv"><img src="poster.jpg">
It works exactly how I want, HOWEVER, it opens the file in the browser rather than opening it in its default program, as I would like. I would like each link to open the file in the program titled "VLC Media Player", as specified in Windows for each of their filetypes.
Let me know how I can do this (in the simplest form--I'm not too smart :P)
Thanks!
If you are creating web pages on your local system for you own use then you may want to consider looking in to a WAMP server setup. This uses php and should allow you to call VLC using the exec command. Would take some learning however.
There is very little you can do to control how a client will handle a resource.
You can use the Content-Disposition HTTP response header to state that the resource is an attachment (and thus recommend that it be downloaded instead of opened).
Content-Disposition: attachment;filename="movie.mkv"
You can't, however, stop browser native support or a plug-in from handling something instead of having it open in a separate application (let alone cause it to be opened in a specific application).
If the browser is configured to open video files internally, then nothing the author of a website can do will make it switch to using a application instead.

Record Video from Browser using Webcam and Microfone inputs

I need to record a video through user browser using input from camera and microphone and send to my server. Since html5 still doesn't make that magic happen, I'm looking for flash solutions.
Do I really need some flash media server to do that, or can I do a POST request?
I want to get both inputs(webcam and microphone), put them in a .flv and send to my server.
I've seen some implementations using bytearrays to record and send, audio and video separated. The problem is that it generates a series of synchronization problems when you try to compose them in a single file.
If you're still looking for a solution check out:
http://framebase.io
They have an embed-able recording widget that can transcode the videos automatically. I'd check out the docs, but on success, you can run an API call to check the status of transcoding and download it to your server or you can just use your own S3 bucket.

How to create HTML5 100% offline applications?

Sometimes I need to write a small program just to represent some data in a chart, or similar stuff. I have been wanting to do this kind of things through the browser, with HTML5. I think it would be nice to use its canvas to create a nice UI for simple apps.
I have read some articles related to offline applications with HTML5, but they focus on downloading all the data you need and save it to the cache to use it offline later. You even need to set up an Apache server (or similar) to create your app.
I don't need my app to be online, just in my computer. I just want to create a simple application, nothing to do with internet at all.
How can I do this? Is it even possible or worthy? Is there any "Hello world!" tutorial about this around there?
Something like Mozilla Prism would be good for displaying the content as an application.
There's no need to have a web server like Apache for just displaying HTML5/Javascript in a browser. You can just have it all in a folder on your desktop and then load it in the browser with the file:// protocol.
For example file://C:/Documents and Settings/YourUser/Desktop/YourApp/index.html would open an HTML file in a folder called YourApp on your user's desktop.
If you ever find you need to read static HTML+Javascript files locally then I'd recommend using this python command in the console:
python -m SimpleHTTPServer
It launches a simple HTTP server (who'd of guessed) that serves files from the current working directory. Effectively, it's the same as launching an apache webserver, putting some static assets in /var/www/... etc. etc.
You could also just browse to the assets at file:///some/folder; however, most browsers will prevent javascript from using AJAX when files are loaded in that way, which will manifest as a bunch of bugs when you go to load it.

Capturing Microphone Using Html 5 and broadcast using socket.io

I am currently developing Virtual Classroom with whiteboard,video/audio conferencing. How can I capture microphone using HTML5,Javascript. How can i create base64 encoded string from microphone ? I already capture video image from tag and draw on canvas and received base64 encoded string and broadcast to all students and its works. is any similar way for audio tag also ? i would like to broadcast teacher microphone voice to whole class using socket.io. I found number of tutorial but every body explain about video not audio :( . I am using Chrome -v 21 and able to use webkit.
Thanks in advance
The Stream API should allow you to do this but unfortunately it's not supported in any of the current (stable) browsers. You could download the nightly build of Google Chrome which definitely includes some support for the API, though how complete I'm not sure.
I'm guessing it shouldn't be too long until plugins for node start appearing to help with the handling of this stuff on the server side, but meantime the following might be useful:
Streaming audio from a Node.js server to HTML5 tag
A Node.js module for parsing and/or injecting metadata into SHOUTcast/Icecast radio streams.
Streaming audio using Firefox Audio Data API + Node.js + WebSocket + Redis Pub/Sub
Update:
http://code.google.com/p/chromium/issues/detail?id=112367
This issue is being worked making it stable for windows platform too, but working on Mac.