Commit graph

365 commits

Author SHA1 Message Date
Sergey M․ ba515388b8
Introduce --http-chunk-size 2018-02-03 23:08:58 +07:00
Sergey M․ 65220c3bd6
Add support for IronPython 2018-01-28 05:48:18 +07:00
Sergey M․ c989bdbef8
[downloader/ism] Fix Python 3.2 support 2018-01-28 05:20:21 +07:00
Sergey M․ cf2820710d
Switch codebase to use compat_b64decode 2018-01-23 22:23:12 +07:00
Sergey M․ 538d4f8681
[downloader/hls] Use HTTP headers for key request 2017-12-31 01:15:35 +07:00
Sergey M․ 99081da90c
[downloader/fragment] Encode filename of fragment being removed (closes #15020) 2017-12-18 03:31:53 +07:00
Sergey M․ bec49996c6
[downloader/http] Return actual download result (closes #14971) 2017-12-13 23:49:05 +07:00
Sergey M․ 593f2f7989
[downloader/fragment] Commit part file after each fragment
In order to obtain correct resume_len on next iteration
2017-12-02 21:21:11 +07:00
Sergey M․ 48107c198b
[f4m] Prefer baseURL for relative URLs (closes #14660) 2017-11-04 22:10:55 +07:00
Sergey M․ 6f3b4a98c9
[downloader/fragment] Report warning instead of error on inconsistent download state 2017-10-17 22:53:34 +07:00
Sergey M․ a9ee4f6e49
[downloader/hls] Fix total fragments count when ad fragments exist 2017-10-15 11:03:54 +07:00
Sergey M․ 74c42d9ec3
[downloader/hls] Ignore anvato ad fragments (closes #14496) 2017-10-15 06:13:48 +07:00
Sergey M․ 5efaf43c93
[downloader/fragment] Output ad fragment count 2017-10-15 06:13:07 +07:00
Sergey M․ e7c3e33456
[downloader/fragment] Restart inconsistent incomplete fragment downloads (#13731) 2017-09-14 23:19:53 +07:00
Sergey M․ a3c3a1e128
[http] Rework HTTP downloader
* Simplify code and split into separate routines to facilitate maintaining
* Make retry mechanism work on errors during actual download not only during connection establishment phase
* Retry on ECONNRESET and ETIMEDOUT during reading data from network
* Retry on content too short and various timeout errors
* Show error description on retry
* Closes #506, closes #809, closes #2849, closes #4240, closes #6023, closes #8625, closes #9483
2017-08-27 02:22:30 +07:00
Sergey M․ 1141e9104b
Use relative paths for DASH fragments (closes #12990)
10x reduced JSON size
refs #13810
2017-08-05 07:40:29 +07:00
Sergey M․ c5a49ff084
[downloader/hls] Use redirect URL as manifest base (#13755) 2017-07-29 15:02:41 +07:00
Robin Neatherway 2583c0b54e Fix bugs caused by typos 2017-07-14 23:08:32 +07:00
Sergey M․ 1433734c35
[downloader/common] Use utils.shell_quote for debug command line 2017-06-17 23:50:21 +07:00
Sergey M․ a609e61a90
[downloader/external] Pass -loglevel to ffmpeg downloader (closes #13183) 2017-05-22 23:40:07 +07:00
Sergey M․ 50534b7158
[downloader/fragment] PEP 8 2017-04-30 22:04:01 +07:00
Sergey M․ e7db6759e4
[downloader/external] Properly handle live stream downloading cancellation (closes #8932) 2017-04-29 04:33:35 +07:00
Sergey M․ c0fa4245ce
[downloader/fragment] Remove assert for resume_len when no fragments downloaded
This may be incorrect due some header (e.g. flv header in f4m downloader)
2017-04-28 03:26:19 +07:00
Sergey M․ 85f6de25e4
[downloader/fragment] Clarify current_fragment's index and mark as experimental 2017-04-25 23:33:35 +07:00
Sergey M․ 290f64dbaa
[downloader/fragment] Improve .ytdl format and start documenting 2017-04-24 23:50:20 +07:00
Sergey M․ adb4b03cd5
[downloader/fragment] Don't process ytdl file when it's not needed yet 2017-04-24 23:05:56 +07:00
Sergey M․ 0eee52f34b
Introduce --keep-fragments 2017-04-24 03:09:08 +07:00
Sergey M․ d3f0687cf7
[downloader/fragment] Use temp file for current fragment 2017-04-24 02:54:17 +07:00
Remita Amine 4abdba643c [downloader/fragment] remove unused code 2017-04-22 18:19:47 +01:00
Remita Amine 3e0304fe6e [downloader/fragment] use the documented names for fragment progress_hooks fields 2017-04-22 16:42:24 +01:00
Remita Amine ea0c2f219c [downloader/fragment] use a general file to store fragment download context 2017-04-19 18:53:15 +01:00
Remita Amine 75a2485407 [fragment,hls,f4m,dash,ism] improve fragment downloading
- resume immediately
- no need to concatenate segments and decrypt them on every resume
- no need to save temp files for segments

and for hls downloader:
- no need to download keys for segments that already downloaded
2017-04-19 11:46:07 +01:00
Remita Amine f59746372a [downloader/hls] add basic support for EXT-X-BYTERANGE tag(#10955) 2017-04-13 12:28:22 +01:00
Remita Amine 40fcba5edb improve coding style 2017-04-12 20:38:43 +01:00
Remita Amine 2bfaf89b6c [downloader/hls] move check for m3u8 live streams to get_suitable_downloader 2017-03-25 23:07:05 +01:00
Remita Amine fb4fc44928 [downloader/hls] immediately delegate downloading to ffmpeg in case live stream 2017-03-25 19:38:23 +01:00
Sergey M․ a50862b735
[downloader/external] Add missing import and PEP8 2017-03-05 10:24:29 +07:00
John Hawkinson 6d0fe752bf [external:ffmpeg] In test harness, limit to 10k download size
Otherwise, if you screw up a playlist test by including a playlist
dictionary key, you'll be there for eons while it downloads all the
files before erroring out.
2017-03-05 11:19:44 +08:00
Pratyush Singh d374d943f3
[downloader/common] Limit displaying 2 digits after decimal point in sleep interval message 2017-02-25 20:59:04 +07:00
Sergey M․ de64e23c56
[downloader/ism] Honor HTTP headers when downloading fragments 2017-02-19 04:18:36 +07:00
Sergey M․ 553f6dbac7
[downloader/dash] Honor HTTP headers when downloading fragments
For example, https://www.oppetarkiv.se/video/1196142/natten-ar-dagens-mor
2017-02-19 04:18:22 +07:00
Remita Amine be670b8e8f [external:ffmpeg] do not assume that ffmpeg unknown version format is new 2017-02-09 17:36:59 +01:00
Sergey M․ 7097bffba6
[downloader/fragment] Respect --no-part 2017-02-06 23:07:59 +07:00
Remita Amine 36fce54816 [turner] fix downloading of secure hls formats using ffmpeg(closes #11358)(closes #11373)(closes #11800) 2017-02-04 15:23:46 +01:00
Remita Amine 8bdc149441 [downloader/external:ffmpeg] minimize the use of aac_adtstoasc filter 2017-02-02 08:07:28 +01:00
Remita Amine bfa1073e11 [uplynk] force downloading using hls native downloader(closes #11496) 2016-12-20 19:49:45 +01:00
Yen Chi Hsuan 582be35847
Update coding style after pycodestyle 2.1.0
In pycodestyle 2.1.0, E305 was introduced, which requires two blank
lines after top level declarations, too.

See https://github.com/PyCQA/pycodestyle/issues/400

See also #10689; thanks @stepshal for first mentioning this issue and
initial patches
2016-11-17 19:45:42 +08:00
Sergey M․ 690355551c
[downoader/fragment,f4m,hls] Add internal support for custom HTTP headers 2016-11-13 22:22:10 +07:00
Sergey M․ 9d64e1dcdc
[downloader/ism] Fix typo 2016-11-03 22:15:09 +07:00
Remita Amine 10380e55de [downloader/ism] fix AVC Decoder Configuration Record creation in python 3 2016-11-03 16:08:57 +01:00
Remita Amine b2758123c5 add Basic support for Smooth Streaming protocol(#8118) 2016-11-02 01:54:45 +07:00
Sergey M․ bcd6276520
[downloader/common] Remove debug output 2016-10-12 21:22:33 +07:00
Yen Chi Hsuan d54739a2e6
[downloader/http] xattr values should be bytes 2016-10-01 19:58:13 +08:00
Yen Chi Hsuan d7753d1948
[downloader/http] Use write_xattr function for --xattr-set-filesize 2016-10-01 14:47:20 +08:00
Remita Amine 6f126d903f [download/hls] Delegate downloading to ffmpeg for live streams 2016-09-24 15:39:47 +01:00
Sergey M․ 86f4d14f81
Refactor fragments interface and dash segments downloader
- Eliminate segment_urls and initialization_url
+ Introduce manifest_url (manifest may contain unfragmented data in this case url will be used for direct media URL and manifest_url for manifest itself correspondingly)
* Rewrite dashsegments downloader to use fragments data
* Improve generic mpd extraction
2016-09-17 20:35:22 +07:00
Yen Chi Hsuan 919cf1a62f
[downloader/dash] Abort if the first segment fails
Closes #10497, Closes #10542
2016-09-04 17:32:29 +08:00
Sergey M․ 4a69fa04e0
[downloader/dash] Abort download immediately after giving up on some fragment 2016-09-03 17:51:48 +07:00
Sergey M․ 2e99cd30c3
[downloader/dash:hls] Report exact fragment error on retry 2016-09-03 17:51:48 +07:00
Sergey M․ 25afc2a783
[downloader/dash:hls] Respect --fragment-retries and --skip-unavailable-fragments (Closes #10165, closes #10448) 2016-09-03 17:51:48 +07:00
Sergey M․ 9603b66012
Introduce --skip-unavailable-fragments 2016-09-03 17:51:48 +07:00
Yen Chi Hsuan 6c9b71bc08
[downloader/external] Recommend --hls-prefer-native for SOCKS users
Related: #10490
2016-08-29 19:05:38 +08:00
Remita Amine b8079a40bc [turner] fix secure m3u8 formats downloading 2016-08-28 17:51:53 +01:00
Yen Chi Hsuan 20bad91d76
[downloader/external] Clarify that ffmpeg doesn't support SOCKS
Ref: #10304
2016-08-25 22:38:06 +08:00
Remita Amine 07ea9c9b05 [downloader/hls] fill IV with zeros for IVs shorter than 16-octet 2016-08-25 08:49:44 +01:00
Remita Amine aaf44a2f47 [uplynk] Add new extractor 2016-08-13 22:53:41 +01:00
Remita Amine acfccacad5 [downloader/external:curl] Clarify why CurlFD should not capture stderr 2016-08-13 10:26:02 +01:00
Remita Amine 98e698f1ff [external/curl] respect more downloader options and display progress 2016-08-12 12:30:02 +01:00
Sergey M․ 1ad6b891b2
Add more checks for --min/max-sleep-interval arguments and use more idiomatic naming 2016-08-09 03:47:56 +07:00
singh-pratyush96 065bc35489
Add --max-sleep-interval (Closes #9930) 2016-08-09 03:32:42 +07:00
Yen Chi Hsuan 477b7a8474
[downloader/f4m] Fix for Rai live streams 2016-07-03 19:26:39 +08:00
Sergey M․ 8369a4fe76
[downloader/hls] Simplify and carry long lines 2016-06-20 21:55:17 +07:00
remitamine e154c65128 [downloader/hls] Add support for AES-128 encrypted segments in hlsnative downloader 2016-06-19 01:01:40 +01:00
Sergey M․ e69f9f5d68
[downloader/external] Decode error string before writing to stderr 2016-06-12 16:45:07 +07:00
Yen Chi Hsuan 50ce1c331c
[downloader/external] Add another env for proxies in ffmpeg/avconv
Related sources:
https://git.libav.org/?p=libav.git;a=blob;f=libavformat/http.c;h=8fe8d11e1edfdbb04a8726db2c49cfef3f572aac;hb=HEAD#l152
https://git.libav.org/?p=libav.git;a=blob;f=libavformat/tls.c;h=fab243e93e20034e88e619188c13a44a5d8ccdb9;hb=HEAD#l63
https://github.com/FFmpeg/FFmpeg/blob/f8e89d8/libavformat/http.c#L191
https://github.com/FFmpeg/FFmpeg/blob/f8e89d8/libavformat/tls.c#L92
2016-06-08 14:43:52 +08:00
Sergey M․ 633b444fd2
[downloader/hls] Correct comment on twitch vods 2016-06-05 03:31:10 +07:00
Sergey M․ 51c4d85ce7
[downloader/hls] PEP 8 2016-06-05 03:21:43 +07:00
Sergey M․ 1e236d7e23
[downloader/hls] Do not rely on EXT-X-PLAYLIST-TYPE:EVENT 2016-06-05 03:16:05 +07:00
Sergey M․ 2615fa7584
[downloader/f4m] Simply select format when it's the only one 2016-05-27 01:46:12 +06:00
Yen Chi Hsuan 1b405bb47d
[downloader/f4m] Tolerate truncate segments when testing
Replaces #9216

Fixes #9214 and test_Bloomberg partially
2016-05-12 20:02:36 +08:00
Yen Chi Hsuan edaa23f822
[compat] Rename struct_(un)pack to compat_struct_(un)pack 2016-05-10 14:51:38 +08:00
Yen Chi Hsuan dab0daeeb0
[utils,compat] Move struct_pack and struct_unpack to compat.py 2016-05-10 14:51:38 +08:00
Sergey M․ 2937590e8b
[downloader/hls] PEP 8 2016-05-09 22:16:33 +06:00
Sergey M․ e62d9c5caa
[downloader/external] Call ffmpeg with with HTTP_PROXY env variable set (#9437) 2016-05-09 22:05:12 +06:00
Sergey M․ 6104cc2985
[downloader/hls] Add event media playlists to unsupported features of hlsnative 2016-05-09 20:55:37 +06:00
Sergey M․ c15c47d19b
[downloader/hls] Remove EXT-X-MEDIA-SEQUENCE from unsupported features for hlsnative 2016-05-09 20:45:03 +06:00
Sergey M eb785b856f Merge pull request #9358 from dstftw/hls-native-to-ffmpeg-delegation
[downloader/hls] Delegate extraction to ffmpeg when unsupported features detected
2016-05-08 22:07:55 +00:00
Sergey M․ f5436c5d9e
[downloader/external] Add temp fix ffmpeg m3u8 downloads (Closes #9394) 2016-05-08 02:29:26 +06:00
Sergey M․ 0d66bd0eab
[downloader/hls] Delegate extraction to ffmpeg when unsupported features detected 2016-05-01 13:56:51 +06:00
Sergey M․ bf09af3acb
Add --hls-prefer-ffmpeg 2016-04-21 23:02:17 +06:00
remitamine d868f43c58 [ffmpeg] check for - file name in _ffmpeg_filename_argument 2016-04-16 19:45:56 +01:00
remitamine ce599d5a7e [downloader/external] enable piping for FFmpegFD(closes #2124) 2016-04-14 18:49:02 +01:00
Yen Chi Hsuan f5d8743e0a
[downloader/rtsp] Print the command 2016-04-14 15:07:31 +08:00
Sergey M․ f7df343b4a [downloader/f4m] Extract routine for removing unsupported encrypted media 2016-03-27 07:41:19 +06:00
Sergey M․ 16a8b7986b [downloader/fragment] Document fragment_retries 2016-03-19 20:54:21 +06:00
Sergey M․ 617e58d850 [downloader/{common,fragment}] Fix total retries reporting on python 2.6 2016-03-19 20:51:30 +06:00
Sergey M․ e33baba0dd [downloader/dash] Add fragment retry capability
YouTube may often return 404 HTTP error for a fragment causing the
whole download to fail. However if the same fragment is immediately
retried with the same request data this usually succeeds (1-2 attemps
is usually enough) thus allowing to download the whole file successfully.
So, we will retry all fragments that fail with 404 HTTP error for now.
2016-03-19 20:42:23 +06:00
Sergey M․ 721f26b821 [downloader/fragment] Add report_retry_fragment 2016-03-19 20:41:24 +06:00
remitamine 4230c4894d [external/downloader] fix rtmp downloading using FFmpegFD 2016-03-14 16:51:01 +01:00
remitamine 2e7e561c1d Merge pull request #8611 from remitamine/ffmpegfd
[downloader/external] Add FFmpegFD
2016-03-13 21:30:27 +01:00