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

[BUG] Cannot add video from url #196

Closed
turtton opened this issue Feb 4, 2024 · 8 comments
Closed

[BUG] Cannot add video from url #196

turtton opened this issue Feb 4, 2024 · 8 comments
Labels
bug Something isn't working Reproduced

Comments

@turtton
Copy link
Owner

turtton commented Feb 4, 2024

Describe the bug
A clear and concise description of what the bug is.
バグの内容の簡素な説明

SSIA. I tried yt and soundcloud but both failed.

To Reproduce
Steps to reproduce the behavior(再現手順):

  1. Go to Videolist
  2. Click plus button
  3. Input any url(I tried this and this
  4. Failed to import video/music data
Download failed. Url: https://soundcloud.com/letiamash/bi-doromoyou-letiamash-bootleg-fc-anicommune-vol3
com.yausername.youtubedl_android.YoutubeDLException: WARNING: ffmpeg-location /data/app/~~HQaWloV2J1jgE0yKCH51uQ==/net.turtton.ytalarm-F5COsz8ucuQ5LZfo6WOpZA==/lib/x86_64/libffmpeg.so does not exist! Continuing without ffmpeg
ERROR: [soundcloud] None: Unable to download JSON metadata: <urlopen error [Errno 7] No address associated with hostname> (caused by URLError(gaierror(7, 'No address associated with hostname')))
                                                                                                    
at com.yausername.youtubedl_android.YoutubeDL.execute(YoutubeDL.kt:202)
at com.yausername.youtubedl_android.YoutubeDL.execute$default(YoutubeDL.kt:141)
at net.turtton.ytalarm.worker.VideoInfoDownloadWorker.download(VideoInfoDownloadWorker.kt:106)
at net.turtton.ytalarm.worker.VideoInfoDownloadWorker.doWork(VideoInfoDownloadWorker.kt:66)
at net.turtton.ytalarm.worker.VideoInfoDownloadWorker$doWork$1.invokeSuspend(Unknown Source:20)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)

Related code:

YoutubeDL.getInstance().execute(request) { _, _, _ -> }

Expected behavior
A clear and concise description of what you expected to happen.
期待した挙動

Success import

Screenshots
If applicable, add screenshots to help explain your problem.
スクリーンショット(あれば)

image

Smartphone (please complete the following information):
バグが発生した端末の情報

  • Device: Google Pixel5(Emulator
  • OS: Android 13(API 33)
  • Application Version(is it the latest version?) latest commit 1b21e6d

Additional context
Add any other context about the problem here.
その他追加で情報があればここに

@turtton turtton added bug Something isn't working require testing Need to make sure it can be reproduced. Reproduced and removed require testing Need to make sure it can be reproduced. labels Feb 4, 2024
@TechPro424
Copy link

Does this occur when trying to download from YT rather than soundcloud?

@turtton
Copy link
Owner Author

turtton commented Feb 4, 2024

I tried yt and soundcloud but both failed.

@turtton
Copy link
Owner Author

turtton commented Feb 4, 2024

It looks changed youtubedl-android behavior but I cannot find cause.
yt-dlp in command line looks not changed

┌─[turtton@tArchDesktop] - [~] - [日  2月 04, 19:33]
└─[$] <> URL=https://soundcloud.com/letiamash/bi-doromoyou-letiamash-bootleg-fc-anicommune-vol3                                                                                                             
┌─[turtton@tArchDesktop] - [~] - [日  2月 04, 19:33]
└─[$] <> yt-dlp --dump-single-json -f b $URL | jq '. | {id: .id, title: .fulltitle, type: ._type, thumbnailId: .thumbnail, url: .webpage_url, video_url: .url, domain: .webpage_url_domain}'
{
  "id": "1555258468",
  "title": "[Buy→FreeDL] ビードロ模様 (Letiamash Bootleg) [F/C AniCommune vol.3]",
  "type": "video",
  "thumbnailId": "https://i1.sndcdn.com/artworks-sk1NdKfzy5iLWECy-RUIfSg-original.jpg",
  "url": "https://soundcloud.com/letiamash/bi-doromoyou-letiamash-bootleg-fc-anicommune-vol3",
  "video_url": "https://cf-media.sndcdn.com/y5GWykGsLML5.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLW1lZGlhLnNuZGNkbi5jb20veTVHV3lrR3NMTUw1LjEyOC5tcDMqIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNzA3MDQzMjExfX19XX0_&Signature=S9myuxdba5UBdDa6x1SwLj~w5aOAkWJm7JaDmOr0gwx0v32igvH7uqUmzJ0WpyYFUE80Mx1lordg2zJqv0w0jwvrYZLAeNZGJmS2BQl33pTQAzi6e~YzXvHixMA75TEcvt7E4Tx3jCssGSCbJzJ1t5yFeldNJkuY8PAmovB04NpOtMZYVNlAMqDJxJEnXRxUeTC1vM2Ui~wIntGF6CYjTSMdiC~BZXBfL0uLA1jEHf3vkK8U0bDHE11hn9zUQKjN5xOSEUujALxIp-9QKPVltflOV5jg0VcxFjwuVkuxO1BFLX5~qB77~w2s~9N6WBfwXf7nzdQTju-Wr4FkYA27qg__&Key-Pair-Id=APKAI6TU7MMXM5DG6EPQ",
  "domain": "soundcloud.com"
}

@turtton
Copy link
Owner Author

turtton commented Feb 4, 2024

I tested in physical device GooglePixel6a(Android 14) and succeed importing YT and soundcloud, but failed to play YT video(soundcloud musics were played.
Emulator sometimes fails to resolve DNS....🤔

@TechPro424
Copy link

TechPro424 commented Feb 11, 2024

I created a library that's an abstraction for https://github.com/sealedtx/java-youtube-downloader and makes it extremely easy to download YT videos using Java
It's here: https://github.com/TechPro424/JavaYTDL

I've set up an action to publish it to GitHub Packages, and one package has been published, but I don't know how to let people use it
See https://github.com/TechPro424/JavaYTDL/packages/2064891?version=unspecified

If you know how, please let me know so I can add that to a README

@turtton
Copy link
Owner Author

turtton commented Feb 11, 2024

MavenRegistry on Github is not recommended to use as it always requires authentication to import dependency.

YtAlarm uses youtubedl-android to support various websites and I have no plans to change to other libraries.

@TechPro424
Copy link

Then you could create an issue on their repo, and maybe temporarily use my library with https://jitpack.io/

@turtton
Copy link
Owner Author

turtton commented Mar 18, 2024

I do not know why, but everything looks work fine for now, so close this issue.

@turtton turtton closed this as completed Mar 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Reproduced
Projects
None yet
Development

No branches or pull requests

2 participants