nicodemus on Nostr: Ah, ok. The m3u8, if you have it, *may* be all that you need. It’s a text file ...
Ah, ok.
The m3u8, if you have it, *may* be all that you need. It’s a text file playlist - based off of the original m3u playlist format. This is called a “manifest”.
It contains a list of files for the player to play, in order of playout. The files could be audio, video or both (muxed).
Sometimes, the manifest will actually be a playlist that links to other playlists instead of media files, often called a “master manifest”. This will be obvious, because it will reference different video resolutions and codecs. You likely want the highest quality, if so. These files exist to allow a player to jump between qualities (called variants/layers/renditions) if bandwidth changes.
A “container” is a file that holds the encoded content and metadata about that encoded content (codec, duration, audio/video timing, captions, etc). It’s the “TS” or “MP4” part of a video. Think of it as a sort of zip file (tho the compression happens on the encoding within the container).
So to download, grab the m3u8 manifest. If it’s a master, grab the highest quality m3u8 referenced within it. Then grab all of the ts files within the appropriate manifest. Now you just have to combine them. That, unfortunately, may be a bit complicated to go over in this post. FFMPEG can do it, I think. But I am not sure of all of the flags needed.
Now you said this was a live stream? Or is it a recording of a live stream? This matters because a live stream often only has a snapshot of the latest TS files. Ie, it gets rid of old ones and adds the new ones. If it’s a recording, it will contain it all.
Clear as mud?
Published at
2024-10-15 17:01:52Event JSON
{
"id": "abe2099f343b56acb4bd76b1b2f6f6e4724c362c83ade9ff35c415de631fa097",
"pubkey": "00000206705ab9e737fbc9bad2a25ddc17f47b15c594eae3ad65654336993b19",
"created_at": 1729011712,
"kind": 1,
"tags": [
[
"e",
"b67b96e6892cbb86d13b05e9efdcea1c2b83392246ab888f703d4e78c4a108d1",
"",
"root"
],
[
"e",
"adcd6ad36b4aaa1666345482923004f68752b928ee4e475202cabcf76bc7f5d6",
"",
"reply"
],
[
"p",
"a723805cda67251191c8786f4da58f797e6977582301354ba8e91bcb0342dc9c"
],
[
"p",
"a80455732d5bfa792f279011a8c871853182971994752b9cf1169611ff91a578"
],
[
"p",
"9bc2d34ddda83d942a1fdd36a7487f9aaec740db24ea79732d90e383d19d2948"
]
],
"content": "Ah, ok. \n\nThe m3u8, if you have it, *may* be all that you need. It’s a text file playlist - based off of the original m3u playlist format. This is called a “manifest”. \n\nIt contains a list of files for the player to play, in order of playout. The files could be audio, video or both (muxed). \n\nSometimes, the manifest will actually be a playlist that links to other playlists instead of media files, often called a “master manifest”. This will be obvious, because it will reference different video resolutions and codecs. You likely want the highest quality, if so. These files exist to allow a player to jump between qualities (called variants/layers/renditions) if bandwidth changes. \n\nA “container” is a file that holds the encoded content and metadata about that encoded content (codec, duration, audio/video timing, captions, etc). It’s the “TS” or “MP4” part of a video. Think of it as a sort of zip file (tho the compression happens on the encoding within the container). \n\nSo to download, grab the m3u8 manifest. If it’s a master, grab the highest quality m3u8 referenced within it. Then grab all of the ts files within the appropriate manifest. Now you just have to combine them. That, unfortunately, may be a bit complicated to go over in this post. FFMPEG can do it, I think. But I am not sure of all of the flags needed. \n\nNow you said this was a live stream? Or is it a recording of a live stream? This matters because a live stream often only has a snapshot of the latest TS files. Ie, it gets rid of old ones and adds the new ones. If it’s a recording, it will contain it all. \n\nClear as mud?",
"sig": "8571f4e6d052fe0cdf950dd0d28eb85694de9a0f0ab78971846c5af1c27b87c9c23cb4a4e166cd2384cc153e2410f454c54f27e0098440773d766903b5124f87"
}