# transcoder **Repository Path**: TopsLuo/transcoder ## Basic Information - **Project Name**: transcoder - **Description**: copy from https://github.com/floostack/transcoder - **Primary Language**: Go - **License**: MIT - **Default Branch**: master - **Homepage**: https://github.com/floostack/transcoder - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2022-11-04 - **Last Updated**: 2023-10-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Golang Transcoding Library
Build Status Build Status

Created by FlooStack.
## Features
Ease use
Implement your own business logic around easy interfaces
Transcoding progress
Obtain progress events generated by transcoding application process
## Download from Github ```shell go get github.com/floostack/transcoder ``` ## Example ```go package main import ( "log" ffmpeg "github.com/floostack/transcoder/ffmpeg" ) func main() { hwaccel := "cuvid" videoCodec := "h264_cuvid" inputOpts := ffmpeg.Options{ Hwaccel: &hwaccel, VideoCodec: &videoCodec, } format := "mp4" overwrite := true outputOpts := ffmpeg.Options{ OutputFormat: &format, Overwrite: &overwrite, } ffmpegConf := &ffmpeg.Config{ FfmpegBinPath: "/usr/local/bin/ffmpeg", FfprobeBinPath: "/usr/local/bin/ffprobe", ProgressEnabled: true, } progress, err := ffmpeg. New(ffmpegConf). Input("/tmp/avi"). Output("/tmp/mp4"). WithInputOptions(inputOpts). WithOutputOptions(outputOpts). Start() if err != nil { log.Fatal(err) } for msg := range progress { log.Printf("%+v", msg) } } ```