aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: only download user-selected chunks  (Read 6303 times)

Dining Philosopher

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
only download user-selected chunks
« on: April 11, 2006, 11:33:33 PM »

I'd like to have a possibility to have only some selected chunks of a file downloaded and the download paused afterwards.

The similar "try to download first and last chunks first" option is useful for previewing, but
  • Sometimes I'm interested in a specific chunk in the middle of a file, for example if there's some corruption in a movie and i want to see if it's also there in other versions of the movie
  • I may want to download a previewable part of a file before I decide to download the rest, but with the current "first-and-last"-option other parts may be downloaded too, wasting bandwidth
  • To allow seeking within an avi file, the complete index at the of the file is necessary, which may not fit into the last chunk if the last chunk is too small. For that reason aMule already downloads the last _two_ chunks if the last chunk less than 1/3 of the normal chunk size, however this seems not to be enough in some cases (and seeking doesn't work until the two last chunks are downloaded)

The chunk selection would have to be written to the part.met files. For the user interface, a simple  text input in the file detail dialog would suffice, containing a comma-separated list of chunk numbers and ranges (like "1-3,6,11-13").

Additionally, there could "download preview chunks _only_" command in the search results context menu (as suggested for emule here), which just selects the first and last chunk.
Logged

lfroen

  • Guest
Re: only download user-selected chunks
« Reply #1 on: April 12, 2006, 09:27:42 AM »

The idea of downloading "preview" parts is nice, BUT:

* How do you know where this parts live ? You gonna manually calculate offsets, and divide them to PARTSIZE ?

* If we choose to implement it as "download first and last part _ONLY_", we should give some visual indication in status of file, that "1st and last chunks here, downloading suspended".


Quote
To allow seeking within an avi file, the complete index at the of the file is necessary

This is not correct - try "mplayer -idx "
Logged

Dining Philosopher

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: only download user-selected chunks
« Reply #2 on: April 12, 2006, 11:31:10 AM »

Quote
Originally posted by lfroen
* How do you know where this parts live ? You gonna manually calculate offsets, and divide them to PARTSIZE ?
I thought about just guessing it, assuming that the bitrate is roughly constant. For example if I was interested in a part at 20:00 of a 43 minutes video constisting of 38 chunks, I'd get chunk 18 and try an adjacent chunk if I missed the part.

Quote
* If we choose to implement it as "download first and last part _ONLY_", we should give some visual indication in status of file, that "1st and last chunks here, downloading suspended".
Would be nice, but I think it would also be ok if it just appeared as a normal paused file, with the chunk selection cleared.

Quote
Quote
To allow seeking within an avi file, the complete index at the of the file is necessary

This is not correct - try "mplayer -idx "
This just indexes up to the first incomplete chunk, so you can't seek to somewhere after a missing chunk.

The index is also required to allow mplayer to skip missing chunks of a video and continue with the available chunks, otherwise it just stops at the first gap.
Logged

lfroen

  • Guest
Re: only download user-selected chunks
« Reply #3 on: April 18, 2006, 12:08:10 PM »

Quote
I thought about just guessing it, assuming that the bitrate is roughly constant

Even assuming this is true: you don't mean that amule will extract bitrate from avi headers ? So you have to enter bitrate manually. How about number of streams ? Will you enter bitrate for each stream in file (otherwize offset calculation will be incorrect) ?!
Logged

Dining Philosopher

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 3
Re: only download user-selected chunks
« Reply #4 on: April 21, 2006, 08:53:47 PM »

I didn't mean that amule should calculate the chunk number of a playback time, I just wanted a way to let the user directly select which chunks to download first. Finding out which chunk contains the required part would be left to the user.

Parsing avi headers (and headers of other file formats) by amule would of course be nice, too. This would solve the problem of incompletely downloaded avi indices (since amule would know where exactly the index starts, it could even start downloading in the middle of a chunk to get the index first). The information found in the header (resolution, codecs, fps...) could also be displayed somewhere or put into a comment for other users.
Logged

lfroen

  • Guest
Re: only download user-selected chunks
« Reply #5 on: April 22, 2006, 09:25:06 AM »

Quote
I just wanted a way to let the user directly select which chunks to download first

Technically possible, not very user-friendly

Quote
Parsing avi headers ... would of course be nice
While being user-friendly solution, this would require dependencies like ffmpeg both on build AND run-time. Not sure that this is good idea.
Logged