{"body":"func RemuxMKVToMP4(dir, source string) {\n\tlog.Println(\"RemuxMKVToMP4: dir:\", dir, \"source:\", source, \"baseFilename:\", baseFilename(source))\n\tif filepath.Ext(source) == \".mp4\" {\n\t\tlog.Println(\"File is already an MP4 file; exiting\")\n\t\treturn\n\t}\n\n\tvar cmd exec.Cmd\n\tcmd.Dir = dir\n\tcmd.Path = ffmpegPath\n\tcmd.Args = []string{\n\t\t\"-i \" + source,\n\t\t\"-i\", source,\n\t\t\"-codec\", \"copy\",\n\t\tbaseFilename(source) + \".mp4\",\n\t}\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\terr := cmd.Run()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tlog.Println(\"Remuxed \" + source + \" to \" + baseFilename(source) + \".mp4\")\n}\n","name":"","extension":"go","url":"https://www.irccloud.com/pastebin/ypNNoFoZ","modified":1504931231,"id":"ypNNoFoZ","size":592,"lines":24,"own_paste":false,"theme":"","date":1504931231}