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
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
@@ -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
@@ -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() {
4 changes: 2 additions & 2 deletions ffmpeg/ffmpeg.go
Original file line number Diff line number Diff line change
@@ -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 ...
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 {
@@ -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 ...
@@ -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
@@ -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
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
@@ -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 ...