jhiesey / videostream

Play html5 video when from a file-like object
MIT License
243 stars 74 forks source link

MKV support #29

Open feross opened 8 years ago

feross commented 8 years ago

Right now, WebTorrent uses the videostream package to provide support for MP4. It would be great to be able to stream MKV files since it's a very popular container format.

v0dy commented 8 years ago

This library might help! https://github.com/RReverser/mpegts

lesander commented 7 years ago

How about WebChimera, @feross? http://www.webchimera.org/

feross commented 7 years ago

WebChimera does not work in the browser. But it's an option for Electron or nw.js apps. On Sat, Aug 13, 2016 at 1:45 PM Sander Laarhoven notifications@github.com wrote:

How about WebChimera, @feross https://github.com/feross? http://www.webchimera.org/

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/jhiesey/videostream/issues/29#issuecomment-239640701, or mute the thread https://github.com/notifications/unsubscribe-auth/AAHbpuJ8Z2PpOtAJcGSmgld2B7S3ODKFks5qfizWgaJpZM4IYVHZ .

ma-tt commented 7 years ago

+1 for .mkv support.

TiberioBrasil commented 7 years ago

+1 for .mkv support.

feross commented 7 years ago

@ma-tt @OfertasDescontos Please don't post useless +1 comments. Use the "reactions" feature to indicate your support for an idea. Thanks.

qgustavor commented 7 years ago

There is node-matroska, "Matroska library written for nodejs". While node-matroska isn't easily browserifyable the original project, node-ebml, is. I used it to make this tool. My code is quite messy, consider it a proof-of-concept. If node-matroska gets improved and finished maybe it can be used here.

geecko86 commented 6 years ago

Any update on this front?

HostFat commented 6 years ago

Yep, it will be great to have it :)

paulwaldmann commented 5 years ago

@jhiesey, please give us some of your magic and add MKV support.

regalstreak commented 5 years ago

inb4 just use vlc

pavloniym commented 4 years ago

Hello, guys! Any updates about MKV stream support?

zekiblue commented 3 years ago

mkv support is essential guys, most of the videos are served in mkv

qgustavor commented 3 years ago

@zekiblue I don't think so: maybe most videos distributed illegally are served using this container (unless you also consider WebM, which is based on Matroska, but isn't MKV), Anyway I'm just guessing: streaming services, AFAIK, are huge, do not use MKV and count for "most of the videos served".

Matroska is just an container, the main issue on supporting MKV is that many videos I find using this container use codecs not supported by many browsers. You can test it by running ffmpeg -i your-video.mkv -codec copy test.mp4 then trying to play the video in a browser. I just tried some random video and it failed.

That being said, if the codec issue gets ignored, one way to solve this issue is reproducing the above command using JavaScript: use node-ebml to parse the MKV file (it works using streams, which is ideal), extract streams from it and remux those into MP4. Subtitle streams can also be extracted and forwarded to some renderer such as JavascriptSubtitlesOctopus or Captionator.js.