82 lines
2.5 KiB
Go
82 lines
2.5 KiB
Go
package main
|
|
|
|
// FFprobeOutput represents the JSON output from ffprobe
|
|
type FFprobeOutput struct {
|
|
Streams []FFprobeStream `json:"streams"`
|
|
Format FFprobeFormat `json:"format"`
|
|
}
|
|
|
|
type FFprobeStream struct {
|
|
Index int `json:"index"`
|
|
CodecName string `json:"codec_name"`
|
|
CodecType string `json:"codec_type"`
|
|
Channels int `json:"channels,omitempty"`
|
|
Tags map[string]string `json:"tags,omitempty"`
|
|
Width int `json:"width,omitempty"`
|
|
Height int `json:"height,omitempty"`
|
|
}
|
|
|
|
type FFprobeFormat struct {
|
|
Duration string `json:"duration"`
|
|
Tags map[string]string `json:"tags,omitempty"`
|
|
}
|
|
|
|
// MediaInfoOutput represents the JSON output from mediainfo
|
|
type MediaInfoOutput struct {
|
|
Media MediaInfoMedia `json:"media"`
|
|
}
|
|
|
|
type MediaInfoMedia struct {
|
|
Track []MediaInfoTrack `json:"track"`
|
|
}
|
|
|
|
type MediaInfoTrack struct {
|
|
Type string `json:"@type"`
|
|
StreamOrder string `json:"StreamOrder,omitempty"`
|
|
ID string `json:"ID,omitempty"`
|
|
Format string `json:"Format,omitempty"`
|
|
FrameRateMode string `json:"FrameRate_Mode,omitempty"`
|
|
FrameRate string `json:"FrameRate,omitempty"`
|
|
FrameRateOriginal string `json:"FrameRate_Original,omitempty"`
|
|
FrameRateOriginalString string `json:"FrameRate_Original_String,omitempty"`
|
|
VideoDelay string `json:"Video_Delay,omitempty"`
|
|
}
|
|
|
|
// MkvMergeOutput represents the JSON output from mkvmerge -J
|
|
type MkvMergeOutput struct {
|
|
Tracks []MkvMergeTrack `json:"tracks"`
|
|
}
|
|
|
|
type MkvMergeTrack struct {
|
|
ID int `json:"id"`
|
|
Type string `json:"type"`
|
|
Properties MkvMergeProperties `json:"properties"`
|
|
}
|
|
|
|
type MkvMergeProperties struct {
|
|
StreamID int `json:"stream_id"`
|
|
TrackName string `json:"track_name,omitempty"`
|
|
Language string `json:"language,omitempty"`
|
|
}
|
|
|
|
// LoudnormStats represents the JSON output from ffmpeg loudnorm filter
|
|
type LoudnormStats struct {
|
|
InputI string `json:"input_i"`
|
|
InputTp string `json:"input_tp"`
|
|
InputLra string `json:"input_lra"`
|
|
InputThresh string `json:"input_thresh"`
|
|
OutputI string `json:"output_i"`
|
|
OutputTp string `json:"output_tp"`
|
|
OutputLra string `json:"output_lra"`
|
|
OutputThresh string `json:"output_thresh"`
|
|
TargetOffset string `json:"target_offset"`
|
|
}
|
|
|
|
// ProcessedAudioFile holds info about a converted audio track
|
|
type ProcessedAudioFile struct {
|
|
Path string
|
|
Language string
|
|
Title string
|
|
Delay int
|
|
}
|