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 103 forks source link

Weird behavior #302

Closed trimechee closed 11 months ago

trimechee commented 11 months ago

Hello, how are you ?

I noticed during the last weeks strange unusual behavior, I use the "worstaudio" preset to download audio from youtube videos but the downloaded files no longer have the "m4a" extension, the downloaded files now have the 'mp4' extension, I said to myself, have I downloaded videos? I open the downloaded files with potplayer and I hear whispers and it shows me the duration of each downloaded file is 90 hours! I was scared, I open the same file with foorbar2000, I can open and listen to the downloaded files in a normal and audible way unlike potplayer but I can no longer move in the file and move the cursor in the downloaded file , and the length of the file is no longer displayed in foobar2000....it's very strange, we hope we can download audio file with the extension m4a or opus as we did previously, thank you very much!

mhogomchungu commented 11 months ago

Post a link i can use to test, the problem is probably caused by a change of yt-dlp's default audio codec and you now have to manually specify what audio codec you want to download to override the default.

I started experiencing the same problem with videos a few weeks ago when i started getting videos with vp9 codec instead of avc codec and i added a preset option in MD to specify i want to download videos with avc codec.

trimechee commented 11 months ago

Oh very interesting! I think I will have to use the Media-Dowloader default presets like "audio only best available in youtube" even i hope to download worst audio quality.....

now the problem is sometimes in the facebook videos, several times I tried with the "worstaudio" preset to download the audio from the facebook videos and it shows me there is an error and it is impossible to download the facebook videos so I have had to use a site like gatvideo.at.....

I often listen to audio from facebook videos because many tv and radio channels put videos on their facebook pages which are not present in their youtube channels so I have to use facebook and we hope our beloved Media-Downloader will add preset to download audio from facebook in order to simplify our task on this facebook site as famous as youtube, thank you very much :)

an example of video where I can no longer move inside: it is the same type of video that I use previously, a video from the youtube channel of a radio:

https://www.youtube.com/watch?v=5NoHi9Rn_7w

trimechee commented 11 months ago

Hello, j'ai essayé d'ajouter ce preset pour supprimer les embed thumbnails "-f bestaudio -x" pour télécharger l'audio de cette video :

https://www.youtube.com/watch?v=Hes3HR9F7eI

je suis resté attentif au comportement du téléchargement, j'ai remarqué chose étonnante : quand le téléchargeemnt atteint les 90%, le téléchargement s'annule et s'efface et je vois 0% puis le téléchargement s'active de nouveau et là j'ai pu télélcharger l'audio de façon normale, donc si je supprime "--embed-thumbnail", il peut y avoir des conséquences et je télécharge le fichier en double ?

mhogomchungu commented 11 months ago

To get an audio only file with .m4a extension, add MD preset option with a yt-dlp option of -f worstaudio[ext=m4a]

I do not have a facebook account so i can not test what options they have for their media files but you can not use "worstaudio" option if facebook does not offer audio only media.

Add a facebook URL on batch downloader tab and then right click the entry and select "show media options" and check if there is an entry for audio only media.

I can not make sense of your French comment.

trimechee commented 11 months ago

Sorry, i forget to translate :

Hello, I tried to add this preset to remove embed thumbnails "-f bestaudio -x" to download the audio of this video:

https://www.youtube.com/watch?v=Hes3HR9F7eI

I remained attentive to the behavior of the download, I noticed a surprising thing: when the download reached 90%, the download is canceled and erased and I see 0% then the download is activated again and there I I was able to download the audio in the normal way, so if I remove "--embed-thumbnail", there may be consequences and I download the file twice?

trimechee commented 11 months ago

Great ! Thank you for yout help :) 🥇

i think we can watch facebook video even if we not have account, i tested without account in fb and i can see the videos :

https://www.facebook.com/aljanoubiatv.officielle/videos

mhogomchungu commented 11 months ago

What did the log say? I am getting below output here

[media-downloader] cmd: "/home/ink/.local/share/media-downloader/bin/yt-dlp" "--match-filter" "!playlist" "--break-on-reject" "--newline" "--ignore-config" "--no-playlist" "-o" "%(title).200s-%(id)s.%(ext)s" "--output-na-placeholder" "NA" "-f" "bestaudio" "-x" "--compat-options" "2022" "--progress-template" "download:[download] {"filename":"%(progress.filename)s","downloaded_bytes":"%(progress.downloaded_bytes)s","ETA":"%(progress.eta)s","total_bytes_estimate":"%(progress.total_bytes_estimate)s","total_bytes":"%(progress.total_bytes)s","speed":"%(progress.speed)s","fragment_index":"%(progress.fragment_index)s","fragment_count":"%(progress.fragment_count)s"}" "https://www.youtube.com/watch?v=Hes3HR9F7eI"
[youtube] Extracting URL: https://www.youtube.com/watch?v=Hes3HR9F7eI
[youtube] Hes3HR9F7eI: Downloading webpage
WARNING: [youtube] Unable to download webpage: <urlopen error [Errno -3] Temporary failure in name resolution>
[youtube] Hes3HR9F7eI: Downloading ios player API JSON
[youtube] Hes3HR9F7eI: Downloading android player API JSON
[youtube] Hes3HR9F7eI: Downloading iframe API JS
[youtube] Hes3HR9F7eI: Downloading player 0e6aaa83
[youtube] Hes3HR9F7eI: Downloading web player API JSON
[youtube] Hes3HR9F7eI: Downloading m3u8 information
[youtube] Hes3HR9F7eI: Downloading initial data API JSON
[info] Hes3HR9F7eI: Downloading 1 format(s): 251
[download] Destination: عودة لمشاركة الترجي والنادي الصفاقسي الاتحاد المنستيري في بطولة الملك سلمان-Hes3HR9F7eI.webm
[download] 12.66 MiB / 12.66 MiB (100%) at 627.06 KiB/s, ETA NA
[ExtractAudio] Destination: عودة لمشاركة الترجي والنادي الصفاقسي الاتحاد المنستيري في بطولة الملك سلمان-Hes3HR9F7eI.opus
[media-downloader] Download Completed Successfully

First a webm file is downloaded because of -f bestaudio and then audio is extracted to opus audio file because of -x option. No redownloading is taking place here.

Logs are always produced so look at them if something happens in the UI and you want to now more about it.

mhogomchungu commented 11 months ago

I tried this link and i successfully downloaded an audio only file with -f worstaudio so it works if a URL has audio only files among other files.

[media-downloader] cmd: "/home/ink/.local/share/media-downloader/bin/yt-dlp" "--match-filter" "!playlist" "--break-on-reject" "--newline" "--ignore-config" "--no-playlist" "-o" "%(title).200s-%(id)s.%(ext)s" "--output-na-placeholder" "NA" "-f" "worstaudio" "--compat-options" "2022" "--progress-template" "download:[download] {"filename":"%(progress.filename)s","downloaded_bytes":"%(progress.downloaded_bytes)s","ETA":"%(progress.eta)s","total_bytes_estimate":"%(progress.total_bytes_estimate)s","total_bytes":"%(progress.total_bytes)s","speed":"%(progress.speed)s","fragment_index":"%(progress.fragment_index)s","fragment_count":"%(progress.fragment_count)s"}" "https://www.facebook.com/aljanoubiatv.officielle/videos/%D8%B9%D9%84%D9%89-%D9%88%D9%82%D8%B9-%D8%B8%D8%A7%D9%87%D8%B1%D8%A9-%D8%A7%D9%84%D8%A7%D8%AD%D8%AA%D9%83%D8%A7%D8%B1-%D9%88%D8%A7%D9%84%D9%85%D8%B6%D8%A7%D8%B1%D8%A8%D8%A9-%D8%B7%D8%A8%D9%82%D9%88%D8%A7-%D8%A7%D9%84%D9%82%D8%A7%D9%86%D9%88%D9%86%D9%81%D9%82%D8%B7-%D9%84%D8%A7-%D8%BA%D9%8A%D8%B1/996231761229020"
[facebook] Extracting URL: https://www.facebook.com/aljanoubiatv.officielle/videos/%D8%B9%D9%84%D9%89-%D9%88%D9%82%D8%B9-%D8...8%B1/996231761229020
[facebook] 996231761229020: Downloading webpage
[info] 996231761229020: Downloading 1 format(s): 393209465593959a
[download] Destination: على وقع ظاهرة الاحتكار والمضاربة: طبقوا القانون...فقط لا غير-996231761229020.m4a
[download] 1,022.94 KiB / 1,022.94 KiB (100%) at 308.17 KiB/s, ETA NA
[FixupM4a] Correcting container of "على وقع ظاهرة الاحتكار والمضاربة: طبقوا القانون...فقط لا غير-996231761229020.m4a"
[media-downloader] Download Completed Successfully
trimechee commented 11 months ago

Yes, i will try to find ad dowload long videos and i will try to supervise the download bevavior and post the logs, thank you :)