Skip to content
/ yami Public
forked from cajax/yami

Mediainfo wrapper for Golang

License

Notifications You must be signed in to change notification settings

jjacque/yami

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Yet Another MediaInfo Go Wrapper

This wrapper allows you to run mediainfo and parse its output in usable manner.

Yami is inspired of go-ffprobe and can be used as a drop-in replacement with minor changes in mapping.

Current version mapping matches XML v2

Example

package main

import (
	"github.com/cajax/yami"
	"log"
	"time"
)

func main() {
	mediainfo, err := yami.GetMediaInfo("video.mp4", 10*time.Second)

	if err != nil {
		log.Panic(err)
	}

	video := mediainfo.GetFirstVideoTrack()

	log.Printf("Video Codec:\t%s", video.CodecID)
	log.Printf("Framerate:\t\t%f", video.FrameRate)
}

About

Mediainfo wrapper for Golang

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%