Best mediaplayer for rust

Dear Rust community.
What is a suggested create for playing videofiles in a Rust program.
To my understanding there isn't a media crate made specifically for Rust. I've reseach myself to lib-vlc is an option, but also when I'm on Mac?

Can anyone inform me about the situation regarding rust and playing video-files. Is there upcomming project, or finished crates that I should know about?

Thanks for sharing your knowledge.

I don't know any such crates personally, but lib.rs has a multimedia category you might want to sift through and see if there's a crate that suits your needs:

1 Like

Thanks for the info. I'll do that!

The gstreamer family of crates will probably be most complete and mature for making a full-featured media player.

I suggest avoiding ffmpeg, because Rust has several crates for interacting with it, but they're all incomplete and poorly maintained.

If you only need to support macOS, then you could use AVFoundation framework. You may need to write your own FFI bindings for it.

1 Like

Hi @kornel. Thanks for you input.
I want to create a program were the user can choose between 3 videos, repeating in loop (to begin with).
Here's a link to a video explainer (in danish) of my program (I want to rewrite with Rust): https://www.youtube.com/watch?v=px4PlQgWI2I
I've added simple comment in the description below the video.

Do you still judge gstreamer beeing the best option for that?
Thanks for you advice. :relieved:

Yes. Alternatively, use Tauri and make the videos play in <video> HTML element.

Ok, thanks. Yes Tauri also looks interesting. :herb:

Hey.
I have decided to go with Tauri. I need to use a UI framework for the application development. I know there are many different (React, Angular, Vue.js ect.). Any recommendations? -It's my first web app.

Thanks.

React/Next.js is arguably the most widely used/sought-after JS framework right now. Svelte/SvelteKit is pretty well liked but less widely adopted. That being said, you can write your frontend in Rust as well, i.e. with a framework like yew.

Thanks for the answer.
I'm tempted to use yew, to stay in Rust. My only concern is how well you can code the UI graphics. Any thoughts on that.
Otherwise I'll use Svelte.

I'm not proficient with either, but I'd say when only considering how easy it is to develop UI components, I'd say yew is about as easy to use as "vanilla" React without any component libraries. I think if you combine yew with a CSS framework like tailwind, setting up a nice looking UI should be no problem.

:100: :boom:
Thanks!

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.