TorchCodec Ruby

:fire: Media encoding and decoding for Torch.rb

Build Status

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:

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