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

youtube-dl seems ok, songs not playing... #172

Open
surtarso opened this issue Nov 10, 2024 · 2 comments
Open

youtube-dl seems ok, songs not playing... #172

surtarso opened this issue Nov 10, 2024 · 2 comments

Comments

@surtarso
Copy link

surtarso commented Nov 10, 2024

Hi Arthur,
I've been trying to apply all fixes I've search here for youtube music...

my config is like this:

unset($cfg['youtube_indicator']);

$cfg['python_path'] = '/usr/bin/python3';
$cfg['youtube-dl_path'] = '/usr/local/bin/youtube-dl';
$cfg['youtube-dl_options'] = '-j --no-check-certificate --prefer-insecure';
$cfg['youtube_audio_format_name'] = '140 - audio only (tiny)';
$cfg['youtube_indicator'][] = 'www.youtube.';
$cfg['youtube_indicator'][] = 'youtu.be/';
$cfg['youtube_indicator'][] = 'm.youtube.';

I've tried python path empty and youtube-dl path without absolute path as well, all same result...
I can search youtube normally... but when I try to play it just skips to next local song in playlist.

I'm on dietpi, debian bullseye (x86 PC, not a RPi), installed ompd with their software

$ sudo dietpi-software list | grep -i ompd
ID 129 | =2 | O!MPD: Feature-rich, web interface audio player for MPD | +MariaDB +PHP +MPD +youtube-dl +webserver | https://dietpi.com/docs/software/media/#ompd

I already updated youtube-dl with -U option

Latest version: [email protected] from yt-dlp/yt-dlp
yt-dlp is up to date ([email protected] from yt-dlp/yt-dlp)

running " youtube-dl -j --no-check-certificate --prefer-insecure Z_4ULKpkLNc " in bash works fine, giving me the json with info for the video as stated on other issues here about this.

my php installation:

$ php --version
PHP 7.4.33 (cli) (built: Oct 14 2024 17:47:44) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.33, Copyright (c), by Zend Technologies

on console log, songs that play show as " isplaying:3; idx: 13 " or similar, while the ones from youtube show as " isplaying:0; idx: 0 "... not sure if relevant.

Here is a SS from a youtube song on the playlist. It shows cover, info, music time... but as you can see on the timeline, 0 bit 0kHz 0kbps..
image

I've already updated ompd to last version (using dietpi-software menu) just in case...
Can you give me a light here?
Thanks!

edit: Well now I don't know what happened, after the 'clean reinstall' nothing plays, not even local... f..me.
"exception: Failed to decode" and "exception: Failed to read mixer for 'DietPi ALSA': no such mixer control: PCM" on both local and youtube files. thats from mpd.service status... what did I break? o.o

Oh wow! ok... I got it fixed.
I use ompd locally, so I use 192.168.1.10/ompd to access it.
For some reason, the errors were coming com CURL failing coz of SSL! o.o I have no idea why.
To fix it I simply accessed it using my dns myurl.com/ompd so the cert url would match ompd url, and it worked, both local and youtube.
Maybe thats the reason YT wasnt working earlier today, but local music was and has been normal for a long time. Something doing a clean reinstall broke (or fixed?) something and now for my music to play I need to access ompd using proper ssl certs. Thankfully I have one so all good now I guess.

SS of mpd.service status
image

@ArturSierzant
Copy link
Owner

I'm glad you fixed the problem. So it works now?

@surtarso
Copy link
Author

Well, I guess so.
I do need a valid SSL cert for the songs to play now, which wasn't the case before I did a clean install.
But I guess youtube wasn't working at all before coz of it, so I'm not really sure if a bug or a feature hehehe =)

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

No branches or pull requests

2 participants