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
Rekordbox in export mode, metadata not working #43
Comments
I’m sorry, I don’t know what you mean exactly. What is export mode? But the most basic answer is that it works however you find that it works. I have not been able to test much with rekordbox running because that can’t run on the same machine as Beat Link, and I only have one machine available most of the time. If you can capture some packets and figure out how to make it work correctly, that would be much appreciated. |
The export mode is the free mode of Rekordbox, it must just be on the same network than the deck and beat-link-trigger. The deck is then using the tracks from the Rekordbox database. The deck sees the metadata but beat-link-trigger cannot see them and I have the same behavior when I try to implement the protocol myself. |
Ok, you are talking about what I still think of as just rekordbox, because I have actual CDJs, and no need to purchase the laptop-based playback mode. 😄 In any case, I am hoping that you can perform the analysis yourself and figure out how to make it work; I am very busy with other tasks at the moment. Otherwise we can leave this issue open and I will investigate it when I have time. If you do have a packet capture of the CDJs loading metadata from rekordbox, especially if you can annotate it with information about the relevant IP addresses and packet numbers, that would definitely be nice to upload to this issue. |
One thing that is strange to me is that I have a strong feeling that this used to work just fine, even more reliably than requesting metadata from tracks loaded from CDJs. I wonder what changed? |
The document describes everything nicely but I receive 0 or -1 in the Track metadata ready response... |
I brought home an extra computer this weekend, and I am unable to reproduce this problem. When I load a track on my CDJ-2000 nexus player from rekordbox running on a Mac, Beat Link (which is used by Beat Link Trigger) has no trouble loading all the metadata from rekordbox. Can you provide more specific details about your setup so we can see how it differs from mine? Did you see anything in the Beat Link Trigger log file when you were failing to get metadata? I discovered that if the Mac pops up a dialog box asking to confirm whether rekordbox should be allowed to access the network, this can cause Beat Link to believe there is no portmapper running on the rekordbox machine, and BLT will not try to get metadata from rekordbox until you take BLT offline and back online again. (For the offline/online fix to work you must be running the latest preview release, otherwise you need to fully quit and relaunch Beat Link Trigger once rekordbox is up and running and allowed to accept network connections.) |
Another question for you, @Fra-Ktus, in your C prototype, did you remember to send the correct source-type value when requesting the metadata? Tracks loaded from recordbox show as being loaded from “slot” |
Thank you so much for testing the feature. |
Here is the log from beat-link-trigger: 2 errors: 2018-Sep-02 11:19:07 INFO [beat-link-trigger.logs:29] - Beat Link Trigger version 0.3.8 built Sun Jun 17 18:25:50 CDT 2018 |
Here is a log of my prototype when receiving metadata from the USB stick PioneerMetadataReceive received 96 PioneerMetadataReceive received 96 PioneerMetadataReceive received 100 PioneerMetadataReceive received 96 PioneerMetadataReceive received 104 PioneerMetadata_BeatGridsRequest d=4 sr=3 tr=1 |
And here is a log when I can't read metadata from RekordBox Here in PioneerMetadata_CheckRenderMenuRequestOK I receive 0x4001 but with 0 metadata available... Send START_PHASE_1_1, time 239168213 |
I don’t know how to ready your logs, unfortunately, and don’t have time to learn, but the Beat Link Trigger log makes it seem that there might be a firewall preventing it from communicating fully with rekordbox? |
Not sure about the firewall because it works when tracks come from USB and I see the metadata correctly in the player if I play from USB and Rekordbox. |
I agree, the fact that the players can get the data makes it not likely a firewall issue. It’s possible you are doing nothing wrong, and there is a subtle difference between what rekordbox on the Mac accepts, and what the Windows version accepts. This is very strange! If you do figure out how to get it to respond, I’d very much appreciate learning about it. At this point if I were investigating, I would use Wireshark to compare the packets from the CDJs to rekordbox with the ones we are sending, and see if there is any difference that might matter. I’ve spent weeks of my life on such research, unfortunately… perhaps not the healthiest thing! 😉 |
Thanks, I will test with Rekordbox on the Mac and see if it works better, if needed I will fire Wireshark, it's also my friend for many years. I agree it's not healthy to dive into it for many hours but sometimes you have the ha ha moment :-) |
I can confirm that if Rekorbox runs on macOS then the metadata is downloaded by Beat Link Trigger! In my test Windows 7 or macOS is running on the same hardware. Time to fire Wireshark :-) |
So I could get it to work! What I did understood wrong is that when a track is coming from Rekordbox you need to query the system running Rekordbox and not the player... |
That’s good to hear, and yes, you always query the device hosting the database from which the track has been loaded. I have not tested with multiple rekordbox laptops, although I do believe that the players support up to two of them. My expectation is that they will be assigned different device numbers (if I remember correctly, the first one gets device number |
Hey Guys, ive got the same issue, since i use rekordbox only in export mode. if i understand correctly, it wont work this way? BLT is working fine, but only the metadata wont be displayed. if i use usb, it works fine. @Fra-Ktus how did you get this to work? greetings |
Yes, if anyone can figure out how to change the queries to work properly with Windows rekordbox, I would greatly appreciate learning that, so I can update dysentery, Beat Link, and Beat Link Trigger. |
I think the queries are ok because my C prototype works now. What I see on my side is that the port number of the DB server is not the classical one. It asks me to use port 49184 for the queries, could that be the problem? What should I use to debug Beat Link Trigger? (C dinosaur coding in C for 20 years here :-) ) Here is a log when Beat Link Trigger try to get the metadata: 2018-Sep-07 10:57:04 INFO [beat-link-trigger.logs:29] - Beat Link Trigger version 0.3.8 built Sun Jun 17 18:25:50 CDT 2018 2018-Sep-07 10:57:12 ERROR [org.deepsymmetry.beatlink.data.MetadataFinder:108] - Problem requesting metadata, returning null |
Did ur prototype work on win machines? Would love to test it, because i really need an option to display played tracks on a video stream. |
I am not working on a similar tool to Beat Link Trigger but just a custom utility to send commands to a media server. |
Beat Link Trigger works fine on Windows. |
@Fra-Ktus to debug this you’ll need to install a Java SDK, and Clojure, and choose a Clojure development environment (the two big choices are CIDER in Emacs, and Cursive in IntelliJ IDEA). But that will be a big learning curve; Clojure is a Lisp, and Lisp is vastly different than C. And there is the whole Java class library infrastructure underneath it. I feel like the journey will be rewarding in the end, but I know it will be very confusing and seem slow going at the start, so I am not going to try to push you to do it. That said, we already have a bit of key information in the stack trace you quoted:
This tells me that when BLT sends the database context setup message described in Figure 21 of the dysentery Packet Analysis document, we do not get back the packet we expect (Figure 22), but one whose type field is |
Yeah, it works on windows. But no metadata is displayed when i link my xdj 1000mk2's to rekordbox. If i use ubs sticks, it works fine. |
Ah, I see, that’s the same problem Fra-Ktus is trying to investigate. I have to admit that people using rekordbox has not been a primary use case I worry about, because I can’t run rekordbox and Beat Link Trigger at the same time, since I usually only have one computer. Just to confirm, you are running rekordbox on a different machine than you are running BLT on, @KayPure ? |
Yes, i do. Ive got a Rekordbox DB on a Laptop and run BLT on a PC. If i run a Mac VM on this PC, the metadata displays correctly. Just like Fra-Ktus said, there must be some issues with windows. |
Did retest this morning. Beat Link Trigger has the same error Here is the trace from my C prototype that works when running in the same config. I run my app on macOS, Rekorbox on Win7. I cut the trace to try to make it more readable... Get port number: Open connection and the first handshake: PioneerMetadata_OpenDBServer on port 49182 Query Context: PioneerMetadata_SendQueryContext d=4 Metadata request: PioneerMetadata_MetadataRequest d=4 sr=4 tr=1 track id=10 Render menu request: PioneerMetadata_RenderMenuRequest d=4 sr=4 tr=1 And then the metadata are comming: PioneerMetadata_CheckRenderMenuRequestOK message type 4101 I would like to help more but it looks steep to install all the tools for me... I am used to XCode and Visual Studio... |
I have uploaded a new version of the 0-4-0 preview to the releases page. This new vesion loads the metadata items right after setting up the metadata menu request, instead of asking for the cue list in between those two actions, in case that is what is causing problems for Windows rekordbox. Please give it a try when you have a chance, @Fra-Ktus and @KayPure. |
Rats, but thanks for trying. The log file (File |
Can I mail you a wireshark trace, will try to do that today but I need to go to the office to do that... |
I tried the latest preview 0-4-0 and unfortunately, it's the same. |
Oops, I did not mean for that commit to auto-close the issue! I want to wait to hear from you both. I have updated the preview release with a new version of the Beat Link library that assembles all dbserver messages into a single buffer and sends them as a single operation, which should hopefully fix the issue that @Fra-Ktus helped me find with his perfect Wireshark captures. @KayPure could you try this latest one too, when you have a chance? It looks like the problem is that Windows rekordbox is getting confused when a dbserver message is split into multiple packets on the network. Code is supposed to be written in a way that protects against that, because networks sometimes do that, and my own code is careful to handle that properly (and so is rekordbox on the Mac, and on the CDJs themselves), but apparently not the Windows implementation of rekordbox. It replies to the first tiny part of the message, then closes the connection when the rest of the message arrives. The messages should hopefully not get split any more; at least, I have done everything I can within programming to avoid that. I can’t control what happens once they are on the network, of course. |
And one interesting point about all this: We had to go to the level of an actual network traffic capture to figure this out, because the software level log files were not showing where messages were being split into multiple packets; at the software level we just can’t tell. Sometimes we need these low level tools. I am very thankful you were able to use them. |
I happy to report that the latest preview version can have the metadata from Rekorbox running on windows 7! |
Agree! Windows 10 Machines. Worked like a charme!!!! U guys are awesome ;) Thanks! Another question, not related to this issue: Is there any way to push the metadata out of the program into, lets say, an html file? i think thats quite not easy huh? |
Thanks so much for confirming this, both of you! I will close the issue. @Fra-Ktus I appreciate the offer, but my change was simple enough that I can pretty much visualize what the capture will look like, so there is no need for you to spend the time. Save it for when we next run into a problem! 😁 And @KayPure you could certainly write an expression that would do that. However, you should take a look at the Playlist Writer which is already there, |
@brunchboy thanks for the infos. Will check the playlist writer. I want to bring the metadata in obs. I could do this with an windowcapture, but that looks not good. I found an obs overlay here on github, but that wont work. I'll try to figure something out with the code, thanks. |
What is obs? If you are looking for real-time metadata information to integrate with another program, then you probably want to drop down a level and use the same Beat Link library that Beat Link Trigger uses to get it. |
Open broadcaster Studio. To stream video and audio to e.g. Twitch. Yeah, i will take a look and figure something out. |
Thanks for the context! Interesting, I know a number of other people looking at incorporating my discoveries into Twitch streams. Once I finish my current big project which is keeping me from getting enough sleep, I may take a look at writing an example expression for BLT that would offer an embedded web server that could serve an HTML page containing current metadata information, and that you could customize with a template. Would OBS be able to fetch and use that? Alternately, it could write it to a file if that would be more useful. |
That sounds great. Obs can fetch HTML as a single file or as an source from a browser. So if there is an webserver, obs can fetch the URL with its browser source plugin and display the content. As i said, there is an project here on github called "prolink overlay" but for me, it wont work. Perhaps that inspires you. It seem that the author isnt active anymore. |
@KayPure, I was going to tell you that the author of the prolink overlay you mentioned is someone I talk to, because he has been building his software with the help of my dysentery research project, and that you should open an issue in his repository to see if he can help you get it working… but I see you already have! 😄 I expect that as soon as he has some time, he will help you. He just recently started incorporating some of my latest discoveries in his main project related to this. |
@brunchboy awesome, thanks m8! |
Hello I'm getting the same error, metadata is not displayed. I'm using 0.60 on a windows 10 pc, and the xdj are connected to a windows 7 pc with rekordbox in export mode. |
Perhaps they change something in the Code?! Did u get metadata if u play from an analyzed usb stick? I run booth on win 10 machines. |
@capellavacancies that is a different error than you sent on the Gitter chat. This does look like a new problem with the data that rekordbox is reporting, and we will probably need a Wireshark capture to figure out what is going on. Could you open a new issue when you have a chance to capture the packets when the problem happens, and post both the captures and the log file from that time? |
2019-dic-19 00:26:42 ERROR [org.deepsymmetry.beatlink.data.MetadataFinder:124] - Problem requesting metadata, returning null |
Thank you for the additional logs, hopefully you were able to capture the network traffic that was happening between rekordbox and Beat Link Trigger at the same time? And could you please open a new issue for this, because it is a new problem? |
@capellavacancies I am afraid there is nothing I am going to be able to do to fix this if you can’t use Wireshark to capture the network communication between Beat Link Trigger and rekordbox that is causing this problem. I need to be able to see what rekordbox sent so I can figure out how to deal with it, and the problem does not occur with my own tracks. |
For me, I can't receive metadata when the music is coming from Rekordbox in export mode...
I also built a prototype in C and came to the same conclusion.
Track metadata ready response, Figure 24 in the document describing the protocol, at byte 0x26 I receive 0 or 0xFFFFFFFF depending on the decks I have tried...
I have the same behavior with beat-link-trigger.
Should it work with tracks coming from Rekordbox in export mode?
The text was updated successfully, but these errors were encountered: