Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit c637911

Browse files
author
Philip Ye
committed
add more options for audio
1 parent d91fbf5 commit c637911

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Diff for: ffmpeg/metadata.go

+10
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ type Streams struct {
5353
Duration string `json:"duration"`
5454
Disposition Disposition `json:"disposition"`
5555
BitRate string `json:"bit_rate"`
56+
SampleRate string `json:"sample_rate"`
57+
BitsPerSample string `json:"bits_per_sample"`
5658
}
5759

5860
// Tags ...
@@ -287,6 +289,14 @@ func (s Streams) GetBitRate() string {
287289
return s.BitRate
288290
}
289291

292+
func (s Streams) GetSampleRate() string {
293+
return s.SampleRate
294+
}
295+
296+
func (s Streams) GetBitsPerSample() string {
297+
return s.BitsPerSample
298+
}
299+
290300
//GetDefault ...
291301
func (d Disposition) GetDefault() int {
292302
return d.Default

Diff for: metadata.go

+2
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ type Streams interface {
5151
GetDuration() string
5252
GetDisposition() Disposition
5353
GetBitRate() string
54+
GetSampleRate() string
55+
GetBitsPerSample() string
5456
}
5557

5658
// Tags ...

0 commit comments

Comments
 (0)