-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compression quality concerns #4
Comments
I guess this is limited by |
Yeah, I imagine we won’t be able to get as low as ffmpeg, but 23 times larger seems a bit much. Have you also tried using different values for things like speed, groupOfPictures, fragmentation, etc? Maybe worth opening an issue on minih264 repo, ideally if we had a test video showing the filesize margin that might help. |
Another thing - it might be possible to swap out minih264 for x264. I imagine the bundle size will be much bigger though (but still way smaller than ffmpeg wasm). |
@mattdesl I'll play with parameters to see if it affects anything. A bigger |
|
|
So, summing up, while playing with parameters helps somewhat, users still need to run exported videos through |
Another thing you can try in the current build is I'm going to look into these settings more, and also expose the qMin/qMax parameters. There's also some additional configurations in |
Latest version (1.0.7) includes |
@mattdesl one last issue I encountered and was puzzled by in both this project and its predecessor — the resulting videos I produced (1920x1080, 60fps) are either an order of magnitude bigger or of abysmal quality (depending on
quantizationParameter
) compared to established encoders such as those used byffmpeg
, and I'm wondering if that's an inherent flaw ofminih264
(even though it's readme doesn't show as bad of a difference), or is there anything else at play?And if this can't be addressed in the library, could this be documented with some notes on video quality and perhaps recommendation to recompress the videos locally afterwards?
Currently I've settled on using
quantizationParameter: 20
(a compromise between encoding performance and good quality — 10 is 1.5x slower, and 30 produces noticeable artifacts), and then simply runningffmpeg -i video.mp4 video-optimized.mp4
— the default encoding parameters offfmpeg
produce result that's indistinguishable visually but 23 times smaller.The text was updated successfully, but these errors were encountered: