MusicPlayerDaemon / mpc

Command-line client for MPD
GNU General Public License v2.0
191 stars 36 forks source link

mpc -f %comment% output is blank, even if there is a tag #99

Closed Ladas552 closed 1 year ago

Ladas552 commented 1 year ago

I want to get tag "comment" from the command, so I can have easy access to URL of a file, for sharing purposes

I download videos from YouTube and convert them to mp3 with this command

yt-dlp --add-metadata --parse-metadata "playlist_title:%(album)s" --embed-thumbnail --ignore-errors --format bestaudio --extract-audio --audio-format mp3 --output "/home/user/Music/folder/%(playlist_uploader)s/%(playlist)s/%(title)s.%(ext)s" --yes-playlist 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'

After that, mp3 comes out with tag "comment" and URL attached to it. This tag can be seen if listening with MPV or with any tag reader/editor

But "mpc -f %comment%" outputs:

ladas552@Itoks ~ $ mpc -f %comment%

[paused]  #1/1   0:20/3:32 (9%)
volume: 50%   repeat: off   random: on    single: off   consume: off

While other tags work:

ladas552@Itoks ~ $ mpc -f %artist%
Rick Astley
[paused]  #1/1   0:20/3:32 (9%)
volume: 50%   repeat: off   random: on    single: off   consume: off
ladas552@Itoks ~ $ mpc -f %file%
Rick Astley - Never Gonna Give You Up (Official Music Video).mp3
[paused]  #1/1   0:20/3:32 (9%)
volume: 50%   repeat: off   random: on    single: off   consume: off
ladas552@Itoks ~ $ mpc -f %time%
3:32
[paused]  #1/1   0:20/3:32 (9%)
volume: 50%   repeat: off   random: on    single: off   consume: off

As stated in the manual, I added "comment" to metadata_to_use in mpd.conf
But it did not work after many reboots, database updates/rescans

I enabled my mpd.service via "systemctl --user enable --now mpd.socket" command I use Manjaro Testing Branch

My versions of mpc and mpd protocol and system mpd: ```(r) ladas552@Itoks ~ $ pacman -Q mpc mpc 0.34-2 ladas552@Itoks ~ $ mpc version mpd version: 0.23.5 ladas552@Itoks ~ $ mpd -V Music Player Daemon 0.23.12 (0.23.12) Copyright 2003-2007 Warren Dukes Copyright 2008-2021 Max Kellermann This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Database plugins: simple proxy upnp Storage plugins: local udisks nfs curl Neighbor plugins: upnp udisks Decoders plugins: [mad] mp3 mp2 [mpg123] mp3 [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2 [audiofile] wav au aiff aif [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [faad] aac [mpcdec] mpc [wavpack] wv [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm [sidplay] sid mus str prg P00 [wildmidi] mid [fluidsynth] mid [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps:// [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [pcm] Filters: libsamplerate soxr Tag plugins: id3tag Output plugins: shout null fifo pipe alsa ao oss openal solaris pipewire pulse jack httpd snapcast recorder Encoder plugins: null vorbis opus lame twolame wave flac Archive plugins: [bz2] bz2 [zzip] zip [iso] iso Input plugins: file io_uring archive alsa qobuz curl ffmpeg nfs mms cdio_paranoia Playlist plugins: extm3u m3u pls xspf asx rss soundcloud flac cue embcue Protocols: file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// Other features: avahi dbus udisks epoll icu inotify ipv6 systemd tcp un ```
My MPD config ```(r) # Required files db_file "~/.config/mpd/database/mpd.db" log_file "~/.config/mpd/log/mpd.log" # Optional music_directory "~/Music" playlist_directory "~/.config/mpd/playlists" #pid_file "~/.config/mpd/pid/mpd.pid" state_file "~/.config/mpd/state/mpdstate" #sticker_file "~/.config/mpd/sticker.sql" audio_output { type "pipewire" name "PipeWire Sound Server" } #audio_output { # type "alsa" # name "mpd alsamixer-output" # mixer_type "software" #} # audio_output { type "fifo" name "toggle_visualizer" path "/tmp/mpd.fifo" format "44100:16:2" } bind_to_address "localhost:127.0.0.1" port "8888" auto_update "yes" metadata_to_use "artist, album, title, track, name, genre, date, composer, performer, disc, comment" ```
MaxKellermann commented 1 year ago

What makes you believe this is a mpc bug?

Ladas552 commented 1 year ago

What makes you believe this is a mpc bug?

Well, I figured that there will be people who both know MPD and MPC. As I use both, and they can guide to possible cause of this problem. Also, I feared that in MPD repository they would just tell that it's an MPC bug or something. And I don't know how to check tags trough MPD solely. I also use ncmpcpp player, and there is no tag comment in tag editor, so this must be an MPD's bug.

If I am mistaken, and there is no help for this, then this issue should be disposed off as invalid. Thanks for the reply

MaxKellermann commented 1 year ago

So you did not do any research. Do it now: What is exactly being transmitted between MPD and mpc?

Ladas552 commented 1 year ago

So you did not do any research. Do it now: What is exactly being transmitted between MPD and mpc?

Well, i found out that it is solely the MPD problem that it can't view url. Closing this issue then.