This repository was archived by the owner on Feb 7, 2026. It is now read-only.
convert video > wav to video > m4a AAC#39
Open
someoneidoknow wants to merge 2 commits intooutpoot:mainfrom
Open
convert video > wav to video > m4a AAC#39someoneidoknow wants to merge 2 commits intooutpoot:mainfrom
someoneidoknow wants to merge 2 commits intooutpoot:mainfrom
Conversation
There was a problem hiding this comment.
Additional Comments (2)
-
lib/audioExtraction.ts, line 28-31 (link)style: Redundant conversion from AudioBuffer to WAV and back to AudioBuffer - the original audioBuffer could be used directly for M4A encoding
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
lib/audioExtraction.ts, line 494-495 (link)logic: Accessing sampleDurations[0] without checking if array is empty could throw an error
2 files reviewed, 2 comments
Contributor
Author
|
@face-hh wake up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
title
good for the storage of the server!!! (i only barely tested this on my client)
Greptile Summary
MediaCardDock.tsxto handle M4A files instead of WAV files for audio splitting functionalityImportant Files Changed
Confidence score: 3/5
lib/audioExtraction.tsfor potential runtime failures on unsupported browsers and the WebCodecs fallback logicSequence Diagram
sequenceDiagram participant User participant MediaCardDock participant MediaStore participant AudioExtraction participant WebCodecs participant UploadAPI participant Database participant WebSocket User->>MediaCardDock: "Select video file with audio" MediaCardDock->>AudioExtraction: "videoHasAudio(file)" AudioExtraction->>WebCodecs: "decodeAudioData(arrayBuffer)" WebCodecs-->>AudioExtraction: "audioBuffer" AudioExtraction-->>MediaCardDock: "true" MediaCardDock->>MediaStore: "addItem(videoMediaItem)" MediaCardDock->>UploadAPI: "upload video file" UploadAPI-->>MediaCardDock: "video url and fileId" MediaCardDock->>Database: "saveMediaToDatabase(video)" Database-->>MediaCardDock: "video dbId" MediaCardDock->>WebSocket: "broadcastMediaUploaded(video)" MediaCardDock->>User: "Show split option toast" User->>MediaCardDock: "Click Split button" MediaCardDock->>AudioExtraction: "extractAudioFromVideo(file)" AudioExtraction->>WebCodecs: "decodeAudioData(arrayBuffer)" AudioExtraction->>AudioExtraction: "audioBufferToWav(audioBuffer)" AudioExtraction->>WebCodecs: "AudioEncoder.encode(audioData)" WebCodecs-->>AudioExtraction: "AAC encoded chunks" AudioExtraction->>AudioExtraction: "buildM4aFile(chunks)" AudioExtraction-->>MediaCardDock: "m4aBlob" MediaCardDock->>MediaStore: "addItem(audioMediaItem)" MediaCardDock->>UploadAPI: "upload M4A audio file" UploadAPI-->>MediaCardDock: "audio url and fileId" MediaCardDock->>Database: "saveMediaToDatabase(audio)" Database-->>MediaCardDock: "audio dbId" MediaCardDock->>WebSocket: "broadcastMediaUploaded(audio)"