We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to obtain the playback duration of MP3 through ffmpeg-go. thanks
The text was updated successfully, but these errors were encountered:
You can get from JSON like (if you want, you can use gjson lib)
func GetDurationFromJson() float32 { file := "yourfilepath" out, err := ffmpeg.Probe(file, []ffmpeg.KwArgs{ {"show_entries": "format=duration"}, {"v": "quiet"}, }...) if err != nil { log.Fatal(err) } var JSONData map[string]interface{} json.Unmarshal([]byte(out), &JSONData) return JSONData["format"].(map[string]interface{})["duration"].(float32) }
Sorry, something went wrong.
It helped me,thk u
No branches or pull requests
How to obtain the playback duration of MP3 through ffmpeg-go.
thanks
The text was updated successfully, but these errors were encountered: