TorchCodec Ruby
:fire: Media encoding and decoding for Torch.rb
Installation
First, install FFmpeg. For Homebrew, use:
brew install ffmpeg
Add this line to your application’s Gemfile:
gem "torchcodec"
Getting Started
This library follows the Python API. Most functionality is missing at the moment. PRs welcome!
decoder = TorchCodec::Decoders::AudioDecoder.new("file.mp3")
decoder.
decoder.get_all_samples
FFmpeg Installation
Linux
For Ubuntu, use:
sudo apt install libavcodec-dev libavdevice-dev libavfilter-dev libavutil-dev
Mac
brew install ffmpeg
History
View the changelog
Contributing
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/torchcodec-ruby.git
cd torchcodec-ruby
bundle install
bundle exec rake compile
bundle exec rake download:files
bundle exec rake test