Revision history and IPFS entry, back to latest
Phanix
IPFS What is this

Content Hash

Concatenate streaming m3u8 ts files into mp4 with VLC player

Phanix
·
·

呃,這算是幹壞事,侵犯到智慧財產權不甘這邊的事情喔

網路上 streaming 的通常都是讀取一個 .m3u8 檔案,然後去依序下載裏頭的 .ts 影音片段做播放,類似下面這樣。

#EXTM3U
#EXT-X-TARGETDURATION:3
#EXT-X-ALLOW-CACHE:YES
#EXT-X-PLAYLIST-TYPE:VOD
#EXT-X-VERSION:3
#EXT-X-MEDIA-SEQUENCE:1
#EXTINF:3.000,
https://SOME_URL/seg-1-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-2-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-3-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-4-v1-a1.ts

// 中間省略

#EXTINF:3.000,
https://SOME_URL/seg-1375-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-1376-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-1377-v1-a1.ts
#EXTINF:3.000,
https://SOME_URL/seg-1378-v1-a1.ts
#EXTINF:2.468,
https://SOME_URL/seg-1379-v1-a1.ts
#EXT-X-ENDLIST

如果想要把整個影片下載起來,可以利用 VLC player

Original link: Phanix's Blog

CC BY-NC-ND 2.0