mpv
Version, currently main branch1 version
- main branchlatestOct 15, 2025
github.com/kojix2/mpv.cr
No description declared in shard.yml.
1 stars
1 dependent
License: MIT
Installation
# Add this to your shard.yml
dependencies:
mpv:
github: kojix2/mpv.cr
branch: mainmain is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.17.1- License
- MIT
- Author
- kojix2
Dependencies
This version declares no dependencies.
README
mpv.cr
🎥 libmpv - Command line media player - for Crystal
Installation
Add this shard to your shard.yml:
dependencies:
mpv:
github: kojix2/mpv.cr
Then install:
shards install
Quick start
require "mpv"
mpv = MPV::LibMPV.create
raise "mpv_create failed" if mpv.null?
MPV::LibMPV.set_option_string(mpv, "video", "no")
MPV::LibMPV.initialize(mpv)
MPV::LibMPV.command_string(mpv, %(loadfile "https://example.com/stream"))
loop do
evp = MPV::LibMPV.wait_event(mpv, 0.5)
ev = evp.value
break if ev.event_id == MPV::LibMPV::EventID::SHUTDOWN
end
MPV::LibMPV.terminate_destroy(mpv)
Example
crystal build examples/play.cr
Pass a custom URL:
./play https://stream.live.vc.bbcmedia.co.uk/bbc_world_service
Play a local file:
./play /path/to/media
Development / Tests
crystal tool format
crystal spec
License
MIT License (see LICENSE).
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
main- Seen
- Oct 15, 2025
- Crystal
>= 1.17.1- Indexed
- yes
Dependents
Repository
github.com/kojix2/mpv.cr
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1