---
title: "Discussion on \"Running LibRaw, WebGL2 Color Grading, and Memory-Bounded Video Reversal in a Browser Tab (Zero Uploads)\" | Hashnode"
description: "Discussion on \"Running LibRaw, WebGL2 Color Grading, and Memory-Bounded Video Reversal in a Browser Tab (Zero Uploads)\". Every \"free online RAW converter\" or \"online video cutter\" follows the same playbook: upload your 40 MB Sony .ARW or 4 GB action-camera .MP4 to a remote bucket, wait in a server queue, and hope the ou"
url: "https://hashnode.com/posts/running-libraw-webgl2-color-grading-and-memory-bounded-video-reversal-in-a-browser-tab-zero-uploads/6b09501edba2adeaf128084a"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Running LibRaw, WebGL2 Color Grading, and Memory-Bounded Video Reversal in a Browser Tab (Zero Uploads)](https://gryphonyang.hashnode.dev/running-libraw-webgl2-color-grading-and-memory-bounded-video-reversal-in-a-browser-tab-zero-uploads?utm_source=hashnode&utm_medium=feed)

Every "free online RAW converter" or "online video cutter" follows the same playbook: upload your 40 MB Sony .ARW or 4 GB action-camera .MP4 to a remote bucket, wait in a server queue, and hope the ou

1d ago · 6 min read · gryphonyang.hashnode.dev  
Read the article

-   [#webassembly](https://hashnode.com/tag/webassembly)
-   [#webgl](https://hashnode.com/tag/webgl)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#video](https://hashnode.com/tag/video)

## Written by

[GryphonYang](https://hashnode.com/@gryphonyang)

@gryphonyang

  
[View profile](https://hashnode.com/@gryphonyang)

## Responses 1

Markdown supported · ⌘↵ to post

[Vidlify](https://hashnode.com/@vidlify)

[10h ago](https://hashnode.com/posts/running-libraw-webgl2-color-grading-and-memory-bounded-video-reversal-in-a-browser-tab-zero-uploads/6b09501edba2adeaf128084a/comment/6b0a20a4b2f85fa1cd94c037)

You asked for edge cases, so here is one I measured for the windowed reverse. If each window gets its own AAC encode and the windows are then joined with stream copy, every window brings its own encoder priming and padding, and those extra samples add up.

I tried it with desktop FFmpeg 6.1.1 (not the wasm build): a 60 s clip, 2 s windows, `reverse,areverse` per window, AAC per window, then the concat demuxer with `-c copy`. Video stayed at 60.00 s, but decoding the joined file gave 60.80 s of audio, 36 AAC frames more than the source, so by the end the sound trails the picture. Reversing the whole clip in one pass decoded to 60.01 s.

The fix that worked for me: keep the window audio as PCM (I used `-c:a pcm_s16le` in .mov) and encode AAC once during the concat step (`-c:v copy -c:a aac`). That joined file also decoded to 60.01 s. Might be worth a quick check on a few minute clip in your pipeline.
