From dea8052732d2bc814b338453012fb88e681f589c Mon Sep 17 00:00:00 2001 From: ahmad Date: Wed, 22 Jan 2025 21:19:25 +1100 Subject: [PATCH 1/3] SkipData --- ffmpeg/options.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ffmpeg/options.go b/ffmpeg/options.go index 323d4b3..97b4771 100644 --- a/ffmpeg/options.go +++ b/ffmpeg/options.go @@ -57,6 +57,7 @@ type Options struct { AudioFilter *string `flag:"-af"` SkipVideo *bool `flag:"-vn"` SkipAudio *bool `flag:"-an"` + SkipData *bool `flag:"-dn"` CompressionLevel *int `flag:"-compression_level"` MapMetadata *string `flag:"-map_metadata"` Metadata map[string]string `flag:"-metadata"` @@ -102,7 +103,7 @@ func (opts Options) GetStrArguments() []string { values = append(values, k, fmt.Sprintf("%v", v)) } } - + if vi, ok := value.(*int); ok { values = append(values, flag, fmt.Sprintf("%d", *vi)) } From e1dc78a928fe13462c133353a9643de28f1846b2 Mon Sep 17 00:00:00 2001 From: ahmad Date: Wed, 22 Jan 2025 21:20:18 +1100 Subject: [PATCH 2/3] update package --- LICENSE | 2 +- README.md | 6 +++--- go.mod | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/LICENSE b/LICENSE index 2ad87fe..d8cd539 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2020 FlooStack +Copyright (c) 2020 ahmadissa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 570791b..2e5b700 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Download from Github ```shell -go get github.com/floostack/transcoder +go get github.com/ahmadissa/transcoder ``` ## Example @@ -26,7 +26,7 @@ package main import ( "log" - ffmpeg "github.com/floostack/transcoder/ffmpeg" + ffmpeg "github.com/ahmadissa/transcoder/ffmpeg" ) func main() { @@ -39,7 +39,7 @@ func main() { Hwaccel: &hwaccel, VideoCodec: &videoCodec, } - + format := "mp4" overwrite := true diff --git a/go.mod b/go.mod index 4c9ade4..d5b51e9 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ -module github.com/floostack/transcoder +module github.com/ahmadissa/transcoder go 1.13 From 904e695027b60eb8d3164c631159a10a35c2725f Mon Sep 17 00:00:00 2001 From: ahmad Date: Wed, 22 Jan 2025 21:20:46 +1100 Subject: [PATCH 3/3] update package --- ffmpeg/ffmpeg.go | 4 +-- ffmpeg/metadata.go | 80 +++++++++++++++++++++++----------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/ffmpeg/ffmpeg.go b/ffmpeg/ffmpeg.go index 6328104..2386059 100644 --- a/ffmpeg/ffmpeg.go +++ b/ffmpeg/ffmpeg.go @@ -14,8 +14,8 @@ import ( "strconv" "strings" - "github.com/floostack/transcoder" - "github.com/floostack/transcoder/utils" + "github.com/ahmadissa/transcoder" + "github.com/ahmadissa/transcoder/utils" ) // Transcoder ... diff --git a/ffmpeg/metadata.go b/ffmpeg/metadata.go index 4e81910..3393752 100644 --- a/ffmpeg/metadata.go +++ b/ffmpeg/metadata.go @@ -1,6 +1,6 @@ package ffmpeg -import "github.com/floostack/transcoder" +import "github.com/ahmadissa/transcoder" // Metadata ... type Metadata struct { @@ -142,197 +142,197 @@ func (t Tags) GetEncoder() string { return t.Encoder } -//GetIndex ... +// GetIndex ... func (s Streams) GetIndex() int { return s.Index } -//GetID ... +// GetID ... func (s Streams) GetID() string { return s.ID } -//GetCodecName ... +// GetCodecName ... func (s Streams) GetCodecName() string { return s.CodecName } -//GetCodecLongName ... +// GetCodecLongName ... func (s Streams) GetCodecLongName() string { return s.CodecLongName } -//GetProfile ... +// GetProfile ... func (s Streams) GetProfile() string { return s.Profile } -//GetCodecType ... +// GetCodecType ... func (s Streams) GetCodecType() string { return s.CodecType } -//GetCodecTimeBase ... +// GetCodecTimeBase ... func (s Streams) GetCodecTimeBase() string { return s.CodecTimeBase } -//GetCodecTagString ... +// GetCodecTagString ... func (s Streams) GetCodecTagString() string { return s.CodecTagString } -//GetCodecTag ... +// GetCodecTag ... func (s Streams) GetCodecTag() string { return s.CodecTag } -//GetWidth ... +// GetWidth ... func (s Streams) GetWidth() int { return s.Width } -//GetHeight ... +// GetHeight ... func (s Streams) GetHeight() int { return s.Height } -//GetCodedWidth ... +// GetCodedWidth ... func (s Streams) GetCodedWidth() int { return s.CodedWidth } -//GetCodedHeight ... +// GetCodedHeight ... func (s Streams) GetCodedHeight() int { return s.CodedHeight } -//GetHasBFrames ... +// GetHasBFrames ... func (s Streams) GetHasBFrames() int { return s.HasBFrames } -//GetSampleAspectRatio ... +// GetSampleAspectRatio ... func (s Streams) GetSampleAspectRatio() string { return s.SampleAspectRatio } -//GetDisplayAspectRatio ... +// GetDisplayAspectRatio ... func (s Streams) GetDisplayAspectRatio() string { return s.DisplayAspectRatio } -//GetPixFmt ... +// GetPixFmt ... func (s Streams) GetPixFmt() string { return s.PixFmt } -//GetLevel ... +// GetLevel ... func (s Streams) GetLevel() int { return s.Level } -//GetChromaLocation ... +// GetChromaLocation ... func (s Streams) GetChromaLocation() string { return s.ChromaLocation } -//GetRefs ... +// GetRefs ... func (s Streams) GetRefs() int { return s.Refs } -//GetQuarterSample ... +// GetQuarterSample ... func (s Streams) GetQuarterSample() string { return s.QuarterSample } -//GetDivxPacked ... +// GetDivxPacked ... func (s Streams) GetDivxPacked() string { return s.DivxPacked } -//GetRFrameRrate ... +// GetRFrameRrate ... func (s Streams) GetRFrameRrate() string { return s.RFrameRrate } -//GetAvgFrameRate ... +// GetAvgFrameRate ... func (s Streams) GetAvgFrameRate() string { return s.AvgFrameRate } -//GetTimeBase ... +// GetTimeBase ... func (s Streams) GetTimeBase() string { return s.TimeBase } -//GetDurationTs ... +// GetDurationTs ... func (s Streams) GetDurationTs() int { return s.DurationTs } -//GetDuration ... +// GetDuration ... func (s Streams) GetDuration() string { return s.Duration } -//GetDisposition ... +// GetDisposition ... func (s Streams) GetDisposition() transcoder.Disposition { return s.Disposition } -//GetBitRate ... +// GetBitRate ... func (s Streams) GetBitRate() string { return s.BitRate } -//GetDefault ... +// GetDefault ... func (d Disposition) GetDefault() int { return d.Default } -//GetDub ... +// GetDub ... func (d Disposition) GetDub() int { return d.Dub } -//GetOriginal ... +// GetOriginal ... func (d Disposition) GetOriginal() int { return d.Original } -//GetComment ... +// GetComment ... func (d Disposition) GetComment() int { return d.Comment } -//GetLyrics ... +// GetLyrics ... func (d Disposition) GetLyrics() int { return d.Lyrics } -//GetKaraoke ... +// GetKaraoke ... func (d Disposition) GetKaraoke() int { return d.Karaoke } -//GetForced ... +// GetForced ... func (d Disposition) GetForced() int { return d.Forced } -//GetHearingImpaired ... +// GetHearingImpaired ... func (d Disposition) GetHearingImpaired() int { return d.HearingImpaired } -//GetVisualImpaired ... +// GetVisualImpaired ... func (d Disposition) GetVisualImpaired() int { return d.VisualImpaired } -//GetCleanEffects ... +// GetCleanEffects ... func (d Disposition) GetCleanEffects() int { return d.CleanEffects }