Select audio stream

This commit is contained in:
Dan Jones 2023-08-29 20:18:27 -05:00
commit 07b2c00c14
3 changed files with 95 additions and 5 deletions

View file

@ -22,6 +22,8 @@ var rootCmd = &cobra.Command{
file := files.PickRandomFile()
out := ffmpeg.ProbeFile(file)
fmt.Printf("%+v\n", out)
stream := ffmpeg.SelectAudioStream(out)
fmt.Printf("Stream %d of %s: %+v\n", stream, out.Format.Path, out.Streams[stream])
},
}