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

Media Streaming Doesn't Work #3061

Closed
lplassman opened this issue Sep 19, 2018 · 69 comments · Fixed by #8132
Closed

Media Streaming Doesn't Work #3061

lplassman opened this issue Sep 19, 2018 · 69 comments · Fixed by #8132

Comments

@lplassman
Copy link

Actual behaviour

  • Tell us what happens
    When tapping on a media file in the latest version of the app(3.3.0), it opens a player in the app, and then says in a little popup "Could not play the file using the builtin media player" and then it gives up.

Expected behaviour

  • Tell us what should happen
    It should play mp3 and mp4 files when selecting them.

Steps to reproduce

  1. Tap a media file in the Nextcloud app
  2. Media Player opens and produces the error

Environment data

Android version: 8.0

Device model: LG V30

Stock or customized system: Stock

Nextcloud app version: 3.3.0

Nextcloud server version:14.0

Logs

Web server error log

Insert your webserver log here

Nextcloud log (data/nextcloud.log)

Insert your Nextcloud log here

NOTE: Be super sure to remove sensitive data like passwords, note that everybody can look here! You can use the Issue Template application to prefill some of the required information: https://apps.nextcloud.com/apps/issuetemplate

@nextcloud-android-bot
Copy link
Collaborator

GitMate.io thinks possibly related issues are #183 (Streaming), #1218 (Multiple picture transfer doesn't work), #1009 (Send not working), #643 (Autoupload does not work), and #294 (Instant Upload Doesn't Work (Nexus5X)).

@gradinaruvasile
Copy link

I can confirm this bug.
Although streaming works with VLC at least (if you have it installed) by selecting the "Stream with..." option.

@johninstockie
Copy link

I can confirm this bug too, however I am experiencing the opposite in that the internal video player works if you use the stream with option, but not with normal behavior, and VLC does not work by any method.

@DPTJKKVH
Copy link

And I can confirm that neither nextcloud, nor android media player or vlc work. VLC fails immediately and does give an error message "The location https://path_to_server_and_file cannot be played". Nextcloud loads a couple of seconds and then says "the built in media player cannot play the file". Android player just stays black.

Tested with mp4 and webm. Nextcloud 14 server. Standard Encryption module. Client Lock with system credentials.

@breisig
Copy link

breisig commented Oct 1, 2018

I am having this exact same issue even with mp3's. Have to either download the file for it to play or stream with 'vlc' to play.

@galosre
Copy link

galosre commented Oct 16, 2018

I completely with the above Plus it would be nice to play files by folder in case of multiple tracks (album)
.FLAC and .APE would be a nice add on

@DPTJKKVH
Copy link

Is there something I can provide aside from a logcat? I wanted to upload a logcat but noticed it contains lots of confidential information like folder names, sync names and such.

@BeGunman
Copy link

BeGunman commented Nov 6, 2018

can also confirm this bug! having this exact same issue even with mp3's. Have to either download the file for it to play or stream with 'vlc' to play.

@alkamen
Copy link

alkamen commented Nov 13, 2018

I can confirm this bug.
Plays mp4 some Time, but not mp4, or wav.

@gdr8205
Copy link

gdr8205 commented Jan 11, 2019

I am having this issue also. When trying to play with the built in media player and also when trying "stream with" it always fails

@DPTJKKVH
Copy link

Has any of you force password on share link enabled? I have a hunch that this is an issue. At least for us that cannot stream anything.

@tobiasKaminsky
Copy link
Member

@rullzer this should not be related, or?

@rullzer
Copy link
Member

rullzer commented Jan 22, 2019

Nope unrelated

@tiredthinker
Copy link

tiredthinker commented Feb 17, 2019

Similar as above. Version 3.5. Video streaming will work until switching to HTTPS. Went through 2 setups, apache2 and nginx. Both worked within the Android App prior to enabling secure connections. Reverting back fixed the streaming issue.

Found this link, possibly related... https://stackoverflow.com/questions/30166725/android-media-player-streaming-audio-file-from-https-url

@stale
Copy link

stale bot commented May 9, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label May 9, 2019
@DPTJKKVH
Copy link

DPTJKKVH commented May 9, 2019

Issue still persists, stale[bot]. So hush...

@stale stale bot removed the stale label May 9, 2019
@breisig
Copy link

breisig commented May 13, 2019

Yeah, the problem still exists.

@ezaquarii
Copy link
Collaborator

@breisig Can you share a link to a media file that won't play?

@susobaco
Copy link

#3351

@stale
Copy link

stale bot commented Jun 22, 2019

This request did not receive an update in the last 4 weeks. Please take a look again and update the issue with new details, otherwise the issue will be automatically closed in 2 weeks. Thank you!

@stale stale bot added the stale label Jun 22, 2019
@DPTJKKVH
Copy link

@Stale[bot] No Stalebot. This stays open until it is fixed!

@stale stale bot removed the stale label Jun 22, 2019
@AndyScherzinger
Copy link
Member

The is rather part of 20191001 since it has been merged less that a day ago so it'll go into the next nightly build.

@DPTJKKVH
Copy link

DPTJKKVH commented Oct 7, 2019

I tested with 20191005 and neither MP3 nor MP4 can be streamed. Tested with Nextcloud "built-in" media player, VLC and mpv-android.

The error is 100% the same. VLC is the most descriptive saying: "Cannot access resource at $URL"

@gradinaruvasile
Copy link

It is partially working on Dev 20191005.
For some media it does work (for example the Nextcloud logo animation and some cropped videos i had), but for others it is not (example is HD videos from phones). Maybe it is related to codecs or resolution?
VLC works with everything.

@DPTJKKVH
Copy link

DPTJKKVH commented Oct 7, 2019

I doubt it is related to resolution. I tried both HD and SD mp4 videos. Also mp3 is so common it works with basically everything nowadays.

As I said I tried to "Stream with..." VLC and it gave the error I quoted above.

To be honest I always doubted the access errors had anything to do with the actual player.

If you ask me it has to do with our server forcing passwords for link shares. At least for the "Stream with..." option Nextcloud is creating a share link as far as I can tell by the VLC error. Right from the start I wondered how they get around the password requirement without creating a possible backdoor for creating passwordless share links on a forced password setup. (I hope that wasn't too confusing.)

So I want to raise this question again: Are you really 100% sure that forcing passwords for share links really does not conflict with the "Stream with..." option that (as far as I can tell) creates a share link for the external media player to use?

@AndyScherzinger @rullzer @tobiasKaminsky

@tobiasKaminsky
Copy link
Member

Right from the start I wondered how they get around the password requirement without creating a possible backdoor for creating passwordless share links on a forced password setup. (I hope that wasn't too confusing.)

When requesting such a link, no regular share link is created, but a special password-less link that only lasts 24h.
As the url is nowhere exposed and read-only for only the specific file this is a good solution security wise.
As the link always is 32 chars, chances are also very limited to guess/bruteforce it.

@gradinaruvasile
Copy link

As I said I tried to "Stream with..." VLC and it gave the error I quoted above.

VLC definitely works for me with anything i throw at it in both the stable and the dev version.

@DPTJKKVH
Copy link

DPTJKKVH commented Oct 8, 2019

I'm looking for differences of your and my setup. @gradinaruvasile

I use an app token (with file access activated of course) for the nextcloud android app. How do you authenticate with the android app?

@tobiasKaminsky Thanks for the explanation. When the link is passwordless what else could block access to the file when downloading it via nextcloud app works without issues? VLC is explicitly saying it cant access the resource at $URL (hostname + path + auth-key)

To preempt some questions: VLC and mpv-android have full internet and storage access in android permissions manager. There is no firewall blocking either. Accessing other online ressources works fine with VLC.

@gradinaruvasile
Copy link

I'm looking for differences of your and my setup. @gradinaruvasile

I use an app token (with file access activated of course) for the nextcloud android app. How do you authenticate with the android app?

I believe the same as you. I just created an app password and scanned the qr code with the NC app.

@tobiasKaminsky
Copy link
Member

@tobiasKaminsky Thanks for the explanation. When the link is passwordless what else could block access to the file when downloading it via nextcloud app works without issues? VLC is explicitly saying it cant access the resource at $URL (hostname + path + auth-key)

Tricky question. It is a normal url, which goes to a special endpoint within Nextcloud.
@rullzer do you have an idea?

@rullzer
Copy link
Member

rullzer commented Oct 9, 2019

@DPTJKKVH are you using server side encryption by any chance? With user keys? because in that case it won't work. Since the token does not have your password hence it can't unlock your files.

@DPTJKKVH
Copy link

DPTJKKVH commented Oct 9, 2019

@rullzer Yes I do have server side crypto with user keys.

But now I'm curious: Sharing files with third parties via link works without issues on my setup. So users can expose individual files or folders on demand, regardless of the current encryption.

Is there a reason why media streaming links are treated different from normal share links in this regard?

@rullzer
Copy link
Member

rullzer commented Oct 9, 2019

What effectively happens during link sharing is that the file gets encrypted with the system key that is why it can be decrypted without knowing your password.

This step is probably missing in the direct link creation.

@redtux
Copy link

redtux commented Oct 9, 2019

Streaming and playing in background is working for me with ogg, mp3, mp4, m4a (but, as already mentioned, not with aac) using server-side encryption. The only thing that is not working for me is the "Streaming with…" button in the menu. (Nothing happens when I click on it.)

@lftsy
Copy link

lftsy commented Oct 23, 2019

I have a Debian 10 + apache2 + HTTPS + nextcloud 16 + Server side encryption and do have the same problem: I cannot stream mp4 nor use external player from Android app

Workaround : If I create a public link, then use external Player within the app, it is working

Info: Streaming via Web Player works and the ios app was also working

Debug : If needed, I can share an account via private message to allow you to reproduce it at will?

@AndyScherzinger AndyScherzinger removed this from the Nextcloud App 3.9.0 milestone Nov 12, 2019
@mathieu2em
Copy link

mathieu2em commented Dec 11, 2019

for me, I use a apache2 server on ubuntu 18 on windows subsystem for linux.

When visiting the app on android, mp4 video files works well on the native nextcloud app but not on the stream with vlc.
for .mpk , it just gives sound on native and media player and load indefinitely on vlc.

on ios on my ipad air it just doesnt seem to work.

@mathieu2em
Copy link

mathieu2em commented Dec 11, 2019

ok. After some research , I just found out that the player is the reason for what codec is supported. So for example for my mkv files the player KMplayer does well on android but vlc doesnt and the native app neither . for mp4 native does well and vlc doesnt but the other two works... Sooo thats it , if it doesnt work for you , just check different video player supporting the codec and you will find one !

@lftsy
Copy link

lftsy commented Mar 22, 2020

I have a Debian 10 + apache2 + HTTPS + nextcloud 16 + Server side encryption and do have the same problem: I cannot stream mp4 nor use external player from Android app

Workaround : If I create a public link, then use external Player within the app, it is working

Info: Streaming via Web Player works and the ios app was also working

Debug : If needed, I can share an account via private message to allow you to reproduce it at will?

I have the exact same setup and symptoms and workaround but with version 18.0.2.

  1. Does problem come from the fact that we enabled encryption ? But it is working on iOS app and Web players
  2. Since it doest not affect everybody, I am wondering what is the source of the problem (encryption, cumulative upgrades, apache2 setup) should I test with nginx ?
  3. What debug info we should provide to help here
  4. I can also share an account via PM

Best Regards

@titilambert
Copy link

Can you try to mount the webdav share and play a video with a local player ? I suspect that the issue comes from webdav which reduce the traffic... So heavy videos as issue to load ....

@haadr
Copy link

haadr commented Apr 11, 2020

Hey all, I had this problem and saw someone mentioning this failing when they enabled TLS. My nextcloud server is behind a proxy, which handles TLS, and the proxy itself happens via http. When vlc failed to stream a file, I saw that the url it tried to load was actually incorrect.

My problem went away when I configured my config.php according to https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/reverse_proxy_configuration.html.

The nextcloud self-check didn't detect this, but then possibly it can't.

Maybe it helps someone.

@tobiasKaminsky
Copy link
Member

There is an experimental switch to another video player in #8132 (comment)

This apk can be installed in parallel.
It would be great if you can give this a test, if it helps in your scenario.

@lexvx
Copy link

lexvx commented Oct 29, 2022

The problem is still there. Streaming in android APP not working.
Just installed the old version of the app (v3.10) and everything works fine in it.
Streaming in the application for iPhone works correctly.

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

Successfully merging a pull request may close this issue.