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

some videos on 1tv.ru are downloaded in lower quality than the highest available, because youtube-dl fails to detect their *.m3u8 URI #13246

Closed
tolik89u opened this issue Jun 1, 2017 · 1 comment

Comments

@tolik89u
Copy link

@tolik89u tolik89u commented Jun 1, 2017

Please follow the guide below

  • You will be asked some questions and requested to provide some information, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your issue (like that [x])
  • Use Preview tab to see how your issue will actually look like

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2017.05.29. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2017.05.29

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

The following sections concretize particular purposed issues, you can erase any section (the contents between triple ---) not applicable to your issue


If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add -v flag to your command line you run youtube-dl with, copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

C:\Users\Толик>%appdata%\youtube-dlg\youtube-dl.exe --newline -i --all-subs -o "C:\Users\Толик\Youtube-DLG\%(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s" -v --ignore-config --hls-prefer-native http://www.1tv.ru/news/2017-05-31/326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--all-subs', '-o', 'C:\\Users\\Толик\\Youtube-DLG\\%(upload_date)s\\%(id)s_%(playlist_id)s - %(format)s.%(ext)s', '-v', '--ignore-config', '--hls-prefer-native', 'http://www.1tv.ru/news/2017-05-31/326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.05.29
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[1tv] 326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore: Downloading webpage
[1tv] 326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore: Downloading JSON metadata
[1tv] 326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore: Downloading m3u8 information
[download] Downloading playlist: Эфир Первого канала продолжают новые серии детектива «А у нас во дворе». Новости. Первый канал
[1tv] playlist Эфир Первого канала продолжают новые серии детектива «А у нас во дворе». Новости. Первый канал: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Invoking downloader on 'http://redirect.1tv.ru/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_3800.mp4'
[download] C:\Users\Толик\Youtube-DLG\20170531\418896_326285-efir_pervogo_kanala_prodolzhayut_novye_serii_detektiva_a_u_nas_vo_dvore - hd - unknown.mp4 has already been downloaded
[download] 100% of 1.63MiB
[download] Finished downloading playlist: Эфир Первого канала продолжают новые серии детектива «А у нас во дворе». Новости. Первый канал

C:\Users\Толик>%appdata%\youtube-dlg\youtube-dl.exe --newline -i --all-subs -o "C:\Users\Толик\Youtube-DLG\%(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s" -v --ignore-config --hls-prefer-native http://v4-dtln.1internet.tv/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--all-subs', '-o', 'C:\\Users\\Толик\\Youtube-DLG\\%(upload_date)s\\%(id)s_%(playlist_id)s - %(format)s.%(ext)s', '-v', '--ignore-config', '--hls-prefer-native', 'http://v4-dtln.1internet.tv/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.05.29
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[generic] index-f3-v1-a1: Requesting header
[generic] index-f3-v1-a1: Downloading m3u8 information
[debug] Invoking downloader on 'http://v4-dtln.1internet.tv/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8'
[download] C:\Users\Толик\Youtube-DLG\NA\index-f3-v1-a1_NA - 0 - unknown.mp4 has already been downloaded
[download] 100% of 5.74MiB
WARNING: index-f3-v1-a1: malformated aac bitstream. Install ffmpeg or avconv to fix this automatically.

C:\Users\Толик>%appdata%\youtube-dlg\youtube-dl.exe --newline -i --all-subs -o "C:\Users\Толик\Youtube-DLG\%(upload_date)s\%(id)s_%(playlist_id)s - %(format)s.%(ext)s" -v --ignore-config --hls-prefer-native http://www.1tv.ru/news/2017-05-31/326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--newline', '-i', '--all-subs', '-o', 'C:\\Users\\Толик\\Youtube-DLG\\%(upload_date)s\\%(id)s_%(playlist_id)s - %(format)s.%(ext)s', '-v', '--ignore-config', '--hls-prefer-native', 'http://www.1tv.ru/news/2017-05-31/326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek']
[debug] Encodings: locale cp1251, fs mbcs, out cp866, pref cp1251
[debug] youtube-dl version 2017.05.29
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: none
[debug] Proxy map: {}
[1tv] 326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek: Downloading webpage
[1tv] 326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek: Downloading JSON metadata
[1tv] 326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek: Downloading m3u8 information
[download] Downloading playlist: В результате теракта в дипломатическом квартале афганского Кабула погибли не менее 90 человек. Новости. Первый канал
[1tv] playlist В результате теракта в дипломатическом квартале афганского Кабула погибли не менее 90 человек. Новости. Первый канал: Collected 1 video ids (downloading 1 of them)
[download] Downloading video 1 of 1
[debug] Invoking downloader on 'http://v5-dtln.1internet.tv/video/multibitrate/video/2017/05/31/02575d04-fd46-4189-bd1d-1ea41107e97c_HD-news-2017_05_31-21_17_15_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8'
[download] C:\Users\Толик\Youtube-DLG\20170531\418882_326271-v_rezultate_terakta_v_diplomaticheskom_kvartale_afganskogo_kabula_pogibli_ne_menee_90_chelovek - hls-3922 - 1280x720.mp4 has already been downloaded
[download] 100% of 13.06MiB
WARNING: 418882: malformated aac bitstream. Install ffmpeg or avconv to fix this automatically.
[download] Finished downloading playlist: В результате теракта в дипломатическом квартале афганского Кабула погибли не менее 90 человек. Новости. Первый канал

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):

Note that youtube-dl does not support sites dedicated to copyright infringement. In order for site support request to be accepted all provided example URLs should not violate any copyrights.


Description of your issue, suggested solution and other information

When downloading videos from 1tv.ru, most videos are downloaded in the highest quality possible, as expected, but for some reason, some videos are downloaded in the low quality.

Above, I provided two examples: example ...285-...vo_dvore is the lower quality one, ...271-...90_chelovek -- high quality.
When downloading ...vo_dvore (low quality) video, youtube-dl outputs:
[debug] Invoking downloader on 'http://redirect.1tv.ru/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_3800.mp4'
, when downloading ...90_chelovek (high quality), it outputs:
[debug] Invoking downloader on 'http://v5-dtln.1internet.tv/video/multibitrate/video/2017/05/31/02575d04-fd46-4189-bd1d-1ea41107e97c_HD-news-2017_05_31-21_17_15_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8'
As you can see, their URIs are of the same form, but for some reason youtube-dl correctly detects the first *.m3u8 file location for the high quality video, but is unable to detect it for the lower quality one, therefore, it fallbacks to download it directly by *.mp4 URI. (If I understand it correctly, this is a fallback, right?)
I tried myself to open those initial URIs in browser and to play videos in video player in browser and to watch what is the difference in browser between those videos. I found that both of them are played the same, they both have high quality version. Then in dev tools I looked: what is the URI of the *.m3u8 playlist which the browser player is invoking. The low quality video had the following *.m3u8 URI: http://v4-dtln.1internet.tv/video/multibitrate/video/2017/05/31/a447ddc6-655c-4592-8e86-72dc3e717758_HD-news-2017_05_31-21_42_23_,350,950,3800,.mp4.urlset/index-f3-v1-a1.m3u8 . As you can see, it has the same form as the URI invoked by youtube-dl for the high quality video. Then I tried to download it directly by youtube-dl, and it was downloaded correctly, as it is shown in command prompt log above.

So, the "low quality video" actualy has a high quality version and youtube-dl successfully downloads it when invoked directly by manually entering *.m3u8 URI, but for some reason youtube-dl is unable itself to extract that *.m3u8 URI from the initial URI, while the player on 1tv.ru in browser successfully does that. Could you please fix that so that youtube-dl downloads such videos in the highest quality available, like it does this with other ones?

Explanation of your issue in arbitrary form goes here. Please make sure the description is worded well enough to be understood. Provide as much context and examples as possible.
If work on your issue requires account credentials please provide them or explain how one can obtain them.

@dstftw dstftw closed this in f7a747c Jun 1, 2017
@tolik89u
Copy link
Author

@tolik89u tolik89u commented Jun 4, 2017

Thank you @dstftw !
After this new version has been released today, I immediately tested your patch on videos of entire last week — and your patch works great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.