From f0a8e50bf789fe8a6b141c666db1913bf8b6a60d Mon Sep 17 00:00:00 2001 From: Fran <35836929+xfrr@users.noreply.github.com> Date: Tue, 6 Feb 2018 14:48:10 +0100 Subject: [PATCH] Update README.md --- README.md | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 8b49774..d90c0b3 100644 --- a/README.md +++ b/README.md @@ -19,18 +19,19 @@ var outputPath = "/data/testmp4.mp4" func main() { - // Create new instance of transcoder + // Create new instance of transcoder trans := new(transcoder.Transcoder) - // Initialize transcoder passing the input file path and output file path + // Initialize transcoder passing the input file path and output file path err := trans.Initialize( inputPath, outputPath ) + // Handle error... - // Start transcoder process - done, err := trans.Run() + // Start transcoder process + done, err := trans.Run() - // This channel is used to wait for the process to end - <-done + // This channel is used to wait for the process to end + <-done } ``` @@ -39,26 +40,27 @@ How to get the transcoding progress ... func main() { - // Create new instance of transcoder + // Create new instance of transcoder trans := new(transcoder.Transcoder) - // Initialize transcoder passing the input file path and output file path + // Initialize transcoder passing the input file path and output file path err := trans.Initialize( inputPath, outputPath ) + // Handle error... - // Start transcoder process - done, err := trans.Run() + // Start transcoder process + done, err := trans.Run() - // Returns a channel to get the transcoding progress - progress, err := trans.Output() + // Returns a channel to get the transcoding progress + progress, err := trans.Output() - // Example of printing transcoding progress - for msg := range progress { - fmt.Println(msg) - } + // Example of printing transcoding progress + for msg := range progress { + fmt.Println(msg) + } - // This channel is used to wait for the transcoding process to end - <-done + // This channel is used to wait for the transcoding process to end + <-done } ```