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.6k stars 119 forks source link

Wrong audio stream downloaded #299

Closed TheNorwegian closed 1 year ago

TheNorwegian commented 1 year ago

Hi gang, I'm new to MediaDownloader so maybe I am doing something wrong. Here's the problem: When I download a movie from SVTplay.se and it has multiple audio streams, MD choose the wrong one. For example, this episode has 3 audio streams:

https://www.svtplay.se/video/KRN7r54/morden-i-midsomer/3-a-grain-of-truth

Regular, Better speech, Voiced Subtitles. For this particular episode, MD has only grabbed the Voiced Subtitles track all the 10 times I have tried. For two other episodes in the same series, the Regular audio was downloaded without any problem. I have looked for settings and options but could not find anything that force MD to get only the Regular audio, nor all three so I could choose which one to use. Even when I grab audio only, MD seem to think Voiced Subtitles is the correct audio to download.

Is this a bug for SVTplay.se or a bug in MD or is there an option/setting I have not found?

Thanks.

mhogomchungu commented 1 year ago

Media Downloader is a bit of an advanced tool in a sense that it does not have many GUI options to configure its backends and it puts "download options" text field right in your face to make it easy for you to add options you want to make svtplay-dl in your case do what you want without asking me to first add the functionality for you.

Back to your problem:-

  1. Switch to batch downloader tab.
  2. Put the url of the video you want to download in the "URL" text field.
  3. Click "add to the list".
  4. Right click the entry and then select "Show media options".
  5. One of the entries in that list should have the language you want to download.
  6. Go to basic downloader tab and then copy and paste all the text in the window so that i can see what you are seeing. I can not test on that video because it is available in sweden only.
TheNorwegian commented 1 year ago

Hi, Thanks for your reply. When I go to the media options, I get a list of 111 (one hundred and eleven) different options, of which 16 are audio related. I guess I did not inspect each of them carefully enough, because I found two media options that, when combined, turned out to have the wanted video and audio.

It looks to me that SVTplay.se is adding the streams in random order to each episode, as MD sometimes catchess the right audio and sometimes not. Although when I play back from their website, normal audio is always default.

Anyway, by choosing the right media options I can now download as expected. If you are still interested in the text that is generated with faulty downloads, let me know, I will then replicate the error.

mhogomchungu commented 1 year ago

I still would like to see the output.

There is an option --audio-language that you can set to tell MD what audio to automatically select for you. Manually choosing what media to download that has the correct audio before downloading will get annoying very quickly if you download too often.

TheNorwegian commented 1 year ago

Here's an example of the report from a finished download that got the wrong audio track. Wrong as in, not the normal stereo track but the Voiced Subtitles track.

I looked around to find that audio setting, but could not find a place to set it as default. I mean, I don't understand where to find it that place and what code to write there.


[media-downloader] cmd: "C:/Users/xxxxx/AppData/Roaming/media-downloader//bin/yt-dlp.exe" "--newline" "--ignore-config" "--no-playlist" "-o" "%(title).200s-%(id)s.%(ext)s" "--output-na-placeholder" "NA" "--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.svtplay.se/video/KM66BDD/once-upon-a-time-in-america?id=KM66BDD" [SVTPlay] Extracting URL: https://www.svtplay.se/video/KM66BDD/once-upon-a-time-in-america?id=KM66BDD [SVTPlay] KM66BDD: Downloading JSON metadata [SVTPlay] KM66BDD: Downloading m3u8 information [SVTPlay] KM66BDD: Downloading m3u8 information [SVTPlay] KM66BDD: Downloading MPD manifest [SVTPlay] KM66BDD: Downloading m3u8 information [SVTPlay] KM66BDD: Downloading MPD manifest [SVTPlay] KM66BDD: Downloading m3u8 information [SVTPlay] KM66BDD: Downloading m3u8 information [info] KM66BDD: Downloading 1 format(s): dash-hbbtv-hevc-0+dash-hbbtv-hevc-4 [dashsegments] Total fragments: 3433 [download] Destination: Once upon a time in America-KM66BDD.fdash-hbbtv-hevc-0.mp4 [download] 967,35 MiB / ~4,79 GiB (19.72%) at 106,47 KiB/s, ETA 10:31:15 [download] Got error: Downloaded 1207524 bytes, expected 1215668 bytes. Retrying (1/10)... [download] 1,08 GiB / ~4,81 GiB (22.43%) at 108,77 KiB/s, ETA 09:59:14 [download] Got error: Downloaded 937015 bytes, expected 947695 bytes. Retrying (1/10)... [download] 1,34 GiB / ~4,90 GiB (27.35%) at 308,62 KiB/s, ETA 03:21:40 [download] Got error: Downloaded 2269821 bytes, expected 2271845 bytes. Retrying (1/10)... [download] 2,13 GiB / ~4,95 GiB (43.02%) at 154,89 KiB/s, ETA 05:18:09 [download] Got error: Downloaded 1207993 bytes, expected 1216137 bytes. Retrying (1/10)... [download] 2,38 GiB / ~4,99 GiB (47.71%) at 139,01 KiB/s, ETA 05:28:09 [download] Got error: Downloaded 1276524 bytes, expected 1288644 bytes. Retrying (1/10)... [download] 3,52 GiB / ~4,91 GiB (71.69%) at 172,45 KiB/s, ETA 02:20:50 [download] Got error: Downloaded 1015794 bytes, expected 1031986 bytes. Retrying (1/10)... [download] 4,76 GiB / 4,76 GiB (100%) at 2,91 MiB/s, ETA NA [dashsegments] Total fragments: 3433 [download] Destination: Once upon a time in America-KM66BDD.fdash-hbbtv-hevc-4.m4a [download] 76,55 MiB / ~702,64 MiB (10.89%) at 33,38 KiB/s, ETA 05:20:07 [download] Got error: Downloaded 213160 bytes, expected 215184 bytes. Retrying (1/10)... [download] 508,52 MiB / ~704,22 MiB (72.21%) at 23,83 KiB/s, ETA 02:20:08 [download] Got error: Downloaded 213160 bytes, expected 215184 bytes. Retrying (1/10)... [download] 704,30 MiB / 704,30 MiB (100%) at 863,20 KiB/s, ETA NA [Merger] Merging formats into "Once upon a time in America-KM66BDD.mp4" [media-downloader] Download Completed Successfully