All Projects → DexterLB → Mpvipc

DexterLB / Mpvipc

Licence: mit
Golang implementation of the mpv video player's JSON IPC interface

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Mpvipc

Mpv Mpris
MPRIS plugin for mpv
Stars: ✭ 255 (+4150%)
Mutual labels:  mpv
Mpv thumbnail script
A Lua script to show preview thumbnails in mpv's OSC seekbar, sans external dependencies
Stars: ✭ 350 (+5733.33%)
Mutual labels:  mpv
Xiaobaiyang2
6pan 6盘小白羊 第二版 vue3+antd+typescript
Stars: ✭ 536 (+8833.33%)
Mutual labels:  mpv
Mpv Install
Sets up file associations for mpv on Windows
Stars: ✭ 305 (+4983.33%)
Mutual labels:  mpv
Mpc Qt
Media Player Classic Qute Theater
Stars: ✭ 345 (+5650%)
Mutual labels:  mpv
Moonplayer
Video player that can play online videos from youtube, bilibili etc.
Stars: ✭ 399 (+6550%)
Mutual labels:  mpv
mpv-twitch-chat
Show Twitch chat messages as subtitles when watching Twitch VOD with mpv.
Stars: ✭ 27 (+350%)
Mutual labels:  mpv
Mpv.net
🎞 mpv.net is a modern media player for Windows that works just like mpv.
Stars: ✭ 737 (+12183.33%)
Mutual labels:  mpv
Movie Monad
📺 A free and simple to use video player made with Haskell.
Stars: ✭ 347 (+5683.33%)
Mutual labels:  mpv
Bilidan
Play videos on Bilibili.com with MPV and Danmaku2ASS
Stars: ✭ 525 (+8650%)
Mutual labels:  mpv
Boram
🎞 Cross-platform graphical WebM converter
Stars: ✭ 312 (+5100%)
Mutual labels:  mpv
Mpv Easy Player
MPV-EASY Player - A movie player based on mpv
Stars: ✭ 324 (+5300%)
Mutual labels:  mpv
Bilibili Mac Client
An unofficial bilibili client for mac
Stars: ✭ 3,967 (+66016.67%)
Mutual labels:  mpv
Orion
Cross platform Twitch.tv client
Stars: ✭ 298 (+4866.67%)
Mutual labels:  mpv
Celluloid
A simple GTK+ frontend for mpv
Stars: ✭ 541 (+8916.67%)
Mutual labels:  mpv
spongebob-cli
Watch classic spongebob from the terminal!
Stars: ✭ 179 (+2883.33%)
Mutual labels:  mpv
Kawaii Player
Multimedia player, media library manager and portable media server with PC-To-PC casting feature.
Stars: ✭ 397 (+6516.67%)
Mutual labels:  mpv
Vidcutter
Been busy guys, will be reviewing and integrating pull requests shortly. Thanks to all contributors! LATEST RELEASE: 6.0.0 - flatpak @ https://flathub.org/apps/details/com.ozmartians.VidCutter - snap @ https://snapcraft.io/vidcutter - see https://github.com/ozmartian/vidcutter/releases for more details...
Stars: ✭ 775 (+12816.67%)
Mutual labels:  mpv
Iina
The modern video player for macOS.
Stars: ✭ 28,688 (+478033.33%)
Mutual labels:  mpv
Jellyfin Desktop
MPV-based desktop and cast client for Jellyfin
Stars: ✭ 510 (+8400%)
Mutual labels:  mpv

mpvipc

GoDoc Build Status MIT licensed

A Go implementation of mpv's IPC interface

Sample usage

  • Run mpv

    $ mpv some_file.mkv --input-unix-socket=/tmp/mpv_socket
    
  • Do things to it!

    package main
    
    import (
        "fmt"
        "log"
    
        "github.com/DexterLB/mpvipc"
    )
    
    func main() {
        conn := mpvipc.NewConnection("/tmp/mpv_rpc")
        err := conn.Open()
        if err != nil {
            log.Fatal(err)
        }
        defer conn.Close()
    
        events, stopListening := conn.NewEventListener()
    
        path, err := conn.Get("path")
        if err != nil {
            log.Fatal(err)
        }
        log.Printf("current file playing: %s", path)
    
        err = conn.Set("pause", true)
        if err != nil {
            log.Fatal(err)
        }
        log.Printf("paused!")
    
        _, err = conn.Call("observe_property", 42, "volume")
        if err != nil {
            fmt.Print(err)
        }
    
        go func() {
            conn.WaitUntilClosed()
            stopListening <- struct{}{}
        }()
    
        for event := range events {
            if event.ID == 42 {
                log.Printf("volume now is %f", event.Data.(float64))
            } else {
                log.Printf("received event: %s", event.Name)
            }
        }
    
        log.Printf("mpv closed socket")
    }
    

See more examples at the documentation.

All of mpv's functions and properties are listed here.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].