mirror of
https://github.com/Schmenn/discord-exploits.git
synced 2024-12-22 21:45:30 +00:00
5113344272
* implemented core ffmpeg functions [TODO] update README.md and clean code * Forgot to remove image files afterwards fucking dumbass * Upgraded FFmpeg implementation [^] README.md | for transcoding information [-] exploits.go | removed skipArg completely as it's not needed at all [^] exploits.go | changed mode handler because I made a mistake which makes v the zero duration video mode [^] .gitignore | added .jpg [^] transcode-to-webm.go => transcode.go | fixed FFmpeg output and made it print the temporary file location [^] name.go | made file name longer and changed Unix to UnixNano because the seed as Unix sometimes creates two identical file names when images are transcoded as it is really fast [^] help.go | changed "doesn't" to "don't" [^] ffmpeg-check.go | changed error checking function to the one already present in modules/error.go
23 lines
383 B
Go
23 lines
383 B
Go
package modules
|
|
|
|
import (
|
|
"fmt"
|
|
"os/exec"
|
|
)
|
|
|
|
//Transcode transcodes videos and images
|
|
func Transcode(input string, to string) string {
|
|
path := CheckForFFmpeg()
|
|
output := CreateName(to)
|
|
|
|
out, err := exec.Command(path, "-i", input, output).CombinedOutput()
|
|
|
|
Check(err)
|
|
|
|
fmt.Println("temporarily saving transcoded file to " + output)
|
|
|
|
fmt.Println(string(out))
|
|
|
|
return output
|
|
}
|