DASH-DL Get the app

Player

Play videos while they download on Android

4 min readCanWe Technologies LLP

You started a 2 GB download and want to check, now, whether it is the right file — or you simply want to start watching while the rest arrives. "Play while downloading" sounds simple, but a half-downloaded file is an awkward thing to play. This guide explains why, and how DASH-DL handles web downloads, HLS and DASH streams, and torrents.

Why a growing file is hard to play

Three problems get in the way:

  1. Segmented downloads fill in out of order. A download split across eight connections has eight partly finished regions. A player reading from the start reaches a gap after the first region.
  2. The index may be at the end. Many MP4 files keep their index — the moov box that tells the player where every frame is — at the very end of the file. Until the end is downloaded, the player cannot even start.
  3. Seeking jumps into the unknown. Drag the seek bar to minute 40 and the player asks for bytes that nobody has fetched yet.

So a downloader has to do more than hand the partial file to a player. It has to know what the player needs next and fetch that first.

How DASH-DL does it

DASH-DL runs a small stream server on the phone itself, bound to the phone only (it is not reachable from your network). The player reads the download through it as if it were a web video:

  • Reads wait for data. If the player asks for bytes that are not on the phone yet, the request waits — and moves the download there. A connection opens at the first missing byte after your play position, so the part you are about to watch always comes next.
  • The end comes early for media. For video and audio files DASH-DL fetches the last 2 MiB first, so an index at the end is on the phone within seconds. The status line says so: "Fetching the file's index (it is at the end of this file)…"
  • Ready means playable. A file counts as ready when 5 seconds of playing time after your position are on the phone (or the rest of the file). Before that the overlay shows an estimate such as "Buffering — ready in about 4 s", worked out from the current speed.
  • Seeking re-orders the download. Drag the seek bar and the engine fetches the window after the new position next. The seek bar shows which ranges are already downloaded.

Pressing play also starts the download immediately, whatever its state: a queued, paused or scheduled download starts at once, even when every download slot is busy. Its network rule — Wi-Fi only, for example — still applies.

It works the same for streams and torrents

  • Web downloads: any file you download over HTTP, with as many connections as your plan allows.
  • HLS and DASH streams: the player gets a local playlist of the segments already saved, which grows as more arrive and is marked complete at the end. You can start watching a long stream recording after the first few segments (how to save a stream).
  • Torrents: DASH-DL's torrent engine downloads pieces in order and pulls the pieces under the play position first (torrents in order).

How to use it

  • In the New download sheet, switch on Play while downloading before you start. The player opens as soon as the file is ready.
  • For a download that is already running, tap Play on its row in Downloads.
  • For a torrent, tap Play on the video in the Files tab, or Stream now.
Tap Play on a download in progress; the player starts once a few seconds are on the phone.
Tap Play on a download in progress; the player starts once a few seconds are on the phone.

Will it stutter? A quick calculation

Playback stays smooth when your download speed stays above the video's bitrate. Divide the file size by its length:

FileLengthAverage bitrateSpeed needed
700 MB90 minabout 1 Mbit/s0.13 MB/s
2 GB2 habout 2.2 Mbit/s0.28 MB/s
8 GB2 habout 9 Mbit/s1.1 MB/s

Leave some headroom: bitrates vary from scene to scene, and the network does too. If the download is slower than the video, start playing a little later, or let it run ahead while you do something else — the buffered time is shown in the overlay.

Which player engine?

DASH-DL has two playback engines. Media3 is the default and uses your phone's hardware decoders. mpv handles formats the phone cannot decode on its own. Both play the growing file the same way. If a partly downloaded file refuses to start in one engine, try the other.

Limits worth knowing

  • Servers that can't resume (no range requests) are downloaded over one connection from the start, so you can play from the beginning, but seeking far ahead waits until the download gets there.
  • DRM-protected streams are never downloaded; where your subscription allows it they can only be played, directly from the provider.
  • Very large jumps on a slow connection take as long as fetching a few seconds of video at that point, plus the time to open a connection.

Play while downloading is part of the Free plan, for files, streams and torrents. See all player features, or get DASH-DL from Google Play below.

Download only what you have the right to download. DASH-DL never downloads DRM-protected streams, does not download from YouTube and does not host content. See the disclaimer and the terms of use.

Keep reading