Skip to content

more dl features#2679

Merged
TobiGr merged 28 commits intoTeamNewPipe:devfrom
kapodamy:dl-last-features
Dec 7, 2019
Merged

more dl features#2679
TobiGr merged 28 commits intoTeamNewPipe:devfrom
kapodamy:dl-last-features

Conversation

@kapodamy
Copy link
Contributor

@kapodamy kapodamy commented Oct 1, 2019

This pull request does:

required:

[ ✔ ] I carefully read the contribution guidelines and agree to them.

@kapodamy kapodamy changed the title more dl features [WIP] more dl features Oct 1, 2019
@TobiGr TobiGr added the downloader Issue is related to the downloader label Oct 1, 2019
@opusforlife2
Copy link
Collaborator

Would it be possible to retain .opus for Ogg Opus files? Or is that a hard requirement for the fix?

It's not a deal breaker, but I find it convenient to tell apart between my Ogg Vorbis and Ogg Opus files by looking at the extensions rather than having to open MediaInfo or similar utilities.

Ogg Vorbis streams, if present, should certainly have the .ogg (or .oga) extension.

@kapodamy
Copy link
Contributor Author

kapodamy commented Oct 2, 2019

@opusforlife2 yes, is possible

@TobiGr
Copy link
Contributor

TobiGr commented Oct 10, 2019

@kapodamy The change list sounds interesting. Please ping me when you're done.

@kapodamy
Copy link
Contributor Author

@TobiGr can you take a look on TeamNewPipe/NewPipeExtractor#199

@kapodamy kapodamy changed the title [WIP] more dl features more dl features Oct 13, 2019
@TobiGr
Copy link
Contributor

TobiGr commented Nov 24, 2019

@kapodamy I'll merge the extractor PR after a rebase. Can you rebase this PR, too? We won't wait for the other PRs because their authors do not respond / apply the requested changes.

@kapodamy
Copy link
Contributor Author

@TobiGr ok

* used for opus audio stream
* update WebMReader and WebMWriter
* new post-processing algorithm
* reduce the number of iterations over the output file (less seeking)
* fix audio samples with size of 255 do not handled correctly in the segment table (allows writing audio streams with 70kbps and 160kbps bitrate)
* add support for VORBIS codec metadata
* write packets based on the timestamp
* recovery infrastructure
* bump serialVersionUID of DownloadMission
* misc cleanup in DownloadMission.java
* remove unused/redundant from strings.xml
* correct calculation of "co64" box and usage of 64bits offsets
* generate one chunk for audio streams like ffmpeg does, attempt to fix cut-off audio
* misc. cleanup
* OggFromWebMWriter: rewrite (again), reduce iterations over the input. Works as-is (video streams are not supported)
* WebMReader: use int for SimpleBlock.dataSize instead of long
* Download Recovery: allow recovering uninitialized downloads
* check range-requests using HEAD method instead of GET
* DownloadRunnableFallback: add workaround for 32kB/s issue, unknown issue origin, wont fix
* reporting downloads errors now include the source url with the selected quality and format
* check if the directory pending_downloads was created
fix wrong cue generation
keep *.opus extension
* migrate few annotations to androidx
* mission recovery: better error handling (except StreamExtractor.getErrorMessage() method always returns an error)
* post-processing: more detailed progress

[file specific changes]

DownloadMission.java
* remove redundant/boilerplate code (again)
* make few variables volatile
* better file "length" approximation
* use "done" variable to count the amount of bytes downloaded (simplify percent calc in UI code)

Postprocessing.java
* if case of error use "ERROR_POSTPROCESSING" instead of "ERROR_UNKNOWN_EXCEPTION"
* simplify source stream init

DownloadManager.java
* move all "service message sending" code to DownloadMission
* remove not implemented method "notifyUserPendingDownloads()" also his unused strings

DownloadManagerService.java
* use START_STICKY instead of START_NOT_STICKY
* simplify addMissionEventListener()/removeMissionEventListener() methods (always are called from the main thread)

Deleter.java
* better method definition

MissionAdapter.java
* better method definition
* code cleanup
* the UI is now refreshed every 750ms
* simplify download progress calculation
* indicates if the download is actually recovering
* smooth download speed measure
* show estimated remain time

MainFragment.java:
* check if viewPager is null (issued by "Apply changes" feature of Android Studio)
@TobiGr
Copy link
Contributor

TobiGr commented Nov 24, 2019

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Throwable java.lang.Throwable.getCause()' on a null object reference
        at us.shandian.giga.get.DownloadMission.notifyError(DownloadMission.java:319)
        at us.shandian.giga.get.DownloadMission.notifyError(DownloadMission.java:308)
        at us.shandian.giga.get.DownloadRunnable.run(DownloadRunnable.java:145)

This happened when I turned off wifi while downloading. I got the normal error screen. I might be better to modify the notification to promt the error. When taping on the notification or the unfinished item in the downloads view, more info should be displayed.

@TobiGr
Copy link
Contributor

TobiGr commented Nov 24, 2019

image
I know there is few space. But @ seems to be wrong here. Maybe something like 0:42 left/remaining

* used for opus audio stream
* update WebMReader and WebMWriter
* new post-processing algorithm
* reduce the number of iterations over the output file (less seeking)
* fix audio samples with size of 255 do not handled correctly in the segment table (allows writing audio streams with 70kbps and 160kbps bitrate)
* add support for VORBIS codec metadata
* write packets based on the timestamp
* recovery infrastructure
* bump serialVersionUID of DownloadMission
* misc cleanup in DownloadMission.java
* remove unused/redundant from strings.xml
* correct calculation of "co64" box and usage of 64bits offsets
* generate one chunk for audio streams like ffmpeg does, attempt to fix cut-off audio
* misc. cleanup
* OggFromWebMWriter: rewrite (again), reduce iterations over the input. Works as-is (video streams are not supported)
* WebMReader: use int for SimpleBlock.dataSize instead of long
* Download Recovery: allow recovering uninitialized downloads
* check range-requests using HEAD method instead of GET
* DownloadRunnableFallback: add workaround for 32kB/s issue, unknown issue origin, wont fix
* reporting downloads errors now include the source url with the selected quality and format
* check if the directory pending_downloads was created
fix wrong cue generation
keep *.opus extension
* migrate few annotations to androidx
* mission recovery: better error handling (except StreamExtractor.getErrorMessage() method always returns an error)
* post-processing: more detailed progress

[file specific changes]

DownloadMission.java
* remove redundant/boilerplate code (again)
* make few variables volatile
* better file "length" approximation
* use "done" variable to count the amount of bytes downloaded (simplify percent calc in UI code)

Postprocessing.java
* if case of error use "ERROR_POSTPROCESSING" instead of "ERROR_UNKNOWN_EXCEPTION"
* simplify source stream init

DownloadManager.java
* move all "service message sending" code to DownloadMission
* remove not implemented method "notifyUserPendingDownloads()" also his unused strings

DownloadManagerService.java
* use START_STICKY instead of START_NOT_STICKY
* simplify addMissionEventListener()/removeMissionEventListener() methods (always are called from the main thread)

Deleter.java
* better method definition

MissionAdapter.java
* better method definition
* code cleanup
* the UI is now refreshed every 750ms
* simplify download progress calculation
* indicates if the download is actually recovering
* smooth download speed measure
* show estimated remain time

MainFragment.java:
* check if viewPager is null (issued by "Apply changes" feature of Android Studio)
@kapodamy
Copy link
Contributor Author

kapodamy commented Nov 26, 2019

@TobiGr cannot test NPE is not working for me nvm, npe doesnt work with lastest jsoup

@kapodamy
Copy link
Contributor Author

now the ETA looks like
Screenshot_1574786435

* rebase fixup, add null check
* better ETA string
* drop connection read timeout, for HSDPA networks
* bump NPE version
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ETA looks good now 👍
There are some smaller things, but they are easy to fix

@TobiGr TobiGr mentioned this pull request Dec 2, 2019
1 task
@TobiGr
Copy link
Contributor

TobiGr commented Dec 6, 2019

Can you please check, why WebM with 720p downloads have no audio track? The same video with audio track is available when using 0.17.4, but not on your latest commit.

use +webm_opus instead of +opus
Copy link
Contributor

@TobiGr TobiGr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you again for your ongoing work on the downloader

@benymos
Copy link

benymos commented Jan 27, 2020

Je ne comprends rien, il n'y a pas un lien pour télécharger newpipe 0.18.2

@Stypox
Copy link
Member

Stypox commented Jan 27, 2020

@benymos download it from here: https://github.com/TeamNewPipe/NewPipe/releases/tag/v0.18.2
Click on the NewPipe_v0.18.2.apk button in the Assets menu.

Translated into French using DeepL // Traduit en français à l'aide de DeepL:
@benymos le télécharger ici: https://github.com/TeamNewPipe/NewPipe/releases/tag/v0.18.2
Cliquez sur le bouton NewPipe_v0.18.2.apk dans le menu Assets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

downloader Issue is related to the downloader

Projects

None yet

5 participants