WASM + React... Easily build video editing software with JS & FFmpeg

2020 ж. 16 Қар.
215 259 Рет қаралды

Use Web Assembly to build an app that converts video files to GIF (using FFmpeg), entirely from a frontend React JavaScript application. fireship.io/lessons/wasm-vide...
Source Code: github.com/fireship-io/react-...
FFmpeg.wasm ffmpegwasm.github.io/
#wasm #webdev #tutorial
Install the quiz app 🤓
iOS itunes.apple.com/us/app/fires...
Android play.google.com/store/apps/de...
Upgrade to Fireship PRO at fireship.io/pro
Use code lORhwXd2 for 25% off your first payment.
My VS Code Theme
- Atom One Dark
- vscode-icons
- Fira Code Font

Пікірлер
  • Been watching these for about a year now and dude, your videos are tremendous. You are a tremendous instructor. You keep it cutting-edge, concise, and super informative. Thank you.

    @jakobarsement8266@jakobarsement82662 жыл бұрын
  • Sadly the Source Code doesn't work anymore because of the Spectre Vuneability in modern browsers. They disabled SharedArrayBuffer which was essential for this to work (for some reason, i am not an expert on this). So before you try this, try to find a more recent video =D

    @thomasjardanedeoliveirabou9993@thomasjardanedeoliveirabou99932 жыл бұрын
    • @@yotubecreators47 wow thank you!

      @Vishnu-oo4gh@Vishnu-oo4gh2 жыл бұрын
    • is it also disabled on Apple M1?

      @batmanatkinson1188@batmanatkinson1188 Жыл бұрын
    • @@yotubecreators47JavaFX is so good though

      @ABDTalk1@ABDTalk1 Жыл бұрын
    • @@yotubecreators47 is their any solution for vue too?

      @BelugaSam@BelugaSam Жыл бұрын
    • Thank you man. Saved my time.

      @irahazda@irahazda7 ай бұрын
  • Been looking forward to this, Jeff! Definitely going to expand on this sometime in the future on my own project. Thanks!

    @acollierr17@acollierr173 жыл бұрын
  • Awesome work man

    @DrSwad@DrSwad3 жыл бұрын
  • What people see: WASM allows one to run server tasks on the client What I see: serverless SQL injection

    @joaovaz3473@joaovaz34733 жыл бұрын
    • not sure if that's a joke or a real thing because i don't have very much knowledge on the subject, so, honest question: there's a point on do that? i mean you could hack it (could u?), but it will be only in your browser because nothing was sended to the server, right? so...

      @jorgekunrath1016@jorgekunrath10163 жыл бұрын
    • @@jorgekunrath1016 it was originally a joke. But now, re-thinking about it... you've got a point!

      @joaovaz3473@joaovaz34733 жыл бұрын
    • @@joaovaz3473 cool joke tho and thanks ^^

      @jorgekunrath1016@jorgekunrath10163 жыл бұрын
    • Good way to practice your hacking skills before taking them to a real server.

      @Fireship@Fireship3 жыл бұрын
    • @@Fireship buddy what file icon theme do you use pls state it

      @myxmad800@myxmad8003 жыл бұрын
  • I definitely asked for this video and you delivered, thanks a bunch! Great video as always Jeff, very very useful

    @mikemartire1612@mikemartire16123 жыл бұрын
  • I ran into these errors: 1. ffmpeg was not loading in browser: Soln: downgrade ffmpeg version to 0.9.0 2. SharedArray buffer error: Soln: Run chrome wuth this flag "chrome --enable-features=SharedArrayBuffer "

    @Apoorvpandey@Apoorvpandey2 жыл бұрын
  • Man that was amazingly simple, I was scared of web assembly but I might start learning now. Also unrelated but have you considered doing a react course?

    @YahirTrejo@YahirTrejo3 жыл бұрын
    • Yes, working on a React-Firebase course :)

      @Fireship@Fireship3 жыл бұрын
    • @@Fireship It'll be the first time I've bought a course then

      @kordoulakis@kordoulakis3 жыл бұрын
    • @@Fireship Great! Looking forward to it!

      @YahirTrejo@YahirTrejo3 жыл бұрын
  • I’ve been looking forward to this!

    @edwincarlsson9014@edwincarlsson90143 жыл бұрын
    • Me too, but more WASM content on coming soon :)

      @Fireship@Fireship3 жыл бұрын
  • I don't know how you make this videos so interesting always!! Thank you, I think an AssemblyScript video will also be awesome.

    @miguel_bogota@miguel_bogota3 жыл бұрын
  • This is awesome. Thank you for this great introduction to WA ❤

    @wizamit@wizamit3 жыл бұрын
  • Awesome video as usual! Really cool to see how to use all these things together!

    @CodeWithAndrea@CodeWithAndrea3 жыл бұрын
  • Thank you very much

    @aminehl6025@aminehl6025 Жыл бұрын
  • Really excited for the rust video. I could port my CLI app to web if you keep on your promise. Amazing as usual! Keep it up!

    @davidhusicka8440@davidhusicka84403 жыл бұрын
  • Omg I’m so pumped for the rust web assembly video. I am a rust dev and would like to get some benefit from it on the web

    @OBLIVIOUSKARI@OBLIVIOUSKARI3 жыл бұрын
  • This tutorial is fantastic!! Got a lot of value from this tutorial!!

    @prashoonbhattacharjee8211@prashoonbhattacharjee82113 жыл бұрын
  • great stuff man, ty. now its really open my mind for WASM :D

    @ridl27@ridl273 жыл бұрын
  • Amazing! I can't wait to see more WASM content.

    @NicolaiWeitkemper@NicolaiWeitkemper3 жыл бұрын
  • It seemed tough to build but you made it look so easy!

    @yampolskie@yampolskie3 жыл бұрын
  • In your Rust to WASM video, I'd love to see some sort of visuals in rust port over to visuals on the browser

    @jaforewit@jaforewit3 жыл бұрын
  • Awesome video, so incredibly simple. Now I'm going to read more in depth about how to create these Web assembly files and bind them to javascript. Can't wait for the rust to wasm video!! Do you know if FS will conflict with other tabs accessing the same file ? This could be a problem, even two tabs overwriting the same place in memory. But I'm guessing this only runs in the current context of the tab. Another question, can we access the whole file system with wasm ? I'm not really sure what the `video` var contained, but could we somehow build it so we could access any file in the system or is the browser sandboxing this ? Thanks!!

    @TheRanguna@TheRanguna3 жыл бұрын
  • Hi Jeff, could you do a video on how to use 'raw' wasm code? In this video you use a wrapper javascript library.

    @rubenpoppe@rubenpoppe3 жыл бұрын
  • How about Intro to AssemblyScript 🔥🔥

    @parikshitthale7708@parikshitthale77083 жыл бұрын
  • Amazing! More videos on WebAssembly please!

    @MrChernicharo@MrChernicharo3 жыл бұрын
  • Another really useful video, will try it with my open alpr project great work again.

    @HenokWehibe@HenokWehibe2 жыл бұрын
  • This is sweet! I was thinking about using wasm to try to make a video editing tool on the web.

    @WrongAkram@WrongAkram3 жыл бұрын
  • Great stuff as always. Still can't believe Nathan Fielder is this knowledgeable on web dev!

    @jessejordan8569@jessejordan85693 жыл бұрын
    • omg

      @Monogrammaton@Monogrammaton Жыл бұрын
  • That's what I am looking forward. I am also trying to develop custom rust code and covert it to WASM. That's cool.

    @vietnamnguyen369@vietnamnguyen3693 жыл бұрын
  • Finally most awaited video 🌟✨

    @amanraj1608@amanraj16083 жыл бұрын
  • Wow! This is simply amazing! Everyone should see this! :)

    @HackUniversity@HackUniversity3 жыл бұрын
  • I am fan of your way of telling things as they are very easy

    @theseriouslook@theseriouslook3 жыл бұрын
  • Oh wow this one went way over my head

    @DodaGarcia@DodaGarcia3 жыл бұрын
  • Thanks for this!! can't wait to dive wasm :D

    @ChunkyChest@ChunkyChest2 жыл бұрын
  • Pumped to make this project!!

    @prashoonbhattacharjee8211@prashoonbhattacharjee82113 жыл бұрын
  • Amazing, WASM it's so powerful, i'll try this example.

    @omegaomar29@omegaomar293 жыл бұрын
  • Just what I was looking for 🔥

    @user-eb4jr3qr5h@user-eb4jr3qr5h Жыл бұрын
  • These videos are gold. Thank you so much

    @djcardwellai@djcardwellai2 жыл бұрын
  • Really good music in the beginning 👌

    @uniqhnd23@uniqhnd233 жыл бұрын
  • 🔥🚀 I have press the like button when I get into this page at the very first time, coz there is no chance this video will have crap content. 未看先讚啦!!!

    @dibaliba@dibaliba3 жыл бұрын
  • u r hero of making things look simple

    @aryanmn1569@aryanmn15692 жыл бұрын
  • Hmm you using React more and more? I always thought of you as an Angular guy. It's good to see that you are open to everything.

    @rand0mtv660@rand0mtv6603 жыл бұрын
  • Your videos are sooooo amazing I can't even tell

    @ShafterPlay@ShafterPlay3 жыл бұрын
  • Would love to see a vid about assembly script :)

    @aaron32190@aaron321903 жыл бұрын
  • Going to be honest here I was looking at the same technology about 2 years ago. I worked on a transcoding project with multiple video streaming m3 u8, vast advertising.

    @Daimyo7@Daimyo73 жыл бұрын
  • How 'bout a 2d Rust game compiled to WASM? The game could be a flappy bird clone.

    @CodingUnited@CodingUnited3 жыл бұрын
    • up, that would be awesome

      @ursochurrasqueira@ursochurrasqueira3 жыл бұрын
  • excited for web assembly

    @daksmemes7428@daksmemes74283 жыл бұрын
  • May be in future plan an intro to rust and how we can write web assembly code using rust, I am really interested in those kind of videos.

    @sridharkatta3461@sridharkatta34613 жыл бұрын
  • We are about to enter an age, when there would be no OS. Just JS & Chrome. Your OS would be Chrome and everything else loaded in WASM. SMFH.

    @fevicoI@fevicoI3 жыл бұрын
    • Wait until you hear about Chromebooks 🤣

      @MatthewTaylor86@MatthewTaylor863 жыл бұрын
    • @@MatthewTaylor86 those are awful

      @fevicoI@fevicoI3 жыл бұрын
    • Linux, WASM edition :p

      @iyxan2340@iyxan23403 жыл бұрын
    • @@iyxan2340 Chrome-book would literally be Wasmbook

      @fevicoI@fevicoI3 жыл бұрын
    • For some people, Windows is already just a bootloader for Chrome

      @nhat4359@nhat43593 жыл бұрын
  • Awesome tutorial . Please make a video converter using WASM and ffmpeg

    @sumukhakb2701@sumukhakb27013 жыл бұрын
  • Amazing !!! It inspires me to code a simple app to gain some money 😛 (I ve never done it and dont know how to monetize something like that aside ads)

    @brucewayne2480@brucewayne24803 жыл бұрын
  • Oh I've watched a video about the chopped truck. THe bridge was elevated, but still choppin the trucks

    @jamesxu4538@jamesxu45383 жыл бұрын
  • 3:53 great way to add a preloader ,never thought of it that way

    @amoldalwai3961@amoldalwai39613 жыл бұрын
    • You can also use React Suspense for things like that, but that's a topic for another video...

      @Fireship@Fireship3 жыл бұрын
    • You might also want to take a look at swr.vercel.app/. It deals with fetching data while showing a loading state or optionally showing already cached data while the data is being updated. It also supports infinite scrolling and react-native. Not exactly related to this video's scenario, but you might find it cool.

      @DrSwad@DrSwad3 жыл бұрын
    • @@Fireship thanks ...I made a react app that actually allows you to watch movies and web series online. amoldalwai.github.io/watch-any-movie/ Can I get your thoughts on it?

      @amoldalwai3961@amoldalwai39613 жыл бұрын
  • Hey Jeff, are you still planning to create the Rust to WASM tutorial? That would be super cool

    @timkelly9886@timkelly98862 жыл бұрын
  • coming first is really exciting

    @pro-nav@pro-nav3 жыл бұрын
  • please update the wasm changed some functions and features like i can't able to use createFFmpeg

    @manvendrasingh4556@manvendrasingh45568 ай бұрын
  • Dude just accomplished my dream tool in under 8 minutes lmao

    @dj_256@dj_2563 ай бұрын
  • Wow! Thank you!

    @DaggieBlanqx@DaggieBlanqx3 жыл бұрын
  • Please do a full course about webAssembly!

    @malikmouhiidine9828@malikmouhiidine98283 жыл бұрын
  • Back at it again!

    @SpaghettDev@SpaghettDev3 жыл бұрын
  • FFmpeg is my favorite program

    @Iglum@Iglum3 жыл бұрын
  • Weird request, but can we have Reasonml in 100 seconds? Your videos are great by the way!

    @albertbennett6290@albertbennett62903 жыл бұрын
  • Well, that was pretty cool!

    @jaimerojas6578@jaimerojas65783 жыл бұрын
  • Great video as always. I heard you say Rust 😍😋

    @ikezedev@ikezedev3 жыл бұрын
  • Thank You so much!!!

    @Abhinavkmr@Abhinavkmr3 жыл бұрын
  • Hi, great video Can I use this inside a webWorker?

    @nadico5740@nadico57402 жыл бұрын
  • This is really cool!

    @AB3D-tutorials@AB3D-tutorials3 жыл бұрын
  • Can someone please help? I cannot move forward due to SharedBufferArray undefined error...

    @captainlennyjapan27@captainlennyjapan272 жыл бұрын
    • I faced same issue. How can i solved this

      @samiurrahmanmukul@samiurrahmanmukul2 жыл бұрын
  • Idea: Add Tensorflow to have Text hovering over tracked objects

    @alejkun4923@alejkun49233 жыл бұрын
  • An idea I would like to see is how to handle editing videos and how to store and retrieve those videos in the local file system in react for different users e.g user 1 and user 2? sadly there is not very many resources showing how to work with react and video media

    @TheEtsgp1@TheEtsgp12 жыл бұрын
  • Good vid. Curious to know the licensing restriction for this type of "distribution."

    @JeremyChone@JeremyChone3 жыл бұрын
    • FFMPEG is a FOSS tool, so it is not a problem in this case. but in other cases, I get what do you mean

      @katech6020@katech60203 жыл бұрын
  • Fire ship you truly are a god of tutorials

    @thenextdoorneighburre458@thenextdoorneighburre4583 жыл бұрын
  • I want to be able to load a video, draw on that video(using canvas?), and then save it as a new file with the drawing visible. I also want to be able to have some sort of trim controls. Is something like this possible?

    @aspiringpro@aspiringpro3 жыл бұрын
  • You're a legend!

    @martinmaldonado4923@martinmaldonado49233 жыл бұрын
  • If you use youtube-dl or one of the forks you can go from a source video straight to a gif I have a personal bash script that does that for me

    @supremelizard946@supremelizard9462 жыл бұрын
  • Webassembly is so crazy

    @nathandaven@nathandaven3 жыл бұрын
  • slowly and slowly wasm is starting to tickle my curisoity

    @tippy_@tippy_3 жыл бұрын
  • Know any good libraries that would be great for having their wasm counterparts? Ffmpeg is one, game engines are another, what else? Also what else can you do with wasm, can you run sockets, etc? Would love to make browser in a browser

    @rishabhanand4270@rishabhanand42703 жыл бұрын
  • Can you fix the codebase that you shared in GIT. When I tried to run it, it throws an error: ffmpeg-core.js:22 Uncaught (in promise) ReferenceError: SharedArrayBuffer is not defined

    @nithinchinni@nithinchinni2 жыл бұрын
  • The future is now, old man!

    @johnstorm589@johnstorm5893 жыл бұрын
  • Next level stuff

    @PTM1008@PTM10083 жыл бұрын
  • hey, hey thank you , i mean it ...sensei🤗😘😘😘😁 yah i need this, download

    @tegaogheneovo5881@tegaogheneovo58812 жыл бұрын
  • Hey it took me a long time to figure out how to configure google and fb sign in with firebase on react native expo. Maybe if you could help others with it would be nice, or even do a full stack react native video on firebase

    @OBLIVIOUSKARI@OBLIVIOUSKARI3 жыл бұрын
  • can you make a video turorial how to make a video trim function with react and ffmpeg?? please

    @thanhphongtran2263@thanhphongtran22633 жыл бұрын
  • Can you do a video on the web assembly file system?

    @vaxo2210@vaxo22103 жыл бұрын
  • It would be interesting to see how you deploy this app on the web. One aspect I'm oblivious is how to bunddle everything up. Since you said that WASM binary it's a pretty large file, how do you give that to the client? I mean the ffmpeg object is already there, is the .load() method that brings it down to the computer client or the client already downloaded it? Sorry if I'm confusing some concepts here.

    @keteremillpario@keteremillpario3 жыл бұрын
    • I guess that FFMPEG does it in the background with .load() (2:58). Or the files already was bundled in the application, but not really downloaded and that function did that, but he mention CDN so not sure this part got me too

      @jorgekunrath1016@jorgekunrath10163 жыл бұрын
    • ​@@jorgekunrath1016 indeed, I took a look at the documentation. What's bundled and sended to the user is always a javascript bundle. From there, once in the client enviroment, the script triggers the method .load() (this is an API call that downloads ffmpeg-core.js from a CDN - the file occupies arround 25MB! That's the reason you trigger load() from the client with an async function). Afterwards the method instantiate a .wasm code (or session), all in the browser.

      @keteremillpario@keteremillpario3 жыл бұрын
    • @@keteremillpario wow thats cool, thanks for share ^^

      @jorgekunrath1016@jorgekunrath10163 жыл бұрын
  • What theme are you using on the code editor?

    @NicoZadeh@NicoZadeh3 жыл бұрын
  • Could this be used to record an animation in the client's browser given some pixel coordinates and dimensions, and let them save the output as an mp4?

    @Janman81@Janman813 жыл бұрын
    • Probably. developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture There's also a package called html2canvas but I think that just re-renders parts of the DOM, rather than actually capturing the display window.

      @DFPercush@DFPercush3 жыл бұрын
  • Which framework you will be using for Rust WA?

    @gofudgeyourselves9024@gofudgeyourselves90243 жыл бұрын
  • 1. Create react and react fiber in rust, then have a ui framework entirely in webassembly 2. Rewrite typescript in webassembly and have faster linting

    @SogMosee@SogMosee3 жыл бұрын
    • 1. You want to have core of React in wasm and an JS API? I'm not sure if the overhead due to the need for communication between JS and WASM (not just with the api, but WASM can't modify DOM, so it needs to call JS to do that). 2. There is a TS compiler in rust, SWC: swc.rs/ It's not WASM, but why would you run typescript compiler in the browser anyway? SWC is already used by Deno, though TSC still handles the actual typechecking (github.com/denoland/deno/issues/5432)

      @oplik0@oplik03 жыл бұрын
  • Awesome

    @andor1904@andor19043 жыл бұрын
  • 🔥

    @gogoikabir@gogoikabir3 жыл бұрын
  • hi I want to ask a question about using FFmpeg library with javascript and wasm is this can be work for me

    @imadharile2151@imadharile21513 жыл бұрын
  • Very valuable content! Thank you very much!

    @poopoo888888@poopoo8888882 ай бұрын
  • not working on crome v92....can you suggest how to set cors?

    @surbhigoel7062@surbhigoel70622 жыл бұрын
  • I cloned the repo and it gave me this error "SharedArrayBuffer is not defined"

    @nadawhoever@nadawhoever2 жыл бұрын
  • Hi, I am interested and want to shoot in the same format as you, I would like to ask if you can take these lectures and translate them into my native Russian, with a note in the video that the original video is yours and leave links to your channel?

    @Damfler@Damfler3 жыл бұрын
  • Why did you choose snowpack recently?

    @justafreak15able@justafreak15able3 жыл бұрын
  • Good job

    @AntiWanted@AntiWanted3 жыл бұрын
  • Where's the rust course mentioned at the end?

    @kevinbatdorf@kevinbatdorf2 жыл бұрын
  • thanks very useful

    @VeryBlueBot@VeryBlueBot3 жыл бұрын
KZhead