jamulussoftware / jamulus

Jamulus enables musicians to perform real-time jam sessions over the internet.
https://jamulus.io
Other
1k stars 224 forks source link

username not saved when recording from server #982

Closed maurerle closed 3 years ago

maurerle commented 3 years ago

Describe the bug I started the server with Jamulus --server --nogui --recording /data the recorded files are named like "____-192_168_178_x_21175-0-1.wav" even though the user has a username in Jamulus. I saw that the recorded file of a user, which set is name in the recording session had the correct name "user-ip_add_ressx***.wav

To Reproduce record session with server, look at recorded filenames

Expected behavior recorded file should contain name of jamulus client

Screenshots

Operating system Windows 10 Version 20H2

Version of Jamulus 3.6.2

chrisrimple commented 3 years ago

Not a bug. If recording is started before a client connects to the server, the recording file will not have the client name. If recording is started, or restarted, after a client connects to the server, the client name is used for the recording file.

maurerle commented 3 years ago

Thank you for your help. The server will record for each connected client into a seperate wav file right? But only starts on connect of a client? So the server should be able to know the clients name, isn't it?

Is there a way to start recording after clients are connected in nogui mode?

chrisrimple commented 3 years ago

Yes, the server starts recording when a client connects. But the server hasn't received the client's name yet (when the connection is made), so starts recording using date/time for the filename. I'm unclear if the start of recording could be delayed until the client's name has been received - perhaps a developer could look into the sequencing.

After all clients have joined the server (or anytime), force recording to restart: systemctl kill -s SIGUSR1 jamulus

If clients are still on the server but you want to download recording files, force recording to restart so the files are closed: systemctl kill -s SIGUSR1 jamulus

Turn recording on or off: systemctl kill -s SIGUSR2 jamulus

Note that you may need to add "sudo " before the commands, depending on your Linux implementation.

pljones commented 3 years ago

Recording records audio immediately and asynchronously from the main server. The only way it could "wait" would be not to get sent audio. Of course, not all users have names and waiting to receive their name before saving audio would mean none ever got saved.

So that's a very bad idea.

nefarius2001 commented 3 years ago

Starting the record with some seconds delay after client connect?

pljones commented 3 years ago

I've answered that already. It's no good starting the recording late just to get the user name in the file name - you lose more important information -- their audio! Their name can appear letter by letter over several seconds, as they type it in. Or not all! At what point should the recording start? The best time to take the name as at the end of the recording -- which is what happens.

nefarius2001 commented 3 years ago

Thanks for clarifying, @pljones, I didn't get your first answer correctly.

maurerle commented 3 years ago

To clarify what I expect:

  1. Server is running in recording mode
  2. I start Jamulus with a configured Name
  3. I connect to the server (which hopefully sends my current username to the server)
  4. Server opens .wav filestream containing my username

but instead of the username at connect-time, the IP is used. Which is good as a fallback if no username is set (yet), but a configured client already has a username at connect time, doesn't it?

This is not about an unconfigured client which does not have a username yet and would get one in the middle of the jam, nor is this about starting the recording later and wait for the user to add a name

Currently working solution:

  1. Start server with recording off
  2. connect user
  3. start recording with SIGUSR2
  4. saved files contain username
ginjo commented 2 years ago

Our hopes & expectations are similar to @maurerle. We would like to see client names as part of the record file names. Here's our setup, which I suspect is common:

We hold band practice for 2-4 hours at a time. We record the entire session. The server is private on a AWS EC2 instance, starts up automatically in recording mode, and no one touches the server during the session. Members come and go as they please. Some members run multiple Jamulus instances to cover multiple instruments. All members have entered the necessary identifying information in their local Jamulus(s) before connecting to the server. After the session ends and all members have disconnected, it is my job to sort through the recorded files and finally shut down the server.

In our case, we don't even get a legitimate IP in the file name, so associating recorded files with members requires consulting the .rpp file, which does have all member names... but that is rather tedious.

The core functionality of Jamulus is spectacular, and the recordings come out amazingly well. However, properly named record files would make post-session review and processing much more fun.

chrisrimple commented 2 years ago

@ginjo See earlier in the thread for instructions that I provided to force recording to restart, which will pick up correct filenames for all users connected at that time. Doesn't help if you do it near the start of band rehearsal and someone joins 30 minutes in, but at least it solves for those that are present at/near the start.

To @pljones' comment earlier, that names are taking at the end of recording, that's not my experience. In the scenario where recording is already enabled when musicians arrive, no filenames have the Jamulus names and they are not stored in the LOF file (for Audacity). So I have to go listen to each WAV file to identity the musician that was recorded in it. Reworking the recording logic to send the name at the end would be a nice change. :)

gilgongo commented 2 years ago

See also the discussion here https://github.com/jamulussoftware/jamulus/discussions/1969

ginjo commented 2 years ago

Thanks @chrisrimple , If everyone shows up on time and doesn't leave/return, that could work, but our members are rarely that punctual (myself included). I suppose we could restart recording every time someone logs in, but the additional recordings folders would make post production even more troublesome.

While the .lof file lacks names when it is generated at the end of the session, I've noticed that the .rpp file does contain the names. Unfortunately, .rpp is not a standard XML format, so using it to automatically parse and rename the recorded files adds another layer of complexity (I think there's a Python project for this).

@pljones If naming the recorded files with client names is just too tricky for Jamulus, how about creating one more metadata file at session-close, same data as the .rpp file but in standard XML (or json or yaml)? That would give us plenty of options for post-session scripting.

@gilgongo thanks, I hadn't even thought of the privacy angle. None of our members would care about that, but I can see it being an issue on public servers. Personally, I don't see the fuss, as we're just tracking nicknames.