npm庫v9介紹:對種子或磁力鏈截屏

剛剛製作的v9程序,解決了一個經常性遇到的問題:有個種子(或磁力鏈)擺在你面前,要先下載後才能知道里面到底影片是什麼,是x老師的新作,還是葫蘆娃。


在不下載整個文件的前提下,v9可以對種子或磁力鏈裏面的影片進行9張截圖。這樣即可提前知道種子裏面是什麼了。


v9原理是通過WebTorrent對種子解析程序一個支持range的http服務,然後再通過ffmpeg對這個http視頻流進行位移截屏。


環境需求:

1. 電腦上面要有ffmpeg命令,可以百度或者看看 https://ffmpeg.org/download.html

2. 安裝nodejs


運行命令:

npm install v9 -g

安裝好v9庫後,就可以使用了,假設D:下面有個test.torrent的種子,使用命令:

v9 test.torrent


也支持直接用磁力鏈,不需要下載種子,效果一樣:


v9 magnet:?xt=urn:btih:c180f298d2516fcb7ac89a462798e4267ebb5c33&dn=%5B%E5%9B%9E%E9%A1%BE%5B2017.07.30%5D%5B%E5%BB%BA%E5%86%9B90%E5%91%A8%E5%B9%B4%E6%9C%B1%E6%97%A5%E5%92%8C%E6%B2%99%E5%9C%BA%E5%A4%A7%E9%98%85%E5%85%B5%5D.mp4


輸出:

[INFO] 08:59:06 Torrent checked OK...
[INFO] 08:59:06 Found media:Sample 1.mkv
[INFO] 08:59:06 Found media:Sample 2.mkv
[INFO] 08:59:06 Found media:Transformers The Last Knight 2017 TC.mkv
[INFO] 08:59:08 Got 1 screenshot, total is 27, continue...
[INFO] 08:59:09 Got 2 screenshot, total is 27, continue...
[INFO] 08:59:10 Got 3 screenshot, total is 27, continue...
[INFO] 08:59:10 Got 4 screenshot, total is 27, continue...
[INFO] 08:59:10 Got 5 screenshot, total is 27, continue...
[INFO] 08:59:11 Got 6 screenshot, total is 27, continue...
[INFO] 08:59:11 Got 7 screenshot, total is 27, continue...
[INFO] 08:59:11 Got 8 screenshot, total is 27, continue...
[INFO] 08:59:11 Got 9 screenshot, total is 27, continue...
[INFO] 08:59:11 Got 10 screenshot, total is 27, continue...
[INFO] 08:59:12 Got 11 screenshot, total is 27, continue...
[INFO] 08:59:12 Got 12 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 13 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 14 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 15 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 16 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 17 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 18 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 19 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 20 screenshot, total is 27, continue...
[INFO] 08:59:13 Got 21 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 22 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 23 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 24 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 25 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 26 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 27 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 28 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 29 screenshot, total is 27, continue...
[INFO] 08:59:14 Got 30 screenshot, total is 27, continue...
[INFO] 08:59:14 Completed the file Transformers The Last Knight 2017 TC.mkv [INFO] 08:59:14 Got 31 screenshot, total is 27, continue...
[INFO] 08:59:14 Completed the file Sample 1.mkv
[INFO] 08:59:14 Got 32 screenshot, total is 27, continue...
[INFO] 08:59:14 Completed the file Sample 2.mkv

[INFO] 08:59:14 Finished capture 27 screenshot!
[INFO] 08:59:14 Please check the output directory 'D:\' to see the screenshots. Bye!

文件夾內就有:







發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章