firsttris / plugin.video.sendtokodi

:tv: plays various stream sites on kodi using youtube-dl
MIT License
125 stars 28 forks source link

Cannot get higher than 720p on YouTube videos #90

Closed Zocker1999NET closed 1 year ago

Zocker1999NET commented 1 year ago

Description of the bug

On multiple videos, SendToKodi manages only to get 720p as maximum quality, but the videos are available in higher resolution & yt-dlp gets the maximum resolution available (mostly 4K).

I tested this on Kodi with the newest version of SendToKodi, version 0.9.431, which uses yt-dlp commit 68be95bd0ca3f76aa63c9812935bd826b3a42e53. On my PC, I tested this as well with yt-dlp commit 68be95bd0ca3f76aa63c9812935bd826b3a42e53.

Steps to reproduce

Expected behavior

play the video in 4K or at least 1080p.

Version and plattform:

Kodi log

kodi.log starting after first tried video ``` 2023-03-31 21:23:02.097 T:1172 info : CActiveAESink::OpenSink - initialize sink 2023-03-31 21:23:02.097 T:1172 info : CAESinkALSA::Initialize - Attempting to open device "@:CARD=ICUSBAUDIO7D,DEV=0" 2023-03-31 21:23:02.117 T:1172 info : CAESinkALSA::Initialize - Opened device "surround51:CARD=ICUSBAUDIO7D,DEV=0" 2023-03-31 21:23:02.117 T:1172 info : CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats 2023-03-31 21:23:02.118 T:1172 info : CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE 2023-03-31 21:23:02.918 T:12816 info : plugin.video.sendtokodi: could not find an original manifest or manifest is not supported falling back to best all-in-one stream 2023-03-31 21:23:02.918 T:12816 info : plugin.video.sendtokodi: creating list item for url https://rr3---sn-h0jelne7.googlevideo.com/videoplayback?expire=1680312180&ei=FDMnZNfYG4_E7gPDkLMo&ip=95.208.49.234&id=o-AAk7IA9oZ4AZPOIXAHxdrLbFljQflPxZ5QrJtaDvJJeK&itag=22&source=youtube&requiressl=yes&mh=Zq&mm=31%2C26&mn=sn-h0jelne7%2Csn-4g5ednd7&ms=au%2Conr&mv=m&mvi=3&pl=24&initcwndbps=1523750&spc=99c5Ce2Fov7yEd0x07KUTVj6eOQJvJk&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=1851.350&lmt=1680236989364151&mt=1680290243&fvip=4&fexp=24007246&beids=24512778&c=ANDROID&txp=4432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIhAMN26FiHwC7wn2qc5AEmKizYeDcDVrOECpfmhmYKtS5XAiBJyeKV3l3eko9KLRj0tjV3yLRvP6iXaXJ0txzllGQdQQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRAIhAJaMdh0ghovNx22AznlwZwZTgNV1qL0Y9DG8RnuAqpiCAh8JYOIQL8fBzvmtlpmk8lJEQbA67wQ0cSEhF1JPjsKU 2023-03-31 21:23:02.930 T:12816 warning : Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo. 2023-03-31 21:23:03.662 T:864 info : VideoPlayer::OpenFile: plugin://plugin.video.sendtokodi/?https://www.youtube.com/watch?v=_ffH3LROFZY 2023-03-31 21:23:04.304 T:12822 info : Creating InputStream 2023-03-31 21:23:05.138 T:12822 info : Creating Demuxer 2023-03-31 21:23:05.690 T:12822 info : Opening stream: 0 source: 256 2023-03-31 21:23:05.691 T:12822 info : [WHITELIST] Searching the whitelist for: width: 1280, height: 640, fps: 29.970, 3D: false 2023-03-31 21:23:05.698 T:12822 info : Display resolution ADJUST : 1920x1080 @ 59.940063 Hz (34) (weight: -nan) 2023-03-31 21:23:05.713 T:864 info : VideoPlayer: OnLostDisplay received 2023-03-31 21:23:05.713 T:864 warning : CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED 2023-03-31 21:23:05.713 T:864 warning : CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED 2023-03-31 21:23:05.713 T:864 info : GLES: Maximum texture width: 4096 2023-03-31 21:23:05.718 T:12822 info : Creating video codec with codec id: 27 2023-03-31 21:23:05.718 T:12822 info : CDVDVideoCodecDRMPRIME::Open - using decoder H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 2023-03-31 21:23:05.725 T:12822 info : Creating video thread 2023-03-31 21:23:05.725 T:12833 info : running thread: video_thread 2023-03-31 21:23:05.727 T:12822 info : Opening stream: 1 source: 256 2023-03-31 21:23:05.727 T:12822 info : Finding audio codec for: 86018 2023-03-31 21:23:05.729 T:12822 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac 2023-03-31 21:23:05.729 T:12822 info : OpenStream: Allowing max Out-Of-Sync Value of 10 ms 2023-03-31 21:23:05.729 T:12822 info : Creating audio thread 2023-03-31 21:23:05.730 T:12834 info : running thread: CVideoPlayerAudio::Process() 2023-03-31 21:23:06.230 T:864 info : VideoPlayer: OnResetDisplay received 2023-03-31 21:23:06.244 T:12834 info : CVideoPlayerAudio: display reset occurred, checking for passthrough 2023-03-31 21:23:06.245 T:12834 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac 2023-03-31 21:23:06.246 T:12834 info : Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through) 2023-03-31 21:23:06.249 T:1171 info : CActiveAE::ApplySettings - Forcing samplerate to 48000 2023-03-31 21:23:06.385 T:864 info : [WHITELIST] Searching the whitelist for: width: 1280, height: 640, fps: 29.970, 3D: false 2023-03-31 21:23:06.392 T:864 info : Display resolution ADJUST : 1920x1080 @ 59.940063 Hz (34) (weight: 0.000) 2023-03-31 21:23:12.872 T:12833 warning : OutputPicture - timeout waiting for buffer 2023-03-31 21:23:18.309 T:864 info : Skipped 20 duplicate messages.. 2023-03-31 21:23:18.309 T:864 info : CVideoPlayer::CloseFile() 2023-03-31 21:23:18.310 T:864 info : VideoPlayer: waiting for threads to exit 2023-03-31 21:23:18.314 T:12822 info : CVideoPlayer::OnExit() 2023-03-31 21:23:18.314 T:12822 info : Closing stream player 1 2023-03-31 21:23:18.314 T:12822 info : Waiting for audio thread to exit 2023-03-31 21:23:18.319 T:12834 info : thread end: CVideoPlayerAudio::OnExit() 2023-03-31 21:23:18.320 T:12822 info : Closing audio device 2023-03-31 21:23:18.373 T:1171 info : CActiveAE::ApplySettings - Forcing samplerate to 48000 2023-03-31 21:23:18.374 T:12822 info : Deleting audio codec 2023-03-31 21:23:18.375 T:12822 info : Closing stream player 2 2023-03-31 21:23:18.375 T:12822 info : waiting for video thread to exit 2023-03-31 21:23:18.395 T:12833 warning : OutputPicture - timeout waiting for buffer 2023-03-31 21:23:18.395 T:12833 info : thread end: video_thread 2023-03-31 21:23:18.397 T:12822 info : deleting video codec 2023-03-31 21:23:18.415 T:12823 info : Deleting settings information for files plugin://plugin.video.sendtokodi/?https://www.youtube.com/watch?v=_ffH3LROFZY 2023-03-31 21:23:18.420 T:864 info : VideoPlayer: finished waiting 2023-03-31 21:23:18.420 T:864 info : CVideoPlayer::CloseFile() 2023-03-31 21:23:18.420 T:864 info : VideoPlayer: waiting for threads to exit 2023-03-31 21:23:18.420 T:864 info : VideoPlayer: finished waiting 2023-03-31 21:23:18.519 T:864 info : GLES: Maximum texture width: 4096 2023-03-31 21:23:18.576 T:12837 error : DoWork - Direct texture file loading failed for special://skin/backgrounds/default_settings.jpg 2023-03-31 21:23:29.025 T:1219 info : JSONRPC Server: Disconnection detected 2023-03-31 21:28:19.423 T:1219 info : JSONRPC Server: New connection added 2023-03-31 21:28:27.964 T:1172 info : CActiveAESink::OpenSink - initialize sink 2023-03-31 21:28:27.964 T:1172 info : CAESinkALSA::Initialize - Attempting to open device "@:CARD=ICUSBAUDIO7D,DEV=0" 2023-03-31 21:28:27.979 T:1172 info : CAESinkALSA::Initialize - Opened device "surround51:CARD=ICUSBAUDIO7D,DEV=0" 2023-03-31 21:28:27.980 T:1172 info : CAESinkALSA::InitializeHW - Your hardware does not support AE_FMT_FLOAT, trying other formats 2023-03-31 21:28:27.980 T:1172 info : CAESinkALSA::InitializeHW - Using data format AE_FMT_S16NE 2023-03-31 21:28:28.399 T:12860 info : plugin.video.sendtokodi: could not find an original manifest or manifest is not supported falling back to best all-in-one stream 2023-03-31 21:28:28.399 T:12860 info : plugin.video.sendtokodi: creating list item for url https://rr2---sn-h0jeenle.googlevideo.com/videoplayback?expire=1680312506&ei=WjQnZIi-O8uY1gLCmLnYDw&ip=95.208.49.234&id=o-AMzwrQaYpPHIJ_7JvS4u5SZIjUCPFaYNUnNcWriZ0ZeA&itag=22&source=youtube&requiressl=yes&mh=a9&mm=31%2C26&mn=sn-h0jeenle%2Csn-4g5lznl6&ms=au%2Conr&mv=m&mvi=2&pl=24&initcwndbps=1476250&spc=99c5CXtC8B6WtIjzCDIPxoNPpgi7jlM&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=184.900&lmt=1680256932402612&mt=1680290742&fvip=1&fexp=24007246&c=ANDROID&txp=3318224&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgaHf7VbGL3d3zOoBAewElVBq77vXu-KgvKQQ3yii67vkCIQCr-l3wFFqCbtU0f6CEPkMMe9yYhlB72K_9crN8lqc9yQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAJx42A_ul739oieMbHiL019F3b-R95KIy-RQSUPs3fzGAiBzBmYVqX_P525heg5mr7FigPc1VoDq-rXP3-J637P0QQ%3D%3D 2023-03-31 21:28:28.413 T:12860 warning : Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo. 2023-03-31 21:28:28.959 T:864 info : VideoPlayer::OpenFile: plugin://plugin.video.sendtokodi/?https://www.youtube.com/watch?v=YudHcBIxlYw 2023-03-31 21:28:29.469 T:12866 info : Creating InputStream 2023-03-31 21:28:30.428 T:12866 info : Creating Demuxer 2023-03-31 21:28:30.720 T:12866 info : Opening stream: 0 source: 256 2023-03-31 21:28:30.720 T:12866 info : [WHITELIST] Searching the whitelist for: width: 1280, height: 720, fps: 24.000, 3D: false 2023-03-31 21:28:30.726 T:12866 info : Display resolution ADJUST : 1920x1080 @ 24.000000 Hz (39) (weight: -nan) 2023-03-31 21:28:30.746 T:864 info : VideoPlayer: OnLostDisplay received 2023-03-31 21:28:30.746 T:864 warning : CDVDMessageQueue(audio)::Put MSGQ_NOT_INITIALIZED 2023-03-31 21:28:30.747 T:864 warning : CDVDMessageQueue(video)::Put MSGQ_NOT_INITIALIZED 2023-03-31 21:28:30.747 T:864 info : GLES: Maximum texture width: 4096 2023-03-31 21:28:30.751 T:12866 info : Creating video codec with codec id: 27 2023-03-31 21:28:30.752 T:12866 info : CDVDVideoCodecDRMPRIME::Open - using decoder H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 2023-03-31 21:28:30.759 T:12866 info : Creating video thread 2023-03-31 21:28:30.759 T:12881 info : running thread: video_thread 2023-03-31 21:28:30.761 T:12866 info : Opening stream: 1 source: 256 2023-03-31 21:28:30.762 T:12866 info : Finding audio codec for: 86018 2023-03-31 21:28:30.763 T:12866 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac 2023-03-31 21:28:30.763 T:12866 info : OpenStream: Allowing max Out-Of-Sync Value of 10 ms 2023-03-31 21:28:30.764 T:12866 info : Creating audio thread 2023-03-31 21:28:30.764 T:12882 info : running thread: CVideoPlayerAudio::Process() 2023-03-31 21:28:30.764 T:12866 info : Opening stream: 0 source: 1024 2023-03-31 21:28:31.254 T:864 info : VideoPlayer: OnResetDisplay received 2023-03-31 21:28:31.431 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:28:31.431 T:12866 info : Opening stream: 0 source: 1025 2023-03-31 21:28:31.538 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:28:31.538 T:12866 info : Opening stream: 0 source: 1026 2023-03-31 21:28:31.632 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:28:31.632 T:12866 info : Opening stream: 0 source: 1027 2023-03-31 21:28:31.728 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:28:31.728 T:12866 info : Opening stream: 0 source: 1028 2023-03-31 21:28:31.839 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:28:31.839 T:12866 info : Opening stream: 0 source: 1029 2023-03-31 21:28:31.952 T:12866 info : CDVDSubtitlesLibass: Using libass version 1700000 2023-03-31 21:28:31.952 T:12866 info : CDVDSubtitlesLibass: Creating ASS library structure 2023-03-31 21:28:31.953 T:12866 info : CDVDSubtitlesLibass: Initializing ASS Renderer 2023-03-31 21:28:31.973 T:12866 info : CDVDSubtitlesLibass: Initializing ASS library font settings 2023-03-31 21:28:32.331 T:12866 info : CDVDSubtitlesLibass: Creating new ASS track 2023-03-31 21:28:32.358 T:12882 info : CVideoPlayerAudio: display reset occurred, checking for passthrough 2023-03-31 21:28:32.361 T:12882 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac 2023-03-31 21:28:32.362 T:12882 info : Creating audio stream (codec id: 86018, channels: 2, sample rate: 44100, no pass-through) 2023-03-31 21:28:32.362 T:1171 info : CActiveAE::ApplySettings - Forcing samplerate to 48000 2023-03-31 21:28:32.509 T:864 info : [WHITELIST] Searching the whitelist for: width: 1280, height: 720, fps: 24.000, 3D: false 2023-03-31 21:28:32.515 T:864 info : Display resolution ADJUST : 1920x1080 @ 24.000000 Hz (39) (weight: 0.000) 2023-03-31 21:29:10.974 T:1219 info : JSONRPC Server: Disconnection detected 2023-03-31 21:29:15.555 T:1219 info : JSONRPC Server: New connection added 2023-03-31 21:29:21.406 T:1219 info : Skipped 1 duplicate messages.. 2023-03-31 21:29:21.406 T:1219 info : WebSocket: connection closed by client 2023-03-31 21:29:21.406 T:1219 info : JSONRPC Server: Disconnection detected 2023-03-31 21:29:24.204 T:12893 info : plugin.video.sendtokodi: could not find an original manifest or manifest is not supported falling back to best all-in-one stream 2023-03-31 21:29:24.204 T:12893 info : plugin.video.sendtokodi: creating list item for url https://rr4---sn-h0jeened.googlevideo.com/videoplayback?expire=1680312562&ei=kjQnZOKQFLyB6dsPkNys6AE&ip=95.208.49.234&id=o-AFawycra1iLsiUi97Iaqhu67KUzToL5bBytoTFo9Hm0h&itag=22&source=youtube&requiressl=yes&mh=sx&mm=31%2C29&mn=sn-h0jeened%2Csn-h0jelnez&ms=au%2Crdu&mv=m&mvi=4&pl=24&initcwndbps=1507500&spc=99c5CYgiIbI6GRF8qmkphKqrtCiEW3o&vprv=1&svpuc=1&mime=video%2Fmp4&cnr=14&ratebypass=yes&dur=324.777&lmt=1680242637089138&mt=1680290490&fvip=3&fexp=24007246&beids=24512784&c=ANDROID&txp=5432434&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Ccnr%2Cratebypass%2Cdur%2Clmt&sig=AOq0QJ8wRQIgDdZ-Z_ZyGuBtwf3Dl_-IbX67u5diqWBsxYRpWm0i3gYCIQCQxal2jLGwob6JmE3EIV2601hIkcoWJ4XFveNjEYn89w%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRQIhAKNzdqt_mNtMzDQYz0BC3at11qeYFS-8J7RMHStzNDvGAiAC7wyh_hjGmhfFP4b04J-YErc2KB1RHEwj454JFUw4hQ%3D%3D 2023-03-31 21:29:24.213 T:12893 warning : Setting most video properties through ListItem.setInfo() is deprecated and might be removed in future Kodi versions. Please use the respective setter in InfoTagVideo. 2023-03-31 21:29:27.640 T:12882 info : ProcessDecoderOutput: Changed max allowed Out-Of-Sync value to 16 ms due self-learning 2023-03-31 21:29:27.661 T:864 info : VideoPlayer::OpenFile: plugin://plugin.video.sendtokodi/?https://www.youtube.com/watch?v=bZ5hZMc5uOQ 2023-03-31 21:29:28.235 T:12881 warning : OutputPicture - timeout waiting for buffer 2023-03-31 21:29:28.745 T:12866 info : Skipped 3 duplicate messages.. 2023-03-31 21:29:28.745 T:12866 info : Creating InputStream 2023-03-31 21:29:30.110 T:12866 info : Creating Demuxer 2023-03-31 21:29:30.239 T:12866 info : Opening stream: 0 source: 256 2023-03-31 21:29:30.240 T:12866 info : Creating video codec with codec id: 27 2023-03-31 21:29:30.240 T:12866 info : CDVDVideoCodecDRMPRIME::Open - using decoder H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 2023-03-31 21:29:30.249 T:12866 info : Opening stream: 1 source: 256 2023-03-31 21:29:30.249 T:12866 info : Finding audio codec for: 86018 2023-03-31 21:29:30.250 T:12866 info : CDVDAudioCodecFFmpeg::Open() Successful opened audio decoder aac 2023-03-31 21:29:30.251 T:12866 info : Opening stream: 0 source: 1024 2023-03-31 21:29:30.260 T:12882 info : OpenStream: Allowing max Out-Of-Sync Value of 16 ms 2023-03-31 21:29:30.930 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:29:30.930 T:12866 info : Opening stream: 0 source: 1025 2023-03-31 21:29:31.124 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:29:31.124 T:12866 info : Opening stream: 0 source: 1026 2023-03-31 21:29:31.313 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:29:31.313 T:12866 info : Opening stream: 0 source: 1027 2023-03-31 21:29:31.416 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:29:31.416 T:12866 info : Opening stream: 0 source: 1028 2023-03-31 21:29:31.517 T:12866 error : OpenStream - Unable to create subtitle parser 2023-03-31 21:29:31.517 T:12866 info : Opening stream: 0 source: 1029 2023-03-31 21:29:31.613 T:12866 info : CDVDSubtitlesLibass: Using libass version 1700000 2023-03-31 21:29:31.613 T:12866 info : CDVDSubtitlesLibass: Creating ASS library structure 2023-03-31 21:29:31.613 T:12866 info : CDVDSubtitlesLibass: Initializing ASS Renderer 2023-03-31 21:29:31.613 T:12866 info : CDVDSubtitlesLibass: Initializing ASS library font settings 2023-03-31 21:29:31.655 T:12866 info : CDVDSubtitlesLibass: Creating new ASS track ```
**In case a certain website does not work for you** As explained, yt-dlp can extract up to 4K on all videos listed above. **Additional context** I run LibreELEC 11.0.1 with Kodi 20.1 connected to a 4K HDR TV. Kodi defaults to 1080p (so that the upscaler of the TV can handle the most & so it runs more smoothly), but when starting to play 4K video file, Kodi automatically increases the resolution to 4K for the playback. Otherwise, thanks for this plugin, it is really great & I just like how easy it is to play YouTube & other videos on Kodi (after setting it first up that is).
nullket commented 1 year ago

First of all thanks a lot for the precise bug report, including all your tests and sticking to the template.

Unfortunately, this issue is due to the fact that our addon still does not support streams where audio and video are split in separate substreams and must be muxed. For YouTube this means 720p at max. That’s the max YouTube is offering.

I have a very rough working prototype for integrating dash streams (see below) but it fails on so many websites that do things a little bit different, thus I do not want to integrate it in this state. But to be honest I have a lot going on until late summer and not so much time. But as said elsewhere I am really wanting this feature as well.

Maybe we should create a whitelist of websites that work and remove that again later once the feature generalizes enough.

Please see the following issues for more details: https://github.com/firsttris/plugin.video.sendtokodi/issues/62

https://github.com/firsttris/plugin.video.sendtokodi/issues/34

Zocker1999NET commented 1 year ago

Okay, no problem, that's understandable. I wrote this bug report mainly because I swear the videos looked way better before just until recently (however I hadn't really confirmed that before, most probably I was just plain blind before xD).

Knowing there are already other issues for that, I close this in favor of #34.