Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rumble: Playback in background error #17

Closed
fedelibre opened this issue Nov 3, 2021 · 11 comments
Closed

Rumble: Playback in background error #17

fedelibre opened this issue Nov 3, 2021 · 11 comments
Assignees

Comments

@fedelibre
Copy link

When I try to play back the audio in background in a Rumble video I get an error. This does not happen when using Youtube.
The error is something like (translating from my mother language):

A fatal media player error occurred

Audio in background is one of the main reason why I use NewPipe...

My phone has Lineage OS 15.1-2020224.
Let me know if you need more information.

Thanks

@evermind-zz
Copy link
Collaborator

Could you provide a link for a video where this error occured? I will try to reproduce it

@evermind-zz evermind-zz self-assigned this Nov 15, 2021
@fedelibre
Copy link
Author

fedelibre commented Nov 15, 2021

It happens with any video.

I noticed another problem: when I try to download the audio of a clip, the video is downloaded instead. It seems it cannot handle the audio at all.

If I go in the Download section of BrandNewPipe, I see the file with the headphones icon (suggesting it's an audio file), but when I click on it the video is loaded.
If I click on More info, I get the following error:

{"user_action":"requested stream","request":"https://rumble.com/vp8s2y","content_language":"it-IT","content_country":"IT","app_language":"it_IT","service":"Rumble","package":"com.github.bravenewpipe","version":"0.21.13-1.0.3","os":"Linux Android 8.1.0 - 27","time":"2021-11-15 15:09","exceptions":["java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
        at java.util.ArrayList.get(ArrayList.java:437)
        at org.schabi.newpipe.extractor.services.rumble.extractors.RumbleStreamExtractor.getViewCount(RumbleStreamExtractor.java:131)
        at org.schabi.newpipe.extractor.stream.StreamInfo.extractOptionalData(StreamInfo.java:261)
        at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:73)
        at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:64)
        at org.schabi.newpipe.util.ExtractorHelper.lambda$getStreamInfo$3(ExtractorHelper.java:116)
        at org.schabi.newpipe.util.ExtractorHelper.$r8$lambda$YTHJjScxCJNO1LTCqs3IKy35iyY(Unknown Source:0)
        at org.schabi.newpipe.util.ExtractorHelper$$ExternalSyntheticLambda6.call(Unknown Source:4)
        at io.reactivex.rxjava3.internal.operators.single.SingleFromCallable.subscribeActual(SingleFromCallable.java:43)
        at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
        at io.reactivex.rxjava3.internal.operators.single.SingleDoOnSuccess.subscribeActual(SingleDoOnSuccess.java:35)
        at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
        at io.reactivex.rxjava3.internal.operators.maybe.MaybeFromSingle.subscribeActual(MaybeFromSingle.java:41)
        at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
        at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:153)
        at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
        at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
        at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
        at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15753)
        at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
        at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
        at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
        at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
        at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
        at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:614)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
        at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
        at java.lang.Thread.run(Thread.java:764)
"],"user_comment":""}"

@evermind-zz
Copy link
Collaborator

The problem is due to that Rumble has no real audio files. I just faked the video ones into appearing to be audio files for background playback. I am pretty sure that I can't fix that here in NewPipeExtractor that BraveNewPipe will extract the audio from the video.

@evermind-zz
Copy link
Collaborator

removed fake audio functionality with d773536

@bloatmode
Copy link

bloatmode commented Dec 15, 2022

@evermind-zz Wouldn't it be possible to stream both video and audio but play just the audio while in background mode?

@evermind-zz
Copy link
Collaborator

@bloatmode actually it is working this way now

@bloatmode
Copy link

@evermind-zz Not really, if I click "Background" when inside a playlist I get this exception and nothing is played in the background:

Exception

Crash log

org.schabi.newpipe.player.mediasource.FailedMediaSource$MediaSourceResolutionException: Unable to resolve source from stream info. URL: https://rumble.com/v1zg60n-china-covid-protests-who-are-the-real-dictators.html, audio count: 0, video count: 0, 6
	at org.schabi.newpipe.player.playback.MediaSourceManager.lambda$getLoadedMediaSource$3(MediaSourceManager.java:432)
	at org.schabi.newpipe.player.playback.MediaSourceManager.$r8$lambda$GiL2pCn9PgSZNVk872SsYVyH27I(Unknown Source:0)
	at org.schabi.newpipe.player.playback.MediaSourceManager$$ExternalSyntheticLambda4.apply(Unknown Source:6)
	at io.reactivex.rxjava3.internal.operators.single.SingleMap$MapSingleObserver.onSuccess(SingleMap.java:58)
	at io.reactivex.rxjava3.internal.operators.single.SingleDoOnError$DoOnError.onSuccess(SingleDoOnError.java:52)
	at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.onSuccess(SingleSubscribeOn.java:68)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle$ToSingleMaybeSubscriber.onSuccess(MaybeToSingle.java:83)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onNext(FlowableElementAtMaybe.java:80)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.drain(MaybeConcatArray.java:136)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray$ConcatMaybeObserver.request(MaybeConcatArray.java:78)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe$ElementAtSubscriber.onSubscribe(FlowableElementAtMaybe.java:66)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeConcatArray.subscribeActual(MaybeConcatArray.java:42)
	at io.reactivex.rxjava3.core.Flowable.subscribe(Flowable.java:15868)
	at io.reactivex.rxjava3.internal.operators.flowable.FlowableElementAtMaybe.subscribeActual(FlowableElementAtMaybe.java:36)
	at io.reactivex.rxjava3.core.Maybe.subscribe(Maybe.java:5330)
	at io.reactivex.rxjava3.internal.operators.maybe.MaybeToSingle.subscribeActual(MaybeToSingle.java:46)
	at io.reactivex.rxjava3.core.Single.subscribe(Single.java:4813)
	at io.reactivex.rxjava3.internal.operators.single.SingleSubscribeOn$SubscribeOnObserver.run(SingleSubscribeOn.java:89)
	at io.reactivex.rxjava3.core.Scheduler$DisposeTask.run(Scheduler.java:644)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.run(ScheduledRunnable.java:65)
	at io.reactivex.rxjava3.internal.schedulers.ScheduledRunnable.call(ScheduledRunnable.java:56)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:920)


@evermind-zz
Copy link
Collaborator

I'll look into it. What I was referring to is: playing one video in the foreground and then turn the display off. This should work.

@evermind-zz evermind-zz reopened this Dec 16, 2022
@evermind-zz
Copy link
Collaborator

@bloatmode So I added the ability to BraveNewPipe to also play the audio of videos in the background. It will use the resolution that is defined for the video player. Can you please test it?
app-brave-debug.zip

@bloatmode
Copy link

@evermind-zz It works, thanks!

@evermind-zz
Copy link
Collaborator

Fox merged
with TeamNewPipe/NewPipe#9562

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants