May 18, 2012

What jquery video player, plays avi, mp4, mkv, wmv files?

Question by crosenblum

I am working on a web-based media center app. As a lightweight alternative to having a running a media center app in linux.

I have a bash script that generates an html file that uses a polaroid display, of all the posters of my downloaded movies.

http://imageshack.us/photo/my-images/651/polaroidscreenshot.png

Once I click on a movie poster, I want to go to a second page, that will play a locally hosted video.

I have tried working with jplayer, but have had problems just using the demo code, that it comes with.

Are there jquery or html5 video player’s that support standard movie video formats? Such as avi, mp4, mkv and wmv?

Or would I have to convert them to a format that is more usable to the player?

I would rather not have to convert them, that is doable but would be time consuming, and may distort video quality.

Any suggestions?

Answer by Starx

Why?, there are already web friendly formats of the video. flv, mp4, webm are very good formats, can support high quality too. You don’t need to focus on creating such things.

You can use, media player widgets on the website, and let the video play if the client has the supported codec to play the video. But, since this will narrows the visitors to a windows platform, I dont recommend it either.

With that being said, there is a plugin called jQuery Media Plugin which provides a limited of what you want.

March 18, 2012

Prevent HTML5 video from being downloaded (right-click saved)?

Question by python

How can I disable the “Save Video As…” from the right-click menu to prevent from clients from downloading the video?

And, are there is more complete solutions that prevent the client from accessing the file path directly?

Thanks

Answer by Joseph the Dreamer

In reality, you can’t. But you can make it harder to steal.

In my experience grabbing videos, I just use the debugger of the browser. I prepare the network tab and let the video load. Then I look for it in the loaded resources, grab it’s url, and open it in another tab to download it.

the routine was basically:

  • load the video
  • get the link
  • load it again but this time, not using the player

One thing you can do to prevent this method is to prevent the link from being reusable. Once the player loads using the disposable url, the server makes it unusable.

Similar to CSRF prevention, create a token and store it in the session. At the same time, place this token in a hidden input tag, cookie, or in the video link itself when generating the page. Then when the player loads, have it request for a access of the video using the token. If the token sent exists in the session, the server allow access to video. After access is allowed, delete that token from the server-side so that further use of the same token will be invalid.

To add to that, have the token expire on the server after several minutes of being unused, enough time for the page to use it for the video request but short enough for one to get the link and use it.

This method will NOT prevent:

  • Tools that pick up the file from the cache. Streamed videos (especially those done streaming) are stored in the cache of the browser.
  • This will not prevent tools that intercept the player’s video request. Some tools hijack the request that uses the token to gain access.

After scouring the net about customizing the context menu of an html5 video, i found this article. it mentions about having the video be overlayed by a div to prevent direct click on it (thus no right-click to the video). as for the controls, i believe one can build your own video controls in JS so that it is outside of the video (so that you can overlay the div in front of the video without covering the controls).

Answer by Starx

Simple answer,

YOU CANT

If they are watching your video, they have it already

You can slow them down but can’t stop them.

...

Please fill the form - I will response as fast as I can!