fix(video): add support for CMAF video format alongside DASH#506
fix(video): add support for CMAF video format alongside DASH#506mtsz-pl wants to merge 1 commit into
Conversation
Reddit has transitioned from DASH to CMAF video format. This change adds
support for both formats to maintain compatibility.
Changes:
- Update REGEX_URL_VIDEOS to match both DASH and CMAF formats
- Add format capture group to preserve DASH/CMAF in URL path
- Add separate proxy endpoints for /vid/:id/dash/:size and /vid/:id/cmaf/:size
- Update format_url to handle 3-segment video URLs (id/format/size)
- Update tests to reflect new URL format with format segment
Video URLs now follow pattern: /vid/{id}/{format}/{size}.mp4
Example: /vid/abc123/cmaf/720.mp4
|
Tested it locally, fixes video downloads (was previously getting HTML text in the files I'd try to download), but now the issue is that there's that whole limitation with reddit storing audio and video on different urls/streams, so at the moment downloaded videos have no audio with these changes, could be tricky to get it functioning and put lots of load/work on the server. Again, still better than how it was before. simple enough modifications to the codebase, I think this is good to merge but thats up to the maintainers |
|
Thinking it over, there must be a way to make the browser construct the file via javascript, entirely client-side, using all the assembled audio chunks and video, and once its all nicely stored in memory, initiate a download of it as a blob. Looking into making a PR that does this EDIT: Someone tried doing exactly this in #545 but it didn't work on my instance |
Reddit has transitioned from DASH to CMAF video format. This change adds support for both formats to maintain compatibility.
Changes:
Video URLs now follow pattern: /vid/{id}/{format}/{size}.mp4
Example: /vid/abc123/cmaf/720.mp4
Fixes #503
Fixes #504