Closed macdavis closed 6 years ago
hi @macdavis 更新一下 0.3.1,亲测有效,如果你还有问题的话 reopen 这个 issue
谢谢您的更新,确实可以调用ffmpeg了。可是速度慢的问题依旧没有解决。最严重的是ffmpeg到了00:06:07.97出出现大量类似
Non-monotonous DTS in output stream 0:0; previous: 33112564, current: 356220; changing to 33112565. This may result in incorrect timestamps in the output file.
的警告,最后timestamp似乎也有问题。不知您是否可以测试下载到00:06:07.97处及以后。
另外,不知是否可以做到自动从m3u8里获取片段下载地址并使用多线程下载,最后交由ffmpeg合并。这样效率可以提高很多。
爱奇艺的下载地址要特殊一些,它是全部交给 ffmpeg 来下载合并的,至于下载速度和警告的问题可以看看 ffmpeg 有没有什么参数可以增强。只要最后下载完成后的视频是正常的就行了。我试过一些小视频是完全没有问题的,完整的电影我倒是没试过
Non-monotonous DTS in output stream 0:0; previous: 33112564, current: 356220; changing to 33112565. This may result in incorrect timestamps in the output file.
这个可能是 ffmpeg 的问题或者我参数用错了,我先下载完来试一下视频文件有没有问题
@macdavis 更新一下 0.3.2,解决了出现大量警告的问题(爱奇艺的 m3u8 url 拿错了)
确实可以下载,感谢更新!
不过音频由之前的eac3变成了aac,比如这部:http://www.iqiyi.com/v_19rra8tjv0.html#vfrm=2-4-0-1,原先可以抓到5.1声道的eac3,现在只有2声道aac了。
你是说最开始的要报错的那个 url 是 eac3 的?那个 url 的文件确实哪里不对,它只有开头大概 6 分钟是正常的,以后都不对
是的,之前版本解析出720p的音轨是eac3,看ffmpeg 这里:
Stream #0:1: Audio: eac3 ([135][0][0][0] / 0x0087), 48000 Hz, stereo, fltp, 96 kb/s
.
没记错的话,之前版本解析http://www.iqiyi.com/v_19rra8tjv0.html#vfrm=2-4-0-1得到的是256kbps的5.1声道eac3。
lulu虽然写了
Downloading streaming content with FFmpeg, press q to stop recording...
,但实际没有在下载,直接结束了进程。解析出来的m3u8将近有1000片,而且貌似m3u8有时间等各种限制,比如同一个解析出来的m3u8不能同时用mpv播放/ffmpeg下载/livestreamer下载,否则就会失效。
使用livestreamer下载不多时就会遇到
Failed to read data from stream: Read timeout
使用ffmpeg下载在00:06:07.97就会停滞不前。