How to transcode Media files in Rust

I'm trying to figure out a way to transcode an MP3 file to an AAC file type in Rust. If anyone could put me in the right direction I would appreciate it.

I want to know the steps I would need to take to make this happen or any crate which would be a good resource to checkout.

Using the gstreamer bindings is probably the closest you'll be able to get to a simple transcoding API

It's sometimes simplest to call out to a CLI tool like ffmpeg, depending on your needs

3 Likes

Thank you @semicoleon, this works.

While using the GStreamer rust crate, when trying to create an element with the factory name being set osxaudiosink.

match gst::ElementFactory::make("osxaudiosink", None) {
}

I keep getting this error

BoolError { message: "Failed to create element from factory name", filename: "/Users/apple/.cargo/registry/src/github.com-1ecc6299db9ec823/gstreamer-0.17.4/src/auto/element_factory.rs", function: "gstreamer::auto::element_factory", line: 204 }

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.