Giter VIP home page Giter VIP logo

Comments (3)

devongovett avatar devongovett commented on July 19, 2024

Well the way I did it was write a C binding that could be called into by pure JavaScript and the Aurora.js framework. Looks like you're trying to go the pure C command line route. It might be better to make up JavaScript API bindings instead of relying on the command line program.

Also, ffmpeg/avconv is a HUGE library with lots of platform specific stuff. It's almost 10 MB as a binary, so I'd imagine it would be almost double that when compiled to JS -- not particularly optimized for downloading over the network you'd say. It would be cool, so don't let this discourage you, but the approach I've been taking is to port over the most popular codecs either by hand or using Emscripten as needed and create a "web-native" framework for it. Some of the blocking C file reading and conversion techniques used in these libraries don't really scale well to JavaScript. In Aurora.js we stream and decode only as needed, which is why we are able to get CPU usage so low.

So far we've mostly focused on audio, though I've dabbled with video and there is Broadway.js too, but those are mostly cool demos and probably won't scale to playing back 1080p HD movies anytime soon without some serious hardware support. See here for more on that. You can find all of the other codecs we've ported on our Github page.

(Closing this issue since it isn't really an issue with this project, but feel free to keep discussing!)

from ogg.js.

devongovett avatar devongovett commented on July 19, 2024

Just saw you mentioned encoding too, and that's something I'd like to tackle at least with audio stuff at some point (have to find the time...). Video encoding has the same problems as decoding, except that it is probably even more CPU intensive than decoding. It would be a very cool little demo on a small scale initially, but as I mentioned above, we need some more APIs from browsers to use multicore architectures more efficiently, SIMD instructions, GPUs (e.g. WebCL), etc. before JS will really be able to compete with the likes of ffmpeg and other native encoders... But, that said, it takes someone like you who is crazy enough to do it and show that it's possible in order to change the thinking and make those features come to browsers more quickly. After all, browser makers are here to serve developers, and if there is something we can't do, they need to help make it happen. :)

from ogg.js.

binarykitchen avatar binarykitchen commented on July 19, 2024

thanks for that. look, i already have investigated all that what you have mentioned, i.e. broadway. none of that stuff comes in question because i'm only interested in javascript video encoding, not decoding.

and as a deaf person i am not interested in audio. have a look at www.videomail.io ... it works fine but is using web sockets for video encoding. hence the limitation to record videos up to 2 minutes max. if there is a javascript video encoder, then probably speed is much better and can increase limit to ~5 minutes.

you see, i am talking about minutes, not encoding a 2 hours movie. this should be mission possible for javascript. agreed, i'm crazy but for a good reason. videomail.io is nice, more and more people use it so worth a shot.

and about avconv, one correction: it is not that huge if you compile it only with the selected codecs you need and disable everything else. look at https://gist.github.com/binarykitchen/5230096 and you see i have added lots of --disable-xxx flags

all i want is simply to encode an image sequence to a video in javascript and that's all.

from ogg.js.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.