Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: In App Downloads / Download Manager #348

Open
3 tasks done
MarmadileManteater opened this issue Apr 22, 2024 · 0 comments
Open
3 tasks done

[Feature Request]: In App Downloads / Download Manager #348

MarmadileManteater opened this issue Apr 22, 2024 · 0 comments
Assignees
Labels
E: new feature enhancement New feature or request

Comments

@MarmadileManteater
Copy link
Owner

Guidelines

  • I have searched the issue tracker for open and closed issues that are similar to the feature request I want to file, without success.
  • I have searched the documentation for information that matches the description of the feature request I want to file, without success.
  • This issue contains only one feature request.

Problem Description

Changing networks and being on the road can cause video playback to stutter or be inconsistent, but this isn't really the fault of FreeTube. Its just the nature of mobile networks. Videos can currently be downloaded through the web browser, but there is no way to download and mux dash formats. There is also no way to playback a playlist of downloaded videos (say for a roadtrip playlist or podcast).

Proposed Solution

  • Bundle ffmpegkit for muxing streams
  • Build a download manager view
  • Allow a downloads directory to be set within Download Settings
  • If a downloads directory is set, override the current download button behaviour
  • Display download and ffmpeg progress to user (perhaps with a widget on the watch page or with toast messages)
  • Create a database of downloaded video metadata
  • Allow for picking of a new playback format called "Downloaded Formats" which will be the default format on any video already downloaded

Alternatives Considered

I've considered attempting to build a download manager which works with ffmpeg wasm, but that is significantly slower on platforms where alternatives are available, and additionally, I ran into problems storing large videos in memory for ffmpeg wasm. Ffmpeg wasm includes functions for downloading files which shouldn't cause the same memory issues I'm running into, but because of youtube's requirements for requesting their streams (range parameter instead of header, with 10mb chunks), ffmpeg wasm's download functions are slow and ineffective.

Issue Labels

new feature

Additional Information

I already started working on this idea, but I haven't touched the branch since before 0.20.0.

This is my WIP branch: feat/download-manager

@MarmadileManteater MarmadileManteater added the enhancement New feature or request label Apr 22, 2024
@MarmadileManteater MarmadileManteater self-assigned this Apr 22, 2024
MarmadileManteater added a commit that referenced this issue May 9, 2024
MarmadileManteater added a commit that referenced this issue Jul 14, 2024
They cannot be processed or viewed yet, but they can be queued.

(To be clear, the code to download and mux streams does exist, but nothing will call it using items from the queue yet)

#348
MarmadileManteater added a commit that referenced this issue Jul 16, 2024
- Download manager now automaticallly begins processing when it receives work, but it won't work through a long queue yet, it always stops after 1

#348
MarmadileManteater added a commit that referenced this issue Jul 16, 2024
Videos that are downloaded will always show their downloaded version and not fetch either API.

#348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E: new feature enhancement New feature or request
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant