News for hackers. Stuff that matters.
Re:A Simple Request: VLC.js by jbk on Monday November 07, 2016 @07:13PM (#12896502)
As the lead of the team of VLC, we've been discussing this since quite a bit of time, and we believe it is totally doable.

But, we believe we need WebAssembly + Wasm-Threads. Without threads it will be a very difficult task to port VLC: you notably need one thread for input, one for audio output, one for video output, and one for the playlist.

However, threads are supposed to come in an update to WebAssembly. So that will be cool.

Also, VLC is very very heavily modularized, and Wasm will bring modules.

Finally, porting all codecs will be hard (FFmpeg), but VLC has some very simple modules for a few codecs, like theora and mpeg2, so it is easy to start and port one module after another...

Re:A Simple Request: VLC.js by dherman on Monday November 07, 2016 @08:04PM (#12896760)
By way of update from the standards trenches: threads are indeed a part of the WebAssembly plan, and we're also actively working on standardizing the SharedArrayBuffer API for JavaScript, which would allow an asm.js implementation with threads (either as a direct compilation target or as a WebAssembly polyfill). Shu-yu Guo has been working on drafting the SharedArrayBuffer spec and is planning to present an update in the next standards meeting in a couple weeks.
Re:A Simple Request: VLC.js by syg on Monday November 07, 2016 @08:12PM (#12896800)
Shu here. I'm the person drafting the memory model for the SharedArrayBuffer spec, and as Dave says, it'll be the basis for the wasm story as well.

Lars Hansen deserves most of the credit for the actual spec -- I'm just doing the memory model. :)

Re:A Simple Request: VLC.js by johnbender on Monday November 07, 2016 @09:10PM (#12897041)
Shu,

The concurrency/memory model nerds out here would love to see an early draft if at all possible :)

If nothing else, is it going to be weaker than sequential consistency?

Re:A Simple Request: VLC.js by syg on Monday November 07, 2016 @09:34PM (#12897144)
The current draft is available at http://tc39.github.io/ecmascript_sharedmem/shmem.html

The two strengths provided by the model are sequentially consistent atomics and something between the strengths of C++'s non-atomics and relaxed atomics. Races are fully defined, and there is no undefined behavior or undefined values.

I'm happy to discuss things more in a new thread or in private communication and would prefer to not derail this thread about VLC.

Re:A Simple Request: VLC.js by johnbender on Wednesday November 09, 2016 @02:31PM (#12913759)
Thank you!
Re:A Simple Request: VLC.js by greggman on Tuesday November 08, 2016 @04:08AM (#12898732)
There's also offscreen canvas coming soon which should help.

Offscrren canvas will let you render in a worker and display with zero copy

Re:A Simple Request: VLC.js by gbrits on Tuesday November 08, 2016 @04:29AM (#12898842)
Interesting. Could this be used for headless browsing as well? Use case, e.g.: in-browser selenium testing
Re:A Simple Request: VLC.js by Gaelan on Monday November 07, 2016 @08:10PM (#12896791)
I saw a demo of ffmpeg running in emscripten at some point. It's definitely possible.
Re:A Simple Request: VLC.js by ilaksh on Monday November 07, 2016 @09:20PM (#12897087)
But its going to just burn up CPU and probably be pretty slow to do H.264 in the CPU without any hardware acceleration right?

Or maybe the H.264 gets handled by the JS side and the web assembly just handles weird formats that are mostly not high def video?

Re:A Simple Request: VLC.js by db48x on Monday November 07, 2016 @10:20PM (#12897336)
Yea. The idea is to get the broad codec/container/etc support that VLC has, not to supplant native rendering of modern codecs. We haven't actually written any code yet, but if you hand VLC.js an H.264 file I'm pretty sure it'll just create a <video> tag and then pretend like it did all the work.
Re:A Simple Request: VLC.js by amelius on Tuesday November 08, 2016 @04:55AM (#12898942)
Shouldn't there always be a fallback option in case a (modern) codec is not supported (yet) natively?

The one thing I like most about VLC is that it always works (so far).

Re:A Simple Request: VLC.js by db48x on Thursday November 10, 2016 @09:21AM (#12920529)
That's what I've described. If the browser _can_ play it, then we just let the browser play it. Otherwise we use vlc to play it.

Our plan is up on the wiki too: http://www.archiveteam.org/index.php?title=VLC.js

Re:A Simple Request: VLC.js by Jaruzel on Tuesday November 08, 2016 @04:12AM (#12898755)
Something that has always bugged me about VLC... The Traffic Cone icon. Whereas it's was a brilliant piece of imagery to separate VLC from other 3rd party players, nowadays that market place is way less competitive, so maybe now is the time to switch up the icon to something more formal?

I've started seeing VLC included on work-orientated desktop builds and the Cone icon sticks out like a sore thumb, and most lay-users have no idea what VLC is so assume it's a system utility (based on the icon).

Maybe a combo of a Video Player icon, with a smaller traffic cone on the side... ?

Re:A Simple Request: VLC.js by jbk on Tuesday November 08, 2016 @04:37AM (#12898869)
Submit a new icon.

But so far, it's very distinctive, so it will stay like that, until a better icon is submitted.

Re:A Simple Request: VLC.js by Jaruzel on Tuesday November 08, 2016 @06:01AM (#12899235)
Brilliant assumption that I have the skills. Ok, I'll have a go...

http://imgur.com/tvXmCvr

What do you think ? :)

Re:A Simple Request: VLC.js by pvinis on Tuesday November 08, 2016 @06:44AM (#12899446)
woa. i know its a joke drawing, but the cone you made looks like a wizards hat! maybe the next icon should be an awesome orange striped wizard hat. for the end users, vlc plays all videos, magically ;)
Re:A Simple Request: VLC.js by jbk on Saturday November 12, 2016 @01:30PM (#12939337)
I'll pass on that one then ;)
Re:A Simple Request: VLC.js by yvoschaap on Tuesday November 08, 2016 @06:41AM (#12899430)
Re:A Simple Request: VLC.js by aikah on Monday November 07, 2016 @07:14PM (#12896507)
nice! great job by the way.
Re:A Simple Request: VLC.js by vespakoen on Monday November 07, 2016 @07:26PM (#12896570)
You probably have already seen this, but I just found this ffmpeg library compiled with emscripten and thought it was pretty cool

http://bgrins.github.io/videoconverter.js/demo

Re:A Simple Request: VLC.js by simcop2387 on Monday November 07, 2016 @07:54PM (#12896705)
Yea, stuff like that makes me think that while doing all codecs will be hard, a large useful subset will be not that difficult to do.
Re:A Simple Request: VLC.js by acqq on Tuesday November 08, 2016 @05:06AM (#12898978)
I've just tried webm to mp4, the native is at least 10 times faster.

It seems just very low-res stuff will be interactively playable if the speed difference remains. Maybe it's enough for the very old stuff, however.