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

Using "Share" -> "Play with VLC" with Newpipe doesn't play the video (with everything else does) #10016

Closed
6 tasks done
LukasThyWalls opened this issue Apr 10, 2023 · 13 comments
Closed
6 tasks done
Labels
question Not really an issue, but more of a question about how something works

Comments

@LukasThyWalls
Copy link

LukasThyWalls commented Apr 10, 2023

Checklist

  • I am able to reproduce the bug with the latest version.
  • I made sure that there are no existing issues - open or closed - which I could contribute my information to.
  • I have read the FAQ and my problem isn't listed.
  • I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise.
  • This issue contains only one bug.
  • I have read and understood the contribution guidelines.

Affected version

0.25.1

Steps to reproduce the bug

  1. Select any video and press Share
  2. It pop-up a share dialog, and select "Play with VLC"

Expected behavior

With apps like Firefox, Youtube, etc., sharing a Youtube URL to VLC, it tries to play the video.

Actual behavior

With Newpipe, sharing the video to VLC, VLC instead to play the video, it shows during almost 10 seconds the thumbnail and close.
However, when you share to other apps like Firefox, it opens the Youtube video URL as normal.

Screenshots/Screen recordings

Here is the screenshot of the "Share" dialog in NewPipe.
You can see is also sharing the thumbnail with "android_share_sheet_image_preview.jpg" and maybe is what VLC is taking instead the Youtube URL.

1681158519952

Logs

No response

Affected Android/Custom ROM version

Android 10 (MIUI 12.0.10)

Affected device model

Xiaomi Mi 9 Lite

Additional information

Maybe is a VLC issue, but because sharing to VLC with other app works, it's the first step.

Thanks.

@LukasThyWalls LukasThyWalls added bug Issue is related to a bug needs triage Issue is not yet ready for PR authors to take up labels Apr 10, 2023
@opusforlife2
Copy link
Collaborator

Which Share button are you using?

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Apr 10, 2023
@LukasThyWalls
Copy link
Author

LukasThyWalls commented Apr 10, 2023

The "Share" options from Newpipe ("Compartir" in Spanish as their are shown in the screenshots), both the menu at a video list and the icon in the video itself brings that share dialog i uploaded in the screenshot above in the first post.

1681162497152

1681162497162

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Apr 10, 2023
@opusforlife2
Copy link
Collaborator

Wow, that's very odd. Try toggling on the External Player setting. And then use VLC.

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Apr 10, 2023
@androidfan-code
Copy link

@opusforlife2 I have the same issue.

Sharing still doesn't work after toggling the external player setting. However, if you press play in newpipe it will let you pick an external player and VLC will work but with no sound.

@SameenAhnaf
Copy link
Collaborator

VLC never supported streaming YouTube URLs through sharing. Please open a feature request on VLC repo.

For now, consider toggling on external player settings and click on thumbnail. Unfortunately, I could find no open source alternative for using "Share" option. However, KMplayer and PlayIt work.

@SameenAhnaf SameenAhnaf added wontfix This issue will not be fixed and removed bug Issue is related to a bug waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. needs triage Issue is not yet ready for PR authors to take up labels Apr 11, 2023
@opusforlife2
Copy link
Collaborator

Oh yes. (facepalm) This was the entire reason for mpv-android+yt-dlp's existence. You can download the APK from a PR in mpv-android's repo. And then Share YT URLs from Newpipe to mpv.

VLC can work as an external player because Newpipe sends it the direct Google Video stream URL, but it cannot resolve a YT URL on its own.

@opusforlife2 opusforlife2 added question Not really an issue, but more of a question about how something works and removed wontfix This issue will not be fixed labels Apr 11, 2023
@LukasThyWalls
Copy link
Author

LukasThyWalls commented Apr 11, 2023

VLC never supported streaming YouTube URLs through sharing. Please open a feature request on VLC repo.

If you open a Youtube video in Firefox Android, for example, and you use its share button to "Play with VLC", VLC Android plays the Youtube video. So, in fact it supports it.

Other thing is it works very weird and it has issues (sometimes doesn't play, other times only plays the audio and you need to bring the video doing a long press, and normally it takes a long time to do something), but they are in the VLC end and i'm not talking about that.

But i understand you point, in fact i never tried the "external player" thing, and using that the videos plays in VLC nicer and faster (except for the known audio missing thing), for sure because Newpipe exposes the video/audio data streams to VLC. But it's so cumbersome to enable and disable every time in settings when you want to use or not that's is not useful.

So if sharing it it's not an option and using a external player is the best way to do it, having an icon to do it alongside the share and open in browser icons, but that's something covered in #3642.

Also one of the big points to do it is to cast the video to Chromecast easily, so it can help with other feature requests like #668 and #7361.

Thanks!

@opusforlife2
Copy link
Collaborator

Ah. Could you try other media players that can stream links? e.g. mpv-android (non yt-dlp).

@LukasThyWalls
Copy link
Author

LukasThyWalls commented Apr 11, 2023

Ah. Could you try other media players that can stream links? e.g. mpv-android (non yt-dlp).

I installed mpv-android from f-droid, and sharing youtube urls from Newpipe or Firefox doesn't matter, they doesn't work, mpv-android open and closes instantly.
Using mpv-android as external player in Newpipe works normally and it plays the video.

Looking the logcat when trying to share to mpv-android from Newpipe, there are lines about mpv-android trying to open the Youtube URL, failing, and then trying to look up for youtube-dl in PATH, and failing again.

I look up also what appears in logcat when share the video from Newpipe to VLC, and there isn't any URL at any moment, however you can see this:

04-11 23:07:27.298 I/ActivityTaskManager( 1656): START u0 {act=android.intent.action.SEND typ=text/plain flg=0xb080001 cmp=org.videolan.vlc/.StartActivity clip={image/jpeg U:content://org.schabi.newpipe.provider/root/data/data/org.schabi.newpipe/cache/android_share_sheet_image_preview.jpg} (has extras)} from uid 10347

And doing some testing trying to share from Newpipe to different apps you can see this:

  • Sharing to a browser (Firefox): It opens the video URL.
  • Sharing to a file explorer (CX File Explorer): It tries to save a text file with the title of the video as filename, and as content it has the URL.
  • Sharing to a Twitter Direct Message (Twitter): Creates a draft message with title first and URL second.
  • Sharing to a Tweet (Twitter): Generates a draft tweet with only the URL.
  • Sharing to a Tweet (Twidere): Generates a draft tweet with the template "Title - URL".
  • Sharing to Whatsapp: Creates a message with only the URL.
  • Sharing to Notes: Creates a note with only the URL.
  • Sharing to a mail app (K-9 Mail): It opens a new mail with the title as Subject, and the URL as main content.
  • Sharing to mpv-android: It tries to open the URL (but fails).
  • Sharing to VLC: opens the thumbnail 🤷 .

So in the end, is an issue in VLC of not handling the data from the action correctly, taking the thumbnail as the shared data (because it can render it) and not taking the URL what is the desired thing to share, although maybe the way that MIUI do the sharing is part of the issue too, i don't know...

@opusforlife2
Copy link
Collaborator

I think it would be worth it to open an issue in the VLC tracker. And drop a link to it here. :D

@LukasThyWalls
Copy link
Author

I think it would be worth it to open an issue in the VLC tracker. And drop a link to it here. :D

Created here https://code.videolan.org/videolan/vlc-android/-/issues/2908

Thanks!

@al12gamer

This comment was marked as duplicate.

@opusforlife2
Copy link
Collaborator

@al12gamer Comment on the VLC tracker, not here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Not really an issue, but more of a question about how something works
Projects
None yet
Development

No branches or pull requests

5 participants