|
|||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||
|
Announcements
Want a new Job?
Chapters
Services
Feature Zones
|
Why Another FTP Downloader?There are millions of FTP programs. Why write another one? I'm sharing a Dreambox with a friend. The dreambox is a digital DVB satellite receiver that runs Linux with a built in harddisk. Normally if you want to record a film which starts at 20:00 and ends at 22:00, you will program a timer from 21:55 till 22:30 to be sure that you don't miss anything if the transmission starts delayed. But a DVB stream creates between 20 and 50 Megabytes per minute (depending on the TV channel's bitrate). So it would be a great advantage if you can download only the interesting part. To download only the film and exclude the news and advertising I needed a preview function. My friend complained that I was occupying all his DSL upstream to load the films. So additionally a bandwidth control and a download scheduler were required. Features
PreviewsThe Dreambox stores the films in the DVB satellite / cable stream format with the file extension *.TS (Transport Stream) as a split file:
You can easily adapt the generation of split-filenames to your needs: (in the file Defaults.cs) public static string BuildSplitFileName(string s_File, int s32_Index)
{
if (s32_Index == 0)
return s_File;
return s_File + "." + s32_Index.ToString("D3");
}
To use the Preview function, you simply enter a value into the "Preview" textbox. If you enter "100" here, a preview is downloaded every 100 MB. Later, you find in your download directory:
If you need more previews to decide where the film starts or ends, simply modify the Start, End and Preview values and hit the 'Start' button again. Each preview chunk has a length of 500 KB. This assures that it contains at least one I-Frame which is required to decode the data.
Partial DownloadAfter the above procedure, you know that you have to download for example, from 125 MB until 2350 MB and enter this as Start and End values.
Resuming DownloadsIf you abort a running download and start it again later by clicking "Start" it will automatically resume correctly. If you have set the checkbox "Autostart FtpDownloader with Windows," any interrupted download will resume automatically even after shutting down your PC meanwhile. Problems may only occur if you manually manipulate existing downloads without understanding how resume works: FtpDownloader calculates the position where to resume a broken download on the server from the value in the field "Start (MB)" plus the filesize that is already downloaded. IMPORTANT: It is also impossible to download two different files from the server into the same local file. You cannot merge different files together! If you have three different recordings and want to put them together as one movie, download them as three separate files and then use Video Cutting software like Cuttermaran to put them together. To avoid these problems never specify an already existing file in the field "Local Filename" when adding new downloads to the list. Source CodeYou will find a very clean and well structured C# source code with plenty of comments, written by a very experienced programmer. The code is reusable, so you can easily reuse it in your own projects:
P.S.: History
|
||||||||||||||||||||||||||||||||||||||||||||||