forked from aiko-chan-ai/Discord-video-experiment
-
Notifications
You must be signed in to change notification settings - Fork 45
Permalink
Choose a base ref
{{ refName }}
default
Choose a head ref
{{ refName }}
default
Comparing changes
Choose two branches to see what’s changed or to start a new pull request.
If you need to, you can also or
learn more about diff comparisons.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Learn more about diff comparisons here.
base repository: Discord-RE/Discord-video-stream
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.0.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
...
head repository: Discord-RE/Discord-video-stream
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.0
Could not load branches
Nothing to show
Loading
Could not load tags
Nothing to show
{{ refName }}
default
Loading
- 4 commits
- 23 files changed
- 2 contributors
Commits on Oct 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for bb658ad - Browse repository at this point
Copy the full SHA bb658adView commit details -
Configuration menu - View commit details
-
Copy full SHA for 823338d - Browse repository at this point
Copy the full SHA 823338dView commit details
Commits on Oct 28, 2024
-
Use ffmpeg demuxer instead of separate streams (#108)
* Add ffmpeg demuxer * Return sample rate instead of frame rate in audio stream * I forgot package.json * Only allow opus With raw audio formats, we can't maintain the strict 1 Opus frame per write() guarantee, so instead force the user to provide Opus audio * No `any` * Adapt `VideoStream` and `AudioStream` to receive `AVPacket` * Rewrite `streamLivestreamVideo` to use the new demuxer Again, the situation with `streamOptions` isn't really what I want, but let's progress little by little for now * Add pts conversion function * Store pts in the media streams * Add rudimentary syncing mechanism * Use `setImmediate` * Remove unnecessary `setImmediate` * Export demuxer function * Update `libav.js` * Force matroska input Without an explicit input format, ffmpeg errors with "Invalid data when processing input" * Rewrite read loop * How did this slip through????? * Reduce output limit Lower values lead to lower latency, but might increase overhead of repeatedly calling the function. 16KiB of output data per call seems reasonable * Add ability to adjust sync tolerance * `matroska`, not `mkv` * Add `BaseMediaStream` class, attempts to fix infinite loops * Rework `libav.js` loading + use threads * Use `pipe` instead of `pipeline` * Setup stream syncing * `libopus` instead of `opus` * Use unified stream output mode & combine the loops * Add width and height information to demuxer output * Oops forgot to break * VP8 is simply `libvpx` * Add function to split and merge NAL units This will come into play later on * Synthesize parameter sets NAL units It turns out, the `mp4_h264toannexb` filter was helping us a great deal here, by inserting the parameter sets before each I frame. With mkv and other containers, they're only specified once in the file, so we need to synthesize it ourselves * Fix unhandled exception on stream end * Stop ffmpeg on demux failure * Do not spin wait While spin waiting will produce the most accurate syncing, it's also very CPU intensive (briefly peaking a single core of an i3-330M), and most of the time it's not really needed anyway. Using a timeout of 1ms is better. Ideally there will be a signaling mechanism between the 2 stream, instead of each stream polling eachother, but I'm keeping this simple. * More code dedupe + possible memory leak prevention * Unused import * Use libav.js in-built function for timestamp conversion Avoiding `BigInt` if possible is always good * Update all deps
Configuration menu - View commit details
-
Copy full SHA for 7808635 - Browse repository at this point
Copy the full SHA 7808635View commit details -
Configuration menu - View commit details
-
Copy full SHA for 55cd997 - Browse repository at this point
Copy the full SHA 55cd997View commit details
There are no files selected for viewing