videostream icon indicating copy to clipboard operation
videostream copied to clipboard

MKV support

Open feross opened this issue 8 years ago • 14 comments

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.

feross avatar May 05 '16 19:05 feross

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

v0dy avatar Jun 06 '16 13:06 v0dy

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

lesander avatar Aug 13 '16 20:08 lesander

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 [email protected] 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 .

feross avatar Aug 13 '16 21:08 feross

+1 for .mkv support.

ma-tt avatar Apr 10 '17 21:04 ma-tt

+1 for .mkv support.

TiberioBrasil avatar Apr 11 '17 16:04 TiberioBrasil

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

feross avatar Apr 12 '17 23:04 feross

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.

qgustavor avatar May 03 '17 22:05 qgustavor

Any update on this front?

geecko86 avatar Jul 31 '17 20:07 geecko86

Yep, it will be great to have it :)

HostFat avatar Jun 01 '18 19:06 HostFat

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

paulwaldmann avatar Aug 10 '18 17:08 paulwaldmann

inb4 just use vlc

regalstreak avatar Sep 15 '18 20:09 regalstreak

Hello, guys! Any updates about MKV stream support?

pavloniym avatar Mar 26 '20 22:03 pavloniym

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

zekiblue avatar Jan 02 '21 18:01 zekiblue

@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.

qgustavor avatar Jan 02 '21 19:01 qgustavor