loading video file from torrent to html5 video - html

Can I use torrent file with videos and this videos loaded in ?
I have torrent with 3 videos. And I have one simply html page with video.js.
Video 1: Wellcome.wemb
Video 2: Introduction.webm
Video 3: What we play.webm
So... Can I load first video from torrent in video ?

You could use torque. It's not pure javascript, but quite powerful.
http://torque.bittorrent.com/labs/
Check out http://onehash.com/ for an example of exactly what you want to do.
For a pure javascript implementation (I believe limited to chrome), check out jstorrent:
https://github.com/kzahel/jstorrent
And here it is deployed: http://jstorrent.com/

You could do it manually or try writing some server software that extracts the torrent. If you find out how to do that, then try to do it ahead of time instead of each time at run-time.

Related

Change video quality and bitrate of a video

can i change the video quality and bitrate of a video(with video tag) on my website using javascript or i have to make some copy of the video with a different quality?
Thanks.
There is a project which compiled ffmpeg to javascript to allow videos be manipulated and converted in the browser:
https://github.com/bgrins/videoconverter.js
It was originally developed as part of a Node Hackathon, but its not clear whether it is still maintained (see the GitHub activity).
Its worth nothing that it is probably more of an experimental project that a practical one, because of the very large file size.
First ask yourself "is it realy needed to selfhost my video?"
Video plattforms like youtube or vimeo are faster and would bring this options with them.

How can I embed the new GIFV format on my webpage?

Normally I would embed a gif like so.
<img src="http://i.imgur.com/awHPuBp.gifv">
Although I get an error that the image could not be loaded.
I'm just wondering what mark up I will need to use so that I can display the GIFV.
GIFV is created by imgur and more information can be found here.
I just checked that demo site. It seems that they just convert the video to a webm video (in case of Firefox). Check this file here which comes from the demo: http://i.imgur.com/A61SaA1.webm
So I would say you could also just use the <video> tag to embedd those "gif" files. I just guess that use a feature detection and a video converting logic. No idea what this nonsense should be for.

Best way of posting a video to a html website

I want to post some mp4 videos in my site and I don't want to upload it to youtube or any 3rd party web app which will let me embed it into my website. I also don't want to use any blogging system like wordpress, drupal. So then what is the best way to post it to my site so that most devices will be able to view it. And can I customize the player which I use?
I have seen w3schools html5 video but I didn't find it helpful. I have also seen ' Video onto a website without plugins ' but I am not satisfied with that.
[Hint: I am ready to convert my video into any format required.]
Thanks in advance.
I have used video.js for this purpose, it worked for me. I haven't tried editing it much, but it has options.
http://www.videojs.com
Use the HTML 5 video element. You'll have to upload your video in different formats, since there is no video format that is supported by all browsers, but support for the video element itself is quite good. IE8 doesn't support it, but IE8 is already very old. With the video tag you don't need Javascript or flash plugins.
For an overview of browser support see CanIUse. Another source with much detailed information about video formats and how to convert them is DiveIntoHTML5.info.

Dynamically Playing MP3 files downloaded with AJAX

I have the need to play an MP3 file on my website downloaded via AJAX like the "Listen" button on the Google Translate page (in fact, I'm doing the exact same thing). How is this done? I don't believe it's facilitated by Flash, so that's not the answer.
I'd suggest loading an iFrame with the sound file embedded within. It's an ugly solution, but it's probably got the best crossbrowser support until HTML5 turns into a thing.

How do I embed wmv/mpg/avi/mov/etc videos reliably?

I am trying to embed video files (wmv, mpg, avi, mov, etc.) dynamically by creating embed elements in javascript. The problem I am running in to is this has not been very reliable across all browsers and even if it does work, there is no guarantee that the end user has the required plugin to play the video. Ideally, I would convert everything to flv or an HTML5 video format but this is not currently possible due to cpu/disk space restrictions (these are videos uploaded by the end user, not me). I feel like this shouldn't be as difficult as it has presented itself to be - does anyone have any suggestions?
To the day VLC release a browser plug-in, the best way is to convert them to .FLV or .MP4 files server side. And use a free Flash video player for the playback (I mean HTML5 with Flash fallback).
If you do not want to convert those videos, let the end user directly download the files. And deal with the problem of multiple video format himself.
edit:
Or you could move your website out of the HTML browser, and build a desktop software, that can take charge of all those videos format, client side.
edit2:
Use Youtube API or any other already existing video hosting services. Personally I will avoid this solution.
The only way to do it reliably is with flash. Use ffmpeg to convert incoming videos to .FLV and use a flash player.