Owczar
10 Październik 2021 20:42
1
Cześć,
Na mojej bramce DEV3 pojawia się problem przerywania dźwięku co ok 25 sek na jakieś 5sek. Pasek idzie do przodu, dzwięk ustaje, a po chwili wraca te 5 sek do tyłu i zaczyna grać. Bramka podpięta optykiem do amplitunera. Wiele zależy od utworu.
Zrobiłem nawet update bramki, ale bez zmian…
Podczas odtwarzania radia nie ma tego problemu. Czasem problem ustaje na jakiś czas, ale wraca. W logach nie widać błędów. Gdzie mogę poszukać logów dotyczących samego media playera?
1 polubienie
Owczar
11 Październik 2021 13:13
2
Podpowie ktoś jak działa media extractor? Gdzie można sprawdzić config lub go zmienić?
Dawno nic mnie tak nie irytowało jak przerywająca muzyka…
Owczar
11 Październik 2021 13:19
4
Dzięki. To widziałem, ale by default nie ma configu dla media extractora w configuration.yaml stąd moje poszukiwania w jaki sposób jest to odpalane.
Rozumiem, że jak dodam wpis to obowiazujący będzie config, który mu podam?
Owczar
11 Październik 2021 13:31
5
Wpis jak niżej rozwiązał problem:
media_extractor:
default_query: bestaudio[ext=m4a]/bestaudio[ext=ogg]/bestaudio
1 polubienie
jolka
11 Październik 2021 13:35
6
tak, tak właśnie możesz nadpisać naszą konfigurację
super
paciuk
11 Październik 2021 15:42
7
Tak zapytam. Jak się uruchamia YouTube na bramce? Czy muszę zainstalować YouTube z poziomu android na bramce?
Owczar
12 Październik 2021 07:58
8
Ja używam tylko do odtwarzania muzyki. Wystarczy wpisać youtube i nazwa utworu.
Taka funkcjonalnosc jest juz wbudowana.
Ograniczyłeś się do audio (zapewne nie korzystasz z video na bramce) więc nieco zmniejszyłeś transfer i mieścisz się z buforem w limicie wprowadzonym przez youtube ~80kB/s.
Ale czy na pewno nie przycina przy każdym źródle?
Od jakiegoś czasu mają z tym problem wszystkie popularne youtube-downloader’y, bo wyliczanie nowego parametru “n” nie jest takie proste. Jest nawet fork do youtube-dl’a o nazwie yt-dlp, w którym ten problem tymczasowo rozwiązali poprzez podszywanie się jako klient Android’a - działa, ale nie wiadomo jak długo.
Na szczęście wczoraj pojawił się pull request do youtube-dl (używany przez media_extractor) rozwiązujący problem throttling’u:
ytdl-org:master
← dirkf:df-youtube-unthrottle-patch
opened 06:00AM - 01 Nov 21 UTC
## Please follow the guide below
---
### Before submitting a *pull request… * make sure you have:
- [x] [Searched](https://github.com/ytdl-org/youtube-dl/search?q=is%3Apr&type=Issues) the bugtracker for similar pull requests
- [x] Read [adding new extractor tutorial](https://github.com/ytdl-org/youtube-dl#adding-support-for-a-new-site)
- [x] Read [youtube-dl coding conventions](https://github.com/ytdl-org/youtube-dl#youtube-dl-coding-conventions) and adjusted the code to meet them
- [x] Covered the code with tests (note that PRs without tests will be REJECTED)
- [x] Checked the code with [flake8](https://pypi.python.org/pypi/flake8)
### In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under [Unlicense](http://unlicense.org/). Check one of the following options:
- [x] I am the original author of this code and I am willing to release it under [Unlicense](http://unlicense.org/)
- [ ] I am not the original author of this code but it is in public domain or released under [Unlicense](http://unlicense.org/) (provide reliable evidence)
### What is the purpose of your *pull request*?
- [x] Bug fix
- [x] Improvement
- [ ] New extractor
- [ ] New feature
---
### Description of your *pull request* and other information
Since summer 2021, YouTube has started serving media URLs with a query parameter such as `...&n=SXiXBH-xzrjeioPN&...`. This now appears to be the default behaviour. Unless the value of this parameter is transformed according to an algorithm delivered in the site player JS, the download speed for the URL is throttled to ~50kB/s.
Solutions for this include:
* implementing a more complete JS interpreter, eg based on PR #11272;
* using an external JS interpreter (PhantomJS, now unmaintained, is used by some extractors);
* spoofing the Android or iOS client to acquire unthrottled links, as successfully implemented in [yt-dlp](https://github.com/yt-dlp/yt-dlp/commit/c888ffb95ab0ab4f4cd1d6c93eda014f80479551).
This PR now uses the first approach taking the enhanced JSInterpreter module from [yt-dlp PR #1437](https://github.com/yt-dlp/yt-dlp/pull/1437), as back-ported in PR #30188.
The PR originally took a different approach derived from the successful solution used in VLC's `youtube.lua` (also implemented differently in [pytube](https://github.com/tfdahlin/pytube/blob/bb890af3b271a616bbe1d08abc8c65bac9266b0a/pytube/cipher.py), relying on the fact that the challenge algorithm is served in a mini-language within the minified player JS and therefore the specific algorithm could be extracted and executed by interpreting the mini-language without actually running the JS itself. This version had the benefit of offering a single file update, but was unstable against regular site changes and raised licensing issues as discussed below.
The PR also includes fixes for `test/test_youtube_lists.py`. This download test failed in Python 2 and contained tests that failed or were redundant because of obsolete assumptions about the `youtube.py` extractor or YouTube services.
Anyone who wants a single file update to fix the 2021.06.06 (or 2012.12.17) release pending merge/release of the PR should use [this version of extractor/youtube.py](https://github.com/ytdl-org/youtube-dl/raw/3b9b1cd4314f9d44630a2a65abfff8abab454887/youtube_dl/extractor/youtube.py) which is a drop-in replacement. This also includes the URL signature fix from #30366 and 2021.12.17.
Resolves #29326 (original analysis of the "n" parameter challenge)
Resolves #29790
Resolves #30004
Resolves #30024
Resolves #30052
Resolves #30088
Resolves #30097 (original reference to `n_descramble()`)
Resolves #30102
Resolves #30109
Resolves #30119
Resolves #30125
Resolves #30128
Resolves #30162
Resolves #30173
Resolves #30186
Resolves #30192
Resolves #30221
Resolves #30239
Resolves #30539
Resolves #30552.
Jak tylko zostanie wciągnięty do master’a to zupgadeujemy.
Kiedy wejdzie? - na razie nie wiadomo.
Dla niecierpliwych: wystarczy podmienić dwa pliki i działa
Owczar
3 Listopad 2021 19:04
10
No to teraz wszystko jasne
Dzięki za wytłumaczenie. Póki co działa - video nie używam. Ale zauważyłem właśnie problem na kodi, nie da się oglądać z YouTube