How Browser Video Conversion Works
A practical explanation of WebAssembly video conversion, memory use and format tradeoffs.
The media engine runs inside the browser
WebAssembly allows a compiled media engine to run in a browser sandbox. ConvertImgVidPDF loads its video engine only on media pages so the rest of the site stays lightweight.
Transcoding is expensive
Changing a video container often requires decoding and re-encoding audio or video streams. That work uses CPU, memory and battery, so large conversions are better suited to desktop devices.
Format conversion does not improve the source
A new MP4 or WebM file can improve compatibility, but transcoding cannot create detail that was not in the original. Additional lossy encoding can also reduce quality.
Local conversion avoids a remote upload
When the browser has enough resources, the selected video can be processed without sending its contents to a conversion server. That also avoids waiting for a separate upload before processing begins.