mhogomchungu / media-downloader

Media Downloader is a Qt/C++ front end to yt-dlp, youtube-dl, gallery-dl, lux, you-get, svtplay-dl, aria2c, wget and safari books..
GNU General Public License v2.0
1.34k stars 101 forks source link

Would like to consider the Mac version #401

Closed SONGjiemo closed 1 month ago

SONGjiemo commented 1 month ago

I want to consider versions for other platforms, such as the Mac version.

mhogomchungu commented 1 month ago

Doable and it will involve adding an entry for mac build in the below link.

https://github.com/mhogomchungu/media-downloader-git/blob/main/.github/workflows/publish.yml

SONGjiemo commented 1 month ago

可行的,它将涉及添加一个条目为mac建立在下面的链接。

https://github.com/mhogomchungu/media-downloader-git/blob/main/.github/workflows/publish.yml

Hello, I can't read this thing. I'm not a developer and don't know how to code. I hope you can provide the DMG installation package for Mac directly

mhogomchungu commented 1 month ago

The point i was trying to make is that i do not have a Mac and therefore i can not make Mac build locally but i can make them using github's infrastructure.

griha41 commented 1 month ago

可行的,它将涉及添加一个条目为mac建立在下面的链接。

https://github.com/mhogomchungu/media-downloader-git/blob/main/.github/workflows/publish.yml

Hello, I can't read this thing. I'm not a developer and don't know how to code. I hope you can provide the DMG installation package for Mac directly

Mate the idea of developing for Mac means that you shall have the Mac device and publisher license costs about $100 per year.

"An individual membership will cost you $99 USD per year, which is a steep price to pay if you aren’t sure you’ll be able to recoup that investment, which would largely come in the form of app purchases. Developers keep 70% of sales proceeds unless enrolled in the App Store Small Business Program, which allows them to keep 85%." Based on article: https://www.techrepublic.com/article/the-apple-developer-program-what-professionals-need-to-know/

mhogomchungu commented 1 month ago

Download "media-downloader.img" from below link and check if it runs or not.

Yt-dlp is bundled and not sure if ffpmeg need to be bundled too.

https://github.com/mhogomchungu/media-downloader-git/releases/tag/0.0.0

SONGjiemo commented 1 month ago

Download "media-downloader.img" from below link and check if it runs or not.

Yt-dlp is bundled and not sure if ffpmeg need to be bundled too.

https://github.com/mhogomchungu/media-downloader-git/releases/tag/0.0.0

The problems found are as follows 1、There is no default configuration, preferably the default is 1080 mp4 image 2、The win version can be downloaded directly from the M3U8 link. Mac can't 3、Clicking has no effect, and there is no one to configure image 4、Clicking has no effect and cannot be edited image

mhogomchungu commented 1 month ago

Great, it works.

Lets start with youtube first.

You will get higher qualities in youtube if ffmpeg is installed. When you start Media Downloader, it will tell you if it found ffmpeg or not, and can you post the output of basic tab when the app is started so that i can see what error is shown when ffmpeg is not found.

Leaving downloading options text field empty is the same as telling yt-dlp to download the highest quality possible and you will get the highest available only when ffmpeg is detected.

The "Options" button is the one to click if you want to select a specific video resolution you want.

SONGjiemo commented 1 month ago

Great, it works.

Lets start with youtube first.

You will get higher qualities in youtube if ffmpeg is installed. When you start Media Downloader, it will tell you if it found ffmpeg or not, and can you post the output of basic tab when the app is started so that i can see what error is shown when ffmpeg is not found.

Leaving downloading options text field empty is the same as telling yt-dlp to download the highest quality possible and you will get the highest available only when ffmpeg is detected.

The "Options" button is the one to click if you want to select a specific video resolution you want.

[media-downloader] Failed to find executable "ffmpeg"v image Shows No File Found

mhogomchungu commented 1 month ago

Download macos version again and check if ffmpeg is now present and you can download lux binary from within Media Downloader.

SONGjiemo commented 1 month ago

Download macos version again and check if ffmpeg is now present and you can download lux binary from within Media Downloader. image It is not possible to download YouTube files at this time

[media-downloader] cmd: "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp" "--downloader" "ffmpeg" "--ignore-config" "--no-playlist" "-o" "%(title).200s-%(id)s.%(ext)s" "--newline" "--output-na-placeholder" "NA" "-f" "bestvideo[ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/best[ext=mp4]/best" "--compat-options" "2022" "--encoding" "https://github.com/mhogomchungu/media-downloader/releases/download/2.2.0/yt-dlp-aria2c.json" "https://www.youtube.com/watch?v=w5HiVn_UDwk" Traceback (most recent call last): File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1606, in wrapper File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1741, in extract_info File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/extractor/common.py", line 732, in extract File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/extractor/common.py", line 1194, in to_screen File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 924, in to_screen File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 905, in _write_string File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/utils/_utils.py", line 1438, in write_string LookupError: unknown encoding: https://github.com/mhogomchungu/media-downloader/releases/download/2.2.0/yt-dlp-aria2c.json During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/main.py", line 17, in File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/init.py", line 1072, in main File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/init__.py", line 1062, in _real_main File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3572, in download File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 3547, in wrapper File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1595, in extract_info File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1627, in wrapper File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 1073, in report_error File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 992, in trouble File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 934, in to_stderr File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/YoutubeDL.py", line 905, in _write_string File "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp/yt_dlp/utils/_utils.py", line 1438, in write_string LookupError: unknown encoding: https://github.com/mhogomchungu/media-downloader/releases/download/2.2.0/yt-dlp-aria2c.json [media-downloader] Download Failed(ErrorCode=1)

mhogomchungu commented 1 month ago

The "--encoding" option you are passing to yt-dlp i suspect is causing the error you are getting.

Screenshot_20240518_203850

SONGjiemo commented 1 month ago

The "--encoding" option you are passing to yt-dlp i suspect is causing the error you are getting.

Screenshot_20240518_203850

How can I solve the problem? Can you update the version to solve the problem?

mhogomchungu commented 1 month ago

You must have entered the option in a text field pointed to in the below image, clear the text field and try again to download something from youtube.

Screenshot_20240519_131422

SONGjiemo commented 1 month ago

You must have entered the option in a text field pointed to in the below image, clear the text field and try again to download something from youtube.

Screenshot_20240519_131422

Unfortunately, I don't know where to fill out the instructions. My software then you are blank. But I think it’s ok if you choose the download engine. Why do you need to fill in this superfluously? I hope it can be removed in subsequent updates.

And look forward to sending me a yt-dlp address

mhogomchungu commented 1 month ago

There is something you did to cause Media Downloader to pass "--encoding" option to yt-dlp. If you do not remember how you did it and how to undid it, then close Media Downloader, delete a folder circled in the below image and start again Media Downloader.

Test if you can download from youtube without making any application configuration changes.

Also test if you can change application language with this being the only configuration change you make.

Its hard to make sense of what you are seeing when you make changes i do not anticipate you making.

Screenshot_20240519_135420

SONGjiemo commented 1 month ago

There is something you did to cause Media Downloader to pass "--encoding" option to yt-dlp. If you do not remember how you did it and how to undid it, then close Media Downloader, delete a folder circled in the below image and start again Media Downloader.

Test if you can download from youtube without making any application configuration changes.

Also test if you can change application language with this being the only configuration change you make.

Its hard to make sense of what you are seeing when you make changes i do not anticipate you making.

Screenshot_20240519_135420 I can't see clearly, the directory in the screenshot. Hope you copy it

mhogomchungu commented 1 month ago

Start Media Downloader, go to the "basic downloader" tab and then look at the "App Data Path" line and its entry is the directory to delete.

SONGjiemo commented 1 month ago

Start Media Downloader, go to the "basic downloader" tab and then look at the "App Data Path" line and its entry is the directory to delete.

has been deleted. Problem solved. I made a post beautifying your software UI. Hopefully, you'll think about the aesthetics of your UI. https://github.com/mhogomchungu/media-downloader/issues/403

mhogomchungu commented 1 month ago

Yes, i have seen it and will respond later, can you check if you can change the application language.

SONGjiemo commented 1 month ago

Yes, i have seen it and will respond later, can you check if you can change the application language.

image You can switch languages

mhogomchungu commented 1 month ago

I noticed something in your output that should not be there.

You are using "yt-dlp" instead of "yt-dlp_macos".

Can you do the following to test the new code.

  1. Close Media Downloader.
  2. Delete the "App Data Path" folder again.
  3. Redownload Media Downloader.
  4. Download something from youtube and check what is the name of yt-dlp binary that is used.
SONGjiemo commented 1 month ago

I noticed something in your output that should not be there.

You are using "yt-dlp" instead of "yt-dlp_macos".

Can you do the following to test the new code.

  1. Close Media Downloader.
  2. Delete the "App Data Path" folder again.
  3. Redownload Media Downloader.
  4. Download something from youtube and check what is the name of yt-dlp binary that is used.

I followed your steps and deleted the cache first. Went to download YouTube and found a new problem.

[media-downloader] cmd: "/Users/song/Library/Application Support/media-downloader/bin/yt-dlp" "--newline" "--ignore-config" "--no-playlist" "-o" "%(title).200s-%(id)s.%(ext)s" "--output-na-placeholder" "NA" "-f" "bestvideo[ext=mp4][vcodec^=avc]+bestaudio[ext=m4a]/bestvideo[ext=mp4]+bestaudio[ext=m4a]/bestvideo+bestaudio/best[ext=mp4]/best" "--compat-options" "2022" "--progress-template" "download:[download] downloaded_bytes:%(progress.downloaded_bytes)s ETA:%(progress.eta)s total_bytes_estimate:%(progress.total_bytes_estimate)s total_bytes:%(progress.total_bytes)s progress.speed:%(progress.speed)s filename:%(progress.filename)s" "https://www.youtube.com/watch?v=wRhqtMhC_zU&list=PL9r1366jCphKmqdj5PqtjnESvu0MrVH6Q&index=8" [youtube:tab] Extracting URL: https://www.youtube.com/watch?v=wRhqtMhC_zU&list=PL9r1366jCphKmqdj5PqtjnESvu0MrVH6Q&index=8 [youtube:tab] Downloading just the video wRhqtMhC_zU because of --no-playlist [youtube] Extracting URL: https://www.youtube.com/watch?v=wRhqtMhC_zU [youtube] wRhqtMhC_zU: Downloading webpage [youtube] wRhqtMhC_zU: Downloading ios player API JSON [youtube] wRhqtMhC_zU: Downloading android player API JSON WARNING: [youtube] Skipping player responses from android clients (got player responses for video "aQvGIIdgFDM" instead of "wRhqtMhC_zU") [youtube] wRhqtMhC_zU: Downloading m3u8 information [info] wRhqtMhC_zU: Downloading 1 format(s): 135+140 [download] Destination: 少年張三丰 第6集 (張衛健、蘇有朋、李冰冰)-wRhqtMhC_zU.f135.mp4 [download] 241.58 MiB / 241.58 MiB (100%) at 1.46 MiB/s, ETA NA [download] Destination: 少年張三丰 第6集 (張衛健、蘇有朋、李冰冰)-wRhqtMhC_zU.f140.m4a [download] 29.25 MiB / 41.40 MiB (70.65%) at 3.33 MiB/s, ETA 00:03 [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (1/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (2/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (3/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (4/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (5/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (6/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (7/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (8/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (9/10)... [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Retrying (10/10)... ERROR: [download] Got error: EOF occurred in violation of protocol (_ssl.c:1129). Giving up after 10 retries [media-downloader] Download Failed(ErrorCode=1)

mhogomchungu commented 1 month ago

That is a network related problem and is not caused by Media Downloader. did you change your network configuration while downloading like changing your network to start using a proxy server?

I provide both media-downloader.app.zip and media-downloader.dmg for MacOS, which one do you use and why.

SONGjiemo commented 1 month ago

https://github.com/mhogomchungu/media-downloader-git/releases/tag/0.0.0

image

  1. I'm not a programmer, and I don't understand where the 2 differences are. 2. In the process of use, I did not change the agent or perform other operations. I don't know why the final stage failed
mhogomchungu commented 1 month ago

Try to download another time and it should work when the network issue sorts itself out.

Closing this one as "fixed" and thank you for your help in making macos build possible.

SONGjiemo commented 1 month ago

Try to download another time and it should work when the network issue sorts itself out.

Closing this one as "fixed" and thank you for your help in making macos build possible.

After your prompting, I switched to the proxy software. There is no problem with downloading anymore.

mhogomchungu commented 1 month ago

I think i am done now with MacOS support and would apprecatiate if you could do below steps again to make sure i did not break anything with changes i made after you last update

  1. Close Media Downloader.
  2. Delete the "App Data Path" folder again.
  3. Redownload Media Downloader.
  4. Post output of basic downloader when you run the app for the first time after updating.
  5. Download something from youtube and post output in basic downloader tab.
SONGjiemo commented 1 month ago

I think i am done now with MacOS support and would apprecatiate if you could do below steps again to make sure i did not break anything with changes i made after you last update

  1. Close Media Downloader.
  2. Delete the "App Data Path" folder again.
  3. Redownload Media Downloader.
  4. Post output of basic downloader when you run the app for the first time after updating.
  5. Download something from youtube and post output in basic downloader tab.

After testing, there is no problem with the Mac version download. However, the downloaded file is the date of the video on the website and the time the video was created. The video file I want to download is the time the video is currently downloaded. I hope this can be revised.

mhogomchungu commented 1 month ago

However, the downloaded file is the date of the video on the website and the time the video was created. The video file I want to download is the time the video is currently downloaded. I hope this can be revised.

The downloaded file will have a name specified in the "-o" option, if its different from what you want then you can change it by changing the "-o" option.

Default downloaded file name should be in the format of TITLE-ID.EXTENSION

SONGjiemo commented 1 month ago

However, the downloaded file is the date of the video on the website and the time the video was created. The video file I want to download is the time the video is currently downloaded. I hope this can be revised.

The downloaded file will have a name specified in the "-o" option, if its different from what you want then you can change it by changing the "-o" option.

Default downloaded file name should be in the format of TITLE-ID.EXTENSION

image I'm talking about the timing of this file after the video is downloaded. This is the time when the video address was obtained, not the time when the video was downloaded to the computer.

mhogomchungu commented 1 month ago

That is a problem with yt-dlp and there is nothing i can in Media Downloader do to correct it.

mhogomchungu commented 1 month ago

Hi, could you please look at below issue and assist please, If you got the same error then how did you solve it?

https://github.com/mhogomchungu/media-downloader/issues/406