In development · no release yet
A video player corefor NSGo apps.
NSGo Media decodes with FFmpeg, keeps sound and picture in sync and draws the picture in a view. Every button, bar and subtitle is your app’s own.
Subtitles reach the app as cues.
The core
Everything beneath the picture
Plays what FFmpeg decodes
Local files and HTTP(S) URLs in any container and codec the bundled FFmpeg decodes, with the headers a CDN asks for and a separate audio source kept in sync.
Down to the frame
Fast or exact seeking, stepping one frame forward or backward, rates from 0.25× to 4× keeping the pitch, looping and snapshots.
Hardware decoding
VideoToolbox, D3D11VA and VAAPI, falling back to software decoding when the hardware fails.
Subtitles as cues
Text tracks and SRT, WebVTT and ASS files as timed text; PGS, DVD, DVB and VobSub as bitmaps placed on the picture.
HLS and DASH
On demand and live, read in Go, with the variant chosen by the bandwidth or by the app, and HLS segments encrypted with AES-128.
Audio passthrough
AC-3, E-AC-3, DTS, DTS-HD and TrueHD sent undecoded to a receiver on HDMI or S/PDIF, and PCM where the device refuses.
Usage
Your controls, its picture
An app opens a player, places its view and calls its methods from its own controls. The demo app is a complete player built this way.
Views draw above it
The picture is an ordinary image view on every desktop, never a native window, so the app’s controls and overlays sit on top.
State as signals
State, position, buffered range, tracks and cues are NSGo signals the app’s views read.
No cgo
FFmpeg and the audio systems are reached through purego, and FFmpeg’s LGPL shared libraries load at run time.
func Root(cx *core.Scope) core.Node { p := player.New(cx) p.Open("movie.mkv") return core.View{Children: []core.Node{ player.View{Player: p}, ui.Button{Text: "Play", OnPress: p.Play}, }}}Platforms
Four platforms, one Go API
macOS
Apple silicon and Intel, macOS 11 or later. VideoToolbox decoding, CoreAudio output and passthrough.
Windows
x64, Windows 10 or later. D3D11VA decoding, WASAPI output and passthrough in exclusive mode.
Linux
x64 with glibc 2.34 and libva 2. VAAPI decoding, PulseAudio or PipeWire output and passthrough.
iOS
iOS 15 or later, on devices and the arm64 simulator. VideoToolbox decoding and an AudioQueue output.
Built for NSGo
NSGo Media is a Go module NSGo apps import, and it uses only NSGo’s public API. NSGo is a cross-platform native UI engine with a Go backend.