Ok, I'm using FFMPEG wasm in a NextJS project, but I think general FFMPEG solutions will work since FFMPEG wasm will parse normal FFMPEG commands.
What I'm trying to do is to add an overlay video on top of the input video, I also change the overlay video's opacity so that I can see the main video below. I already have that working, with this line of code:
-i input.mkv -i overlay.mov -filter_complex [1:v]format=argb,geq=r=\'r(X,Y)\':a=\'0.5*alpha(X,Y)\'[zork];[0:v][zork]overlay -pix_fmt yuv420p -preset ultrafast -c:a copy output.mkv.
The problem is that the input.mkv size might change as well as the overlay.mov, and I want to set the overlay.mov size to be the same as the input.mkv (so the solutions preferrebly can't use fixed values as well). I've seen other questions about that in stackoverflow, but since I'm already using the command to change the overlay's opacity I can't make it work with the command to also change the overlay's size, I don't have experience with FFMPEG whatsoever, so even though I've seen how to change overlay's opacity, and how to change overlay's size, I can't figure out how to combine those commands into a single one that do both.
FFMPEG - How to set overlay video's size to input size
460 Views Asked by Gustavo Sales At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Angular Show All When No Filter Is Supplied
- Why does a function show up as not defined
- I count the time the user takes to solve my quiz using Javascript but I want the same time displayed on another page
- Set "More" "Less" font size
- Using pagination on a table in AngularJS
- How to sort these using Javascript or Jquery Most effectively
- how to fill out the table with next values in array with one button
- State with different subviews
- Ajax jQuery firing multiple time display event for the same result
- Getting and passing MVC Model data to AngularJS controller
- Disable variable in eval
- javascript nested loops waiting for user input
- .hover() seems to overwrite .click()
- How to sort a multi-dimensional array by the second array in descending order?
- How do I find the fonts that are not loading in a CORS situation ( MoovWeb )?
Related Questions in REACTJS
- What is `_dereq_()` inside React?
- React TypeError: React.renderComponent is not a function
- React - saving a component in the ref callback
- React Rails component: manually triggering a re-render
- React, ES6 - getInitialState was defined on a plain JavaScript class
- How to get multiple selected options value in React JS?
- React.render replace container instead of inserting into
- reactjs datagrid use html
- props is not initialized in react component
- How to display xml data using Reactjs
- hooking up the data model in ReactJS - syntax
- ReactJS: How to use an immutable empty array or object
- How to use Sinon.js FakeXMLHttpRequest with superagent?
- React select onChange is not working
- ReactJS - Tutorial Comment System > Threaded commenting
Related Questions in FFMPEG
- Extract bytes of specific stream from mpegts file using ffmpeg
- running ffmpeg command in java Process hangs in waitFor()
- ffmpeg stream rtsp to mpegts
- Android receive RTP/UDP audio stream from VLC/ffmpeg
- error - /usr/bin/ld: cannot find -lavutil in ubuntu 15.04
- webcam displayed on LAN not to the internet
- ffserver - invalid codec name libvpx
- ffmpeg to extract a video one frame per second?
- how to extract audio from video in c using ffmpeg library?
- How to extract audio form video using ffmpeg in C++?
- ffmpeg to validate video format is genune and store error into string
- FFMPEG concat videos
- Why so many partial content requests in Firefox when streaming mp4 video on Apache?
- FFServer streaming H.264 from Logitech C920 without re-encoding
- Fragment shader does not show any colour when compiled with vs2013
Related Questions in NEXT.JS
- Getting babel build errors with the next.js getting started example
- Request Graphql api running on different port from Next.js app in development mode localhost
- Session lost when refresh the page (Next, react, isomorphism)
- HOC: A valid React element (or null) must be returned
- vscode launch config for next.js app
- Next.js + Redux server side rendering: Has data, but doesn't render on server side
- When to use a react framework such as Next or Gatsby vs Create React App
- Error: spawn EACCES on Heroku with Next.js
- Docker compose npm script command not found
- Error when using custom domain with Next.js on Heroku
- ReactJs, next JS, express and redux boilerplate
- Cannot use @import in css
- Next JS nested routing
- internal server error when deploying NextJs to firebase
- MaterialUI together with styled-components, SSR
Related Questions in FFMPEG-WASM
- Why is safari browser not able to play h.264 high10 with pixel format yuv420p10le video?
- FFMPEG - How to set overlay video's size to input size
- Is it possible to set custom headers on CodeSandbox?
- "ERR_BLOCKED_BY_RESPONSE.NotSameOriginAfterDefaultedToSameOriginByCoep" when using FFmpeg wasm and setupProxy.js - Reactjs
- How to allow certain origin in a crossOriginIsolated page (COEP header)?
- react cant find ffmpegwasm
- node ffmpeg programmatically built list(?) of commands
- html display video file binary buffer
- Webcodecs mux with Ffmpeg.wasm
- "SharedArrayBuffer is not defined" error in cloud server but working in localhost
- combining video and audio with ffmpeg.wasm throws bad memory error
- Download an HLS stream with javascript
- How do I merge images and an audio file into a single video?
- Error: async/await is not yet supported in Client Components, only Server Components
- Running FFMPEG in electron using react, either doesn't load without any error or throws an SharedArrayBuffer is not defined when run after building
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
First scale using scale2ref, then change opacity.
-i input.mkv -i overlay.mov -filter_complex [1:v][0:v]scale2ref[zork][video]; [zork]format=argb,lutrgb=a=val*0.5[zork];[video][zork]overlay -pix_fmt yuv420p -preset ultrafast -c:a copy output.mkv