VGMdb
Go Back   VGMdb Forums > Discussion > Miscellaneous Discussion
Register FAQ Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old Dec 1, 2018, 01:25 PM
Appilesh Appilesh is offline
Junior Member
 
Join Date: Dec 2018
Location: UK
Posts: 4
Default Getting VLC to recognise japanese CDs

Hi,
VLC doesn't retrieve correct album/track information for most of my japanese CDs, for example this: https://vgmdb.net/album/72173, whereas Windows Media Player gets it just fine. I think I understand that WMP uses Gracenote's proprietary cddb server, which is why it has access to more data than vlc.
Is there a cddb server I can use with vlc that will recognise my CDs? I have looked at this thread: https://vgmdb.net/forums/showthread.php?t=2618. I don't understand whether those servers are just for tagging programs, or if I can use them with vlc, and how I would go about doing that. I'm not sure I understand any of this stuff, really. I am finding it impossible to find support online. Hopefully someone can help me here.
Many thanks.
Reply With Quote
  #2  
Old Dec 1, 2018, 01:55 PM
LiquidAcid LiquidAcid is offline
Trusted Editor
 
Join Date: May 2008
Posts: 1,532
Default

This looks like a VLC specific issue, so I would recommend asking on their forums. I would just try to set VLC's CDDB server to one of the VGMdb ones and see if it works.
Reply With Quote
  #3  
Old Dec 1, 2018, 02:19 PM
Appilesh Appilesh is offline
Junior Member
 
Join Date: Dec 2018
Location: UK
Posts: 4
Default

Quote:
Originally Posted by LiquidAcid View Post
This looks like a VLC specific issue, so I would recommend asking on their forums. I would just try to set VLC's CDDB server to one of the VGMdb ones and see if it works.
Thank you for your reply
I can point VLC to a general server and a port, but there is no field to point it to an address such as "http://vgmdb.net:80/cddb".
I'm asking here because here there are people who listen to video game/anime music like I do (people who asked similar questions on vlc forums had their needs satisfied with freedb) and the fact that VGMdb has its own cddb server emulator.
Reply With Quote
  #4  
Old Dec 1, 2018, 04:38 PM
LiquidAcid LiquidAcid is offline
Trusted Editor
 
Join Date: May 2008
Posts: 1,532
Default

Yeah, I just checked the source and the query path seems to be hardcoded:
cdda.c

As a quick fix I would just patch the corresponding DLL (should be libcdda_plugin.dll in case you're using Windows) by replacing the string.
Code:
hexdump -ve '1/1 "%.2x"' libcdda_plugin.dll | sed "s/2f7e636464622f636464622e63676900/2f636464622f656e0000000000000000/g" | xxd -r -p > libcdda_plugin.dll.patched
2f636464622f656e0000000000000000 is "/cddb/en" (padded with NULL bytes)

This seems to generate the right query, but now fails for a different reason:
Quote:
cdda warning: CDDB error: internal buffer too small
cdda debug: CDDB failure
Default buffer size is 1K, which VLC apparantly never changes. At this point it's probably easier to build your own binary...

EDIT: I can confirm that increasing the buffer to 2K does the trick.

Last edited by LiquidAcid; Dec 1, 2018 at 05:44 PM.
Reply With Quote
  #5  
Old Dec 2, 2018, 03:51 PM
Appilesh Appilesh is offline
Junior Member
 
Join Date: Dec 2018
Location: UK
Posts: 4
Default

Quote:
Originally Posted by LiquidAcid View Post
Yeah, I just checked the source and the query path seems to be hardcoded:
cdda.c

As a quick fix I would just patch the corresponding DLL (should be libcdda_plugin.dll in case you're using Windows) by replacing the string.
Code:
hexdump -ve '1/1 "%.2x"' libcdda_plugin.dll | sed "s/2f7e636464622f636464622e63676900/2f636464622f656e0000000000000000/g" | xxd -r -p > libcdda_plugin.dll.patched
2f636464622f656e0000000000000000 is "/cddb/en" (padded with NULL bytes)

This seems to generate the right query, but now fails for a different reason:


Default buffer size is 1K, which VLC apparantly never changes. At this point it's probably easier to build your own binary...

EDIT: I can confirm that increasing the buffer to 2K does the trick.
Thank you so much for going into this much depth. I have set the server to vgmdb.net, port to 80, and replaced both occurrences of "2f7e636464622f636464622e63676900" with "2f636464622f656e0000000000000000" in the appropriate dll. How do I change the buffer size to 2k? I am on Windows (10). Kind regards.
Reply With Quote
  #6  
Old Dec 3, 2018, 01:44 PM
LiquidAcid LiquidAcid is offline
Trusted Editor
 
Join Date: May 2008
Posts: 1,532
Default

I haven't pursued the binary patching approach because of its limitation, and have just patched the source.

Here's the patch:
Link

I'm not sure how difficult it is to build VLC on Windows (using Linux only here).
Reply With Quote
  #7  
Old Dec 4, 2018, 01:44 PM
Appilesh Appilesh is offline
Junior Member
 
Join Date: Dec 2018
Location: UK
Posts: 4
Default

Quote:
Originally Posted by LiquidAcid View Post
I haven't pursued the binary patching approach because of its limitation, and have just patched the source.

Here's the patch:
Link

I'm not sure how difficult it is to build VLC on Windows (using Linux only here).
Thank you for this. However, I am not very proficient in this stuff so you might need to explain it like I'm 5. I'm on Windows. Do I just need to compile that patch into a dll and replace the libcdda_plugin.dll in vlc? Or do I need to copy and paste the lines from that patch, into the source for the original libcdda_plugin.dll, and then compile all of that into a dll. Or something else entirely? Sorry, I really can't figure it out.
Many thanks.
Reply With Quote
  #8  
Old Dec 4, 2018, 01:57 PM
LiquidAcid LiquidAcid is offline
Trusted Editor
 
Join Date: May 2008
Posts: 1,532
Default

You apply the patch to the sourcecode, either via git-am or manually via patch. For compiling I can just refer you to the VLC Wiki. You probably want to build the entire project then, and not just the CDDA plugin (to be on the safe side).
One reason why I don't use Windows. It's always extremely difficult to build your own software there, let alone setup a working compiler toolchain... Anyway, good luck.
Reply With Quote
Reply

Tags
cddb, japanese, videolan, vlc

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Sad japanese ost dragonmeliodas97 Anime Music Discussion 2 Oct 17, 2017 01:13 PM
Best Japanese Games an1mey123 Video Game Music Discussion 0 Jul 13, 2017 12:39 PM
Japanese Drama + Other Japanese CDs MBgov1133 Video Game Music Discussion 1 Sep 1, 2015 05:00 AM
Japanese playlists Vert1 Video Game Music Discussion 0 Jun 15, 2014 09:19 AM
Japanese Itunes mrnutz Miscellaneous Discussion 2 Jul 5, 2008 11:15 AM