![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/carousell/goffmpeg
FFMPEG wrapper written in GO which allows to obtain the progress.
How to transcode a media file
go get github.com/xfrr/goffmpeg
package main
import (
"github.com/carousell/goffmpeg/transcoder"
)
var inputPath = "/data/testmov"
var outputPath = "/data/testmp4.mp4"
func main() {
// Create new instance of transcoder
trans := new(transcoder.Transcoder)
// Initialize transcoder passing the input file path and output file path
err := trans.Initialize( inputPath, outputPath )
// Handle error...
// Start transcoder process without checking progress
done := trans.Run(false)
// This channel is used to wait for the process to end
err = <-done
// Handle error...
}
How to get the transcoding progress
...
func main() {
// Create new instance of transcoder
trans := new(transcoder.Transcoder)
// Initialize transcoder passing the input file path and output file path
err := trans.Initialize( inputPath, outputPath )
// Handle error...
// Start transcoder process with progress checking
done := trans.Run(true)
// Returns a channel to get the transcoding progress
progress := trans.Output()
// Example of printing transcoding progress
for msg := range progress {
fmt.Println(msg)
}
// This channel is used to wait for the transcoding process to end
err = <-done
}
type Progress struct {
FramesProcessed string
CurrentTime string
CurrentBitrate string
Progress float64
Speed string
}
Those options can be set before starting the transcoding.
SetAspect
SetResolution
SetVideoBitRate
SetVideoBitRateTolerance
SetVideoMaxBitrate
SetVideoMinBitRate
SetVideoCodec
SetVframes
SetFrameRate
SetAudioRate
SetSkipAudio
SetSkipVideo
SetMaxKeyFrame
SetMinKeyFrame
SetKeyframeInterval
SetAudioCodec
SetAudioBitRate
SetAudioChannels
SetBufferSize
SetThreads
SetPreset
SetTune
SetAudioProfile
SetVideoProfile
SetDuration
SetDurationInput
SetSeekTime
SetSeekTimeInput
SetSeekUsingTsInput
SetQuality
SetStrict
SetCopyTs
SetMuxDelay
SetHideBanner
SetInputPath
SetNativeFramerateInput
SetRtmpLive
SetHlsListSize
SetHlsSegmentDuration
SetHlsPlaylistType
SetHttpMethod
SetHttpKeepAlive
SetOutputPath
SetOutputFormat
Example
func main() {
// Create new instance of transcoder
trans := new(transcoder.Transcoder)
// Initialize transcoder passing the input file path and output file path
err := trans.Initialize( inputPath, outputPath )
// Handle error...
// SET FRAME RATE TO MEDIAFILE
trans.MediaFile().SetFrameRate(70)
// SET ULTRAFAST PRESET TO MEDIAFILE
trans.MediaFile().SetPreset("ultrafast")
// Start transcoder process to check progress
done := trans.Run(true)
// Returns a channel to get the transcoding progress
progress := trans.Output()
// Example of printing transcoding progress
for msg := range progress {
fmt.Println(msg)
}
// This channel is used to wait for the transcoding process to end
err = <-done
}
Building...
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.