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

add more options for audio #36

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
## Download from Github

```shell
go get github.com/floostack/transcoder
go get git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder
```

## Example
Expand All @@ -45,7 +45,7 @@ package main
import (
"log"

ffmpeg "github.com/floostack/transcoder/ffmpeg"
ffmpeg "git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder/ffmpeg"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"strconv"
"strings"

"github.com/floostack/transcoder"
"github.com/floostack/transcoder/utils"
"git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder"
"git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder/utils"
)

// Transcoder ...
Expand Down
20 changes: 19 additions & 1 deletion ffmpeg/metadata.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ffmpeg

import "github.com/floostack/transcoder"
import transcoder "git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder"

// Metadata ...
type Metadata struct {
Expand Down Expand Up @@ -48,11 +48,14 @@ type Streams struct {
DivxPacked string `json:"divx_packed"`
RFrameRrate string `json:"r_frame_rate"`
AvgFrameRate string `json:"avg_frame_rate"`
NbFrames string `json:"nb_frames"`
TimeBase string `json:"time_base"`
DurationTs int `json:"duration_ts"`
Duration string `json:"duration"`
Disposition Disposition `json:"disposition"`
BitRate string `json:"bit_rate"`
SampleRate string `json:"sample_rate"`
BitsPerSample int `json:"bits_per_sample"`
}

// Tags ...
Expand Down Expand Up @@ -262,6 +265,11 @@ func (s Streams) GetAvgFrameRate() string {
return s.AvgFrameRate
}

//GetNbFrames ...
func (s Streams) GetNbFrames() string {
return s.NbFrames
}

//GetTimeBase ...
func (s Streams) GetTimeBase() string {
return s.TimeBase
Expand All @@ -287,6 +295,16 @@ func (s Streams) GetBitRate() string {
return s.BitRate
}

//GetSampleRate ...
func (s Streams) GetSampleRate() string {
return s.SampleRate
}

//GetBitsPerSample ...
func (s Streams) GetBitsPerSample() int {
return s.BitsPerSample
}

//GetDefault ...
func (d Disposition) GetDefault() int {
return d.Default
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/floostack/transcoder
module git.code.oa.com/yt-media-ai-videounderstanding/gh-floostack-transcoder

go 1.13
3 changes: 3 additions & 0 deletions metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ type Streams interface {
GetDivxPacked() string
GetRFrameRrate() string
GetAvgFrameRate() string
GetNbFrames() string
GetTimeBase() string
GetDurationTs() int
GetDuration() string
GetDisposition() Disposition
GetBitRate() string
GetSampleRate() string
GetBitsPerSample() int
}

// Tags ...
Expand Down