Go bindings for MediaInfo
sudo apt-get install libmediainfo0v5 libmediainfo-dev
file, err := mediainfo.Open("/file/path/filename.mp4")
if err != nil {
log.Fatal(err)
}
defer file.Close()
videoBitrate := file.Parameter(mediainfo.StreamVideo, 0, "BitRate")
audioBitrateTrack1 := file.Parameter(mediainfo.StreamAudio, 0, "BitRate")
audioBitrateTrack2 := file.Parameter(mediainfo.StreamAudio, 1, "BitRate")
audioTracks := file.Parameter(mediainfo.StreamAudio, 0, "StreamCount")
parameters := file.Option("info_parameters", "")
Aleksandr Zelenin, e-mail: [email protected]