Open justin201802 opened 4 years ago
成的哈,我这几天看看,你看还得折腾你
下载合并任务完成后,下载完的一堆flv文件瞬间全没了。下载的文件夹里什么都没留下,震撼我妈 环境:win10(2004)
这边之前耽搁了,我五一会花时间折腾清楚这些问题的呢。 也非常感谢各位的试用,这给了我很大的激励与鞭笞。
嗯,最近也没仔细研究你的代码, 但根据之前的研究结果, 我感觉应该是GO里面多线程的问题, 我不懂GOLang所以没法提供更多的信息了。
最初和你同一个问题,现在解决了,建议你找一下你运行的目录里,有没有视频。 最后ffmpeg merge后,是会copy到当前目录,而不是download里
func GetMp4Dir() string {
curDir, err := os.Getwd()
if err != nil {
panic(err)
}
fullDirPath := filepath.Join(curDir, "output")
err = os.MkdirAll(fullDirPath, 0777)
if err != nil {
panic(err)
}
return fullDirPath
}
command := []string{"ffmpeg", "-f", "concat", "-safe", "0", "-i", contactTxtPath, "-c", "copy", videoOutputPath}
下载合并任务完成后,下载完的一堆flv文件瞬间全没了。下载的文件夹里什么都没留下,震撼我妈 环境:win10(2004)
建议下个Everything,依靠av号搜一下,视频应该是在的,就是不知道你怎么使用的了
啊,我把persist/videomerge.go里的85行:
removeTempFile(aidDirPath, _videoOutputName)
注释掉了。这样就不会担心文件被删了。
嗯, 我又来了。 症状与之前一样, 没有生成output.mp4 你在非win系统下试试吧。 BTW: 给一些可能有用的信息 我执行了2次, 第一次的log如下
运行结果是:没有output.mp4, 下载的flv文件也都被删除了。
第二次,把删除flv的代码屏蔽掉, 运行log如下
flv文件保留着, 但还是没有output.mp4 而且那个concact.txt文件也没有, 应该是没有执行到相应的代码