Coder Social home page Coder Social logo

optivorbis / optivorbis Goto Github PK

View Code? Open in Web Editor NEW
83.0 2.0 5.0 43.72 MB

๐Ÿ—œ๏ธ Library and application for lossless, format-preserving, two-pass optimization and repair of Vorbis data, reducing its size without altering any audio information.

Home Page: https://optivorbis.github.io/OptiVorbis

License: GNU Affero General Public License v3.0

Rust 90.09% Shell 0.58% JavaScript 0.75% CSS 0.20% HTML 5.51% TypeScript 2.67% Dockerfile 0.18%
audio-compression bandwidth-saver lossless-compression ogg-vorbis vorbis file-optimization optimization-tools rust-application rust-library repair-tool cli rust hacktoberfest

optivorbis's Issues

A setting to overwrite files/bulk optimization?

Hello! I've stumbled upon this program, and the first thing I thought is that it would be extremely handy if I could just point this application at a folder and have it optimize everything within it without having to manually input each file. I'm a barely tech literate sort of person so I don't really know how to write a fancy script that would do that for me automagically like what I've seen others do. If there was a setting to optimize and overwrite the original files without having to do it all manually, that would rock my socks off. It would be doubly awesome if I could just drag and drop files/folders on the executable and have it do all the magic without ever touching a command prompt, kind of like how PNGOUT does it!

reproducible files

optivorbis compares itself to jpegoptim and optipng, but it has one big difference: it seems to always generate a different file.

optivorbis file1.ogg file2.ogg
optivorbis file2.ogg file3.ogg
optivorbis file1.ogg file4.ogg

md5sum file2.ogg file3.ogg file4.ogg

All hashes are different (all sizes are equal).

jpegoptim and optipng detect if the file they are overwriting would have a bigger or equal size, and do not overwrite it.

It would be nice if optivorbis would create reproducible files (as in: same input, same output).

Make testing dataset publicly available

During the development of OptiVorbis, I created a dataset of Ogg Vorbis files for testing and evaluating it, which is mentioned in the README. So far, this dataset has been sitting on my hard disk and on a digital medium submitted with my thesis documentation, neither of which are accessible to the wider community.

In the interest of making it easier to reproduce the results described and to facilitate further research by interested parties, I think it's a good idea to make the dataset public in a free, reliable, research-friendly, and long-term way.

My main concerns with this idea are as follows:

  • There is no commercial file hosting service that I know of that fits the bill. Fortunately, I recently stumbled upon Zenodo, which is supported by EU institutions and seems quite suitable for this purpose, as it assigns a DOI to its uploads.
  • Intellectual property: in any case, the dataset files can be traced back to their original Freesound submission, but that doesn't mean that their licensing is compatible with this kind of distribution.

Now that file hosting is no longer an issue, only the intellectual property concerns remain, so it's wise for me to at least write this issue so that I don't forget about it and work on it can get done. If anyone has expert knowledge about my intellectual property concerns, please feel free to comment and give your perspective.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


Warning

Renovate failed to look up the following dependencies: Failed to look up npm package optivorbis.

Files affected: web/package.json


Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update mcr.microsoft.com/vscode/devcontainers/rust docker tag to v1

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

cargo
Cargo.toml
  • log 0.4.21
packages/optivorbis/Cargo.toml
  • ogg 0.9.1
  • indexmap 2.2.6
  • bumpalo 3.16.0
  • tinyvec 1.6.0
  • getrandom 0.2.15
  • rand_xoshiro 0.6.0
  • thiserror 1.0.61
  • ouroboros 0.18.4
  • slice-group-by 0.3.1
  • wasm-bindgen 0.2.92
  • console_log 1.0.0
  • console_error_panic_hook 0.1.7
  • pretty_env_logger 0.5.0
  • oggvorbismeta 0.1.0
packages/optivorbis_afl_fuzz_target/Cargo.toml
  • afl 0.15.8
packages/optivorbis_cli/Cargo.toml
  • getopts 0.2.21
  • stderrlog 0.6.0
packages/vorbis_bitpack/Cargo.toml
  • acid_io 0.1.0
  • libm 0.2.8
dockerfile
.devcontainer/Dockerfile
  • mcr.microsoft.com/vscode/devcontainers/rust 0-buster
github-actions
.github/workflows/ci.yml
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • dtolnay/rust-toolchain v1@1482605bfc5719782e1267fd0c0cc350fe7646b8
  • mozilla-actions/sccache-action v0.0.5@89e9040de88b577a072e3760aaf59f585da083af
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • dtolnay/rust-toolchain nightly
  • mozilla-actions/sccache-action v0.0.5@89e9040de88b577a072e3760aaf59f585da083af
  • giraffate/clippy-action v1@13b9d32482f25d29ead141b79e7e04e7900281e0
  • EmbarkStudios/cargo-deny-action v1@3f4a782664881cf5725d0ffd23969fcce89fd868
  • actions/upload-artifact v4@65462800fd760344b1a7b4382951275a0abb4808
  • actions/checkout v4@692973e3d937129bcbf40652eb9f2f61becf3332
  • dtolnay/rust-toolchain nightly
  • actions/setup-node v4@60edb5dd545a775178f52524783378180af0d1f8
  • mozilla-actions/sccache-action v0.0.5@89e9040de88b577a072e3760aaf59f585da083af
  • peaceiris/actions-gh-pages v4@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e
  • ubuntu 22.04
  • ubuntu 22.04
npm
web/package.json
  • core-js 3.37.1
  • optivorbis *
  • @typescript-eslint/eslint-plugin 7.13.1
  • @typescript-eslint/parser 7.13.1
  • @wasm-tool/wasm-pack-plugin 1.7.0
  • autoprefixer 10.4.19
  • css-loader 7.1.2
  • cssnano 7.0.3
  • eslint 8.57.0
  • eslint-config-airbnb-base 15.0.0
  • eslint-import-resolver-typescript 3.6.1
  • eslint-plugin-import 2.29.1
  • favicons-webpack-plugin 6.0.1
  • html-webpack-plugin 5.6.0
  • mini-css-extract-plugin 2.9.0
  • postcss 8.4.38
  • postcss-loader 8.1.1
  • svg-inline-loader 0.8.2
  • tailwindcss 3.4.4
  • ts-loader 9.5.1
  • typescript 5.5.2
  • webpack 5.92.1
  • webpack-cli 5.1.4
  • webpack-dev-server 5.0.4

  • Check this box to trigger a request for Renovate to run again on this repository

Consider using the `indextree` crate to implement Huffman trees

Currently, OptiVorbis implements Huffman tree operations using the ouroboros and bumpalo crates. This works fine, but profiling showed that walking through Huffman trees is a hot operation during optimization, responsible for most of the execution time. Therefore, as highlighted by Amdahl's law, optimizing the runtime of this operation is crucial to increase the overall performance of OptiVorbis.

One possible avenue of optimization is to use the indextree crate instead of the two previously mentioned. The basic idea is to use it to store indexes instead of pointers to children in the tree nodes, potentially making it easier for the Rust compiler to choose to use a more efficient base + index addressing mode in the emitted assembly instructions rather than resorting to dereferencing a generic reference. Even if this change does not improve performance, it would remove one dependency and likely simplify the code, which is welcome anyway.

Some basic benchmarks should be added to the codebase to assess the performance impact of this change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.