Commit Graph

68 Commits

Author SHA1 Message Date
wukko
7298082bd5
api: refactor two static arrays to set 2025-06-28 16:31:39 +06:00
wukko
164ea8aeb9
api: return covers from soundcloud and youtube
& refactor createProxyTunnels() in stream/manage a little
2025-06-26 17:36:26 +06:00
wukko
3dae5b2eb0
api/ffmpeg: move stream type + url count check to remux()
& fix it cuz i broke it in last commit
2025-06-25 19:57:23 +06:00
wukko
52695cbd0f
api/service-config: replace static arrays with sets 2025-06-25 19:33:16 +06:00
wukko
fcdf5da73e
api/ffmpeg: refactor even more 2025-06-25 19:32:36 +06:00
wukko
d3793c7a54
api/ffmpeg: map video and audio in remux() with one main input
cuz otherwise if a video has subtitles, then only subtitles get mapped to the output file
2025-06-24 20:46:14 +06:00
wukko
4f4478a21d
api/ffmpeg: fix audio codec args in remux() 2025-06-24 20:24:53 +06:00
wukko
14657e51d3
api/stream: split types.js into proxy.js and ffmpeg.js 2025-06-24 20:09:41 +06:00
wukko
aa376d76f6
api/stream/types: huge refactor & simplification of code
- created render() which handles ffmpeg & piping stuff
- merged remux() and merge() into one function
- simplified and cleaned up arguments
- removed headers since they're handled by internal streams now
- removed outdated arguments
2025-06-24 19:55:50 +06:00
wukko
44f4ea32c6
api/stream/internal: stream vk videos in chunks 2025-06-24 17:04:43 +06:00
wukko
a5838f3c05
api/stream/types: add subtitles & metadata to remux 2025-06-20 18:16:32 +06:00
wukko
c4e910dd29
api/stream/types: refactor, support mkv, don't duplicate args 2025-06-20 14:39:17 +06:00
wukko
b91c0c0013
api/stream/types: specify subtitle format for containers other than mp4 2025-06-19 17:19:39 +06:00
wukko
259a0758f1
api: initial subtitles functionality with youtube support
this took way more effort than i expected it to do, mostly because of youtube locking everything down to shit

local processing doesn't function with subtitles yet, wasm needs to be updated
2025-06-18 20:24:13 +06:00
nexpid
170cf293bf
api/soundcloud: add more metadata fields (#1313) 2025-06-08 18:07:38 +06:00
wukko
5e3d6107f9
api/stream/manage: fix usage of getInternalTunnel()
fixed a typo
2025-05-29 20:20:56 +06:00
wukko
187bf9d745
merge: api 10.7.7 from main
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2025-03-07 00:07:52 +06:00
jj
068ae2f2e7
api/internal: also transplant youtube HEAD requests 2025-03-06 17:16:46 +00:00
wukko
0ce777cbfc
api/internal-hls: transform segment uri when probing the HLS tunnel
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2025-02-06 14:29:42 +06:00
wukko
fd1a7530ed
merge: api updates from main
Some checks failed
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Waiting to run
Run tests / check lockfile correctness (push) Waiting to run
Run tests / web sanity check (push) Waiting to run
Run tests / api sanity check (push) Waiting to run
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2025-01-30 16:47:21 +06:00
jj
c48c64240b
api/internal: allow redirects when reading chunks
Some checks failed
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2025-01-29 21:51:35 +00:00
wukko
c7c9cf2f0f
api: add local processing response type & param
`local-processing` type returns needed info for on-device processing and creates basic proxy tunnels
2025-01-29 15:00:50 +06:00
jj
c4c47bdc27
merge: 10.6 updates
Some checks failed
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2025-01-21 13:36:37 +00:00
jj
600c769141
api/stream: implement itunnel transplants 2025-01-20 15:55:26 +00:00
jj
c07940bfa4
api/itunnel: pass itunnel object by reference 2025-01-20 15:46:03 +00:00
jj
035825bc05
api: cache original request parameters in stream 2025-01-20 14:38:55 +00:00
jj
52b7f9523f
api/stream: remove content-length estimation from proxy()
Some checks failed
Run tests / api sanity check (push) Has been cancelled
CodeQL / Analyze (${{ matrix.language }}) (none, javascript-typescript) (push) Has been cancelled
Run service tests / test service functionality (push) Has been cancelled
Run tests / check lockfile correctness (push) Has been cancelled
Run tests / web sanity check (push) Has been cancelled
Run service tests / test service: ${{ matrix.service }} (push) Has been cancelled
2024-12-20 16:35:40 +00:00
jj
78d0670f50
api/stream: stfu deepsource 2024-12-17 12:20:17 +00:00
jj
06c348126e
api/stream: remove random undici import
wtf
2024-12-17 12:16:04 +00:00
jj
f5b47a2b7e
api/tunnel: adjust estimate multiplier to 1.1 2024-12-16 17:42:39 +00:00
jj
05e0f031ed
api/stream: add Estimated-Content-Length header to tunnels
present where Content-Length cannot be accurately calculated,
pure proxy streams do not have this header and instead have
the accurate Content-Length one.
2024-12-16 17:07:30 +00:00
jj
11388cb418
api/stream: await all call types 2024-12-16 16:21:38 +00:00
jj
bf4675a5e3
api/stream: move bsky override into isHlsResponse 2024-12-16 11:29:13 +00:00
jj
e7c2872e40
api/stream: rename getInternalStream to getInternalTunnel 2024-12-16 10:16:48 +00:00
jj
459b2c8283
api/internal-hls: don't remake chunk istreams if already wrapped 2024-12-15 17:59:47 +00:00
wukko
3dafdd825a
api/types/proxy: use default dispatcher instead of a global one
this function never gets anything but internal streams, so global proxy (`API_EXTERNAL_PROXY`) is only causing issues here. this commit fixes an issue of cobalt attempting to proxy internal streams, and failing spectacularly.
2024-12-13 16:01:16 +06:00
jj
6f0a8196ff
api/istream: remove icy-metadata header if sent by client 2024-12-04 18:25:25 +00:00
jj
6c39edbc10
api/stream: use dispatcher if passed to istream 2024-12-04 18:17:13 +00:00
wukko
f696335278
api/vk: use proper api, add support for more links, refactor
also added support for video access keys
2024-11-28 16:01:26 +06:00
wukko
1cbffc2d75
api/stream/types: convert metadata in one place
also sanitize values & throw an error if tag isn't supported
2024-11-24 18:13:22 +06:00
wukko
407c27ed86
api/utils: rename metadata converter function 2024-11-24 14:55:46 +06:00
wukko
606f0fd29a
api/stream/internal: workaround for wrong bsky content-type, refactor 2024-11-16 22:15:13 +06:00
jj
90d57ab6ea
api/config: store tunnelPort in env 2024-11-01 17:02:29 +00:00
jj
66cb8d360d
api: move hmac secrets to single file 2024-11-01 12:16:53 +00:00
jj
40d6a02b61
api: cluster support
still missing synchronization for some structures
2024-10-31 22:59:06 +00:00
jj
2d6d406f48
api/crypto: use buffers for salt directly instead of hex strings 2024-10-31 22:42:46 +00:00
jj
93e6344fc7
api/stream/manage: make itunnel port configurable
this allows us to bind internal streams to
a specific worker in the future
2024-10-31 22:35:26 +00:00
jj
132255b004
api/stream/manage: use cobalt Store for stream cache 2024-10-31 22:33:32 +00:00
wukko
776c4f4dba
api/stream/manage: don't use clones in node cache 2024-10-30 23:56:14 +06:00
wukko
f610058b82
api/stream/types/merge: encode audio to aac or opus if hls
audio is encoded to opus only if it's a youtube hls stream with webm container
2024-10-30 17:18:18 +06:00