sodaling / FastestBilibiliDownloader

B站视频极速批量下载器|The fastest Bilibili video downloader
682 stars 109 forks source link

aid:71590444新版本下载后, 未生成output.mp4 #10

Open justin201802 opened 4 years ago

justin201802 commented 4 years ago

嗯, 我又来了。 症状与之前一样, 没有生成output.mp4 你在非win系统下试试吧。 BTW: 给一些可能有用的信息 我执行了2次, 第一次的log如下

PS A:\FastestBilibiliDownloader-master\cmd> go run .\start-concurrent-engine.go
Please enter your id type(`aid` or `upid`)
aid
Please enter your id
71590444
2020/04/02 22:30:04 Start working.
2020/04/02 22:30:05 71590444:4_1.flv is downloading.
2020/04/02 22:30:05 71590444:1_1.flv is downloading.
2020/04/02 22:30:05 71590444:2_1.flv is downloading.
2020/04/02 22:30:05 71590444:5_1.flv is downloading.
2020/04/02 22:31:54 71590444:3_1.flv has finished.
2020/04/02 22:32:01 71590444:1_1.flv has finished.
2020/04/02 22:33:57 71590444:2_1.flv has finished.
2020/04/02 22:36:30 71590444:6_1.flv has finished.
2020/04/02 22:37:04 71590444:4_1.flv has finished.
2020/04/02 22:42:49 71590444:5_1.flv has finished.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 71590444  download completed.Start merging videos now.
2020/04/02 22:42:49 Video  71590444  merge is complete.
2020/04/02 22:42:49 All work has done

运行结果是:没有output.mp4, 下载的flv文件也都被删除了。

第二次,把删除flv的代码屏蔽掉, 运行log如下

PS A:\FastestBilibiliDownloader-master\cmd> go run .\start-concurrent-engine.go
Please enter your id type(`aid` or `upid`)
aid
Please enter your id
71590444
2020/04/02 22:46:09 Start working.
2020/04/02 22:46:10 71590444:5_1.flv is downloading.
2020/04/02 22:46:10 71590444:2_1.flv is downloading.
2020/04/02 22:46:10 71590444:4_1.flv is downloading.
2020/04/02 22:46:10 71590444:3_1.flv is downloading.
2020/04/02 22:46:10 71590444:1_1.flv is downloading.
2020/04/02 22:47:59 71590444:3_1.flv has finished.
2020/04/02 22:48:07 71590444:1_1.flv has finished.
2020/04/02 22:50:20 71590444:2_1.flv has finished.
2020/04/02 22:53:14 71590444:4_1.flv has finished.
2020/04/02 22:57:44 71590444:5_1.flv has finished.
2020/04/02 22:57:44 All work has done

flv文件保留着, 但还是没有output.mp4 而且那个concact.txt文件也没有, 应该是没有执行到相应的代码

sodaling commented 4 years ago

成的哈,我这几天看看,你看还得折腾你

sunshinewithmoonlight commented 4 years ago

下载合并任务完成后,下载完的一堆flv文件瞬间全没了。下载的文件夹里什么都没留下,震撼我妈 环境:win10(2004)

sodaling commented 4 years ago

这边之前耽搁了,我五一会花时间折腾清楚这些问题的呢。 也非常感谢各位的试用,这给了我很大的激励与鞭笞。

justin201802 commented 4 years ago

嗯,最近也没仔细研究你的代码, 但根据之前的研究结果, 我感觉应该是GO里面多线程的问题, 我不懂GOLang所以没法提供更多的信息了。

Sevzm commented 4 years ago

最初和你同一个问题,现在解决了,建议你找一下你运行的目录里,有没有视频。 最后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}

Sevzm commented 4 years ago

下载合并任务完成后,下载完的一堆flv文件瞬间全没了。下载的文件夹里什么都没留下,震撼我妈 环境:win10(2004)

建议下个Everything,依靠av号搜一下,视频应该是在的,就是不知道你怎么使用的了

sunshinewithmoonlight commented 4 years ago

啊,我把persist/videomerge.go里的85行:

removeTempFile(aidDirPath, _videoOutputName)

注释掉了。这样就不会担心文件被删了。