INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Interaction with other players (both update file tags)  (Read 6753 times)

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Interaction with other players (both update file tags)
« on: June 14, 2006, 12:14:28 pm »

I like an active style of listening to music. Not exactly DJing, but I enjoy seeing the song structure, skipping to different sections of a song, looping sections to learn playing them, and any real-time manipulation of audio in general. So I am trying, as alternate audio players, DJ tools.

The organization capabilities are immensely superior in Media Center, however, so I would like the two programs to coexist. I prefer to have Media Center to update the tags inside audio files, while the DJ software should be just a player. From my tests I found that DJ software does not change the file date, but actually writes its tags inside the audio files, and that cannot be disabled. Even if I don't import the file into the DJ tool library, but I play it "on the fly".

So there are two programs that pretend to write their tags into the same audio files. Is it safe to let another program update tags into audio files that belong to the Media Center library, or is there a risk of screwing up the entire audio collection?
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Interaction with other players (both update file tags)
« Reply #1 on: June 14, 2006, 01:38:02 pm »

You can always test the behavior with some test files.

In general, MC does not automatically update the library from tags after the initial import. It just writes the new or changed file tags when needed (if allowed in MC options). On next import MC may react somehow, but that depends your import options, the tag format used and what tags the DJ software writes.

It is quite possible that the DJ software's tags are harmless to MC. What does the Action Window > File Properties > File Type Info display show? (You can right-click copy/paste the info here.)

Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #2 on: June 14, 2006, 03:20:28 pm »

Here is the file info. It seems that the DJ software removed all of the MC custom tags.

MPEG-1 Layer 3
192 Kbit CBR
44.1 Khz Stereo

Copyrighted: No
Original: No
Protected by CRC: No
Gapless: No

ID3v1 Tag: (128 bytes)
   Name: Tapdance
   Artist: David Foster
   Album: White Nights Soundtrack
   Year: 1985
   Comment:
   Track #: 9
   Genre: Retro (76)

ID3v2.3 Tag: (2664 bytes)
  TIT2 (Title): Tapdance
  TALB (Album): White Nights Soundtrack
  TPE1 (Lead performer(s)): David Foster
  TRCK (Track number): 9/10
  TCON (Content type): (76)
  TYER (Year): 1985
   POPM: <unknown data type>
   PCNT: <unknown data type>
  TBPM (BPM (beats per min..): 114


Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Interaction with other players (both update file tags)
« Reply #3 on: June 14, 2006, 03:55:33 pm »

I don't think that is serious. Just keep in mind that some of the information exists only in the library. Keep the files imported and your library backups up-to-date.

Normally MC ignores foreign ID3v2 tags and does not alter them. Next time you change a tag inside MC it will write the proprietary comments back to the file, but most likely the following tags will be preserved:
Quote
POPM: <unknown data type>
PCNT: <unknown data type>

From the ID3v2.3 documentation:
Quote
4.17.Play counter
This is simply a counter of the number of times a file has been played. The value is increased by one every time the file begins to play. There may only be one "PCNT" frame in each tag. When the counter reaches all one's, one byte is inserted in front of the counter thus making the counter eight bits bigger. The counter must be at least 32-bits long to begin with.

<Header for 'Play counter', ID: "PCNT">
Counter  $xx xx xx xx (xx ...)

4.18.Popularimeter
The purpose of this frame is to specify how good an audio file is. Many interesting applications could be found to this frame such as a playlist that features better audiofiles more often than others or it could be used to profile a person's taste and find other 'good' files by comparing people's profiles. The frame is very simple. It contains the email address to the user, one rating byte and a four byte play counter, intended to be increased with one for every time the file is played. The email is a terminated string. The rating is 1-255 where 1 is worst and 255 is best. 0 is unknown. If no personal counter is wanted it may be omitted. When the counter reaches all one's, one byte is inserted in front of the counter thus making the counter eight bits bigger in the same away as the play counter ("PCNT"). There may be more than one "POPM" frame in each tag, but only one with the same email address.

<Header for 'Popularimeter', ID: "POPM">
Email to user <text string> $00
Rating  $xx
Counter $xx xx xx xx (xx ...)

Probably your DJ software does not even need these two tags. I suppose the TBPM (beats per min.) tag is the important one.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #4 on: June 14, 2006, 04:12:23 pm »

2 programs updating tracks, does not sound so good to me. If something goes wrong, where do you point the finger, more importantly, how easily can you recover ?

Disable tag wrting in the program that allows it and you just halved your chances of a potential problem.

Ideally neither program should be touching any files at all.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #5 on: June 15, 2006, 11:58:25 am »

Normally MC ignores foreign ID3v2 tags and does not alter them. Next time you change a tag inside MC it will write the proprietary comments back to the file, but most likely the following tags will be preserved:

It's a good thing that MC preserves "unknown" tags.

Let me explain what I experienced so far. Let's name tags the following way:
A basic tags
B MC-specific tags
C DJ software-specific tags

At the beginning the audio file contains A+B tags. After playing the track with DJ software, it contains A+C tags. The DJ software discards any MC-specific tags. What happens then, when I change a tag in Media Center again? Will the file contain A+B+C or A+B?

I am going to experiment further in my test system, when I have some spare time.

Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #6 on: June 15, 2006, 12:03:47 pm »

2 programs updating tracks, does not sound so good to me.

I started this thread because I was afraid of seeing two programs trying to update tags into the same audio file. Besides that, I think that the hard disk fragmentation increases every time a file is updated. AFAIK, when a file is updated, it is written in a new physical location on the hard disk.

Quote
If something goes wrong, where do you point the finger, more importantly, how easily can you recover ?

Since audio files are an important asset for me, I perform a weekly backup on another hard disk, and periodically I backup to DVD-R too.

Quote
Disable tag wrting in the program that allows it and you just halved your chances of a potential problem.

The DJ program is somewhat aggressive and always writes tags in all the files it plays. You just can't disable it.

Quote
Ideally neither program should be touching any files at all.

I prefer to keep my audio files tidy, so I let Media Center touch the file's tags. Is there any way to disable it? I was unaware of that. And a way and to quiclky update file tags only on demand, even if updating was disabled?
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #7 on: June 15, 2006, 01:50:13 pm »

Defragmentation is less of an issue, compared to files getting updated by two programs over time even if you make incremental backups, they will get tainted over time.

What happens if you replace either MC or the DJ program, do they now also get to add their specific tags to the files too ?

Not that any of this tag re-writing will affect the audio in the slightest, it just feels messy, only the program that wrote its tags can remove them.

I would seriously raise the point in the related forum (if they have one) of allowing the option not to write to the files.

Meanwhile how well does the DJ program handle read only files ?

Quote
A basic tags
B MC-specific tags
C DJ software-specific tags

You need to ensure that the basic tags that MC writes are mutually exclusive to those of the other program, or the next time you do a Locate->On Disk (inside media center) on them, MC will re-read those files and update their tags in the library.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #8 on: June 15, 2006, 02:17:51 pm »

What happens if you replace either MC or the DJ program, do they now also get to add their specific tags to the files too ?
What do you mean by replacing a program?

Quote
Meanwhile how well does the DJ program handle read only files ?

You need to ensure that the basic tags that MC writes are mutually exclusive to those of the other program,
I am going to experiment with that during the week-end.

Quote
or the next time you do a Locate->On Disk (inside media center) on them, MC will re-read those files and update their tags in the library.
This is another behavior I was unaware of. I don't really know exactly how MC handles tags. I am going to discover it by trial and error.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #9 on: June 15, 2006, 02:32:10 pm »

What do you mean by replacing a program?
Use different software in place of what you have atm to play/manage/DJ.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #10 on: June 15, 2006, 02:51:25 pm »

I don't have the time for such experiments. It's heavy, it really takes a lot of time.

I will try to post a question in the DJ software forum.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #11 on: June 16, 2006, 02:40:29 pm »

Meanwhile how well does the DJ program handle read only files ?
Good idea. Unfortunately the DJ software clears the read-only bit on the audio file, and writes its own tags in it, without changing the file date. Not a very polite behaviour. I think that any further test is useless at this point.

It is clearly too dangerous to let the DJ software manipulate audio files already in the MC library. So every time I want to do some active listening, I will copy a playlist to a temporary directory and let the DJ software use that copy. This is not so immediate, and does not allow full creativity, as you have to choose files in advance and cannot choose them on the fly.

Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #12 on: June 16, 2006, 03:42:19 pm »

Good idea. Unfortunately the DJ software clears the read-only bit on the audio file, and writes its own tags in it, without changing the file date. Not a very polite behaviour. I think that any further test is useless at this point.
What if you made the album directory read only, if you are using NTFS there are more options like changing ownership etc.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #13 on: June 16, 2006, 04:02:09 pm »

The DJ software updates audio files even if they are in a read-only directory. The read-only flag of files is cleared, the read-only flag of the directory is preserved.

I am using NTFS. If I deny write permission to the file, the DJ software does not write its tags to the file, and does not complain either. The file becomes difficult to handle, as I get an “access denied” error if I try to delete it from Explorer.

This is a good workaround, but I would not risk my entire audio collection performing this trick.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #14 on: June 17, 2006, 03:51:39 am »

If the only alternative is to allow the DJ software to write its tags, till they allow the option not to write to files. You might consider this.

Make a note of all the fields that the DJ software updates, especially basic ones that MC will also write to. These i would say are the problem tags that will cause MC to think stuff has changed w.o it's permission :)

Now in MC you will need to create custom fields that serve as a backup of these fields against any future updates. For example Artist (B), Album (B), Track # (B) and so on...

The idea here is once you have done initial tagging of basic fields in MC they wont really change all that much in the future.

Now play with the DJ software. It will go on its merry way updating fields as it sees fit.

After this in MC, do a update library from tags on the test sample that the DJ software interacted with. If you notice any changes, all you need to do to recover them is a Move/Copy of the backup fields back to the original one.

What would be really cool at this stage is if there was an expression that could test if there were any differences between the basic fields and their backup copies, and show you only the ones that have been changed.

Not really the best solution but hopefully one that allows more freeedom when working between both programs. You will still have to deal with the MC specific & DJ specific tags in each file tho.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #15 on: June 17, 2006, 04:35:58 am »

I am trying a workaround. I installed the DJ software as another user, and gave read-only NTFS permissions (not just the read-only flag) on both the audio directory and files to the user who owns the DJ software. However, when I start the DJ software from the basic user, it runs with the basic user credentials. I don’t know how to change credentials under Windows (“su” in Unix).
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #16 on: June 17, 2006, 05:11:52 am »

However, when I start the DJ software from the basic user, it runs with the basic user credentials. I don’t know how to change credentials under Windows (“su” in Unix).
Won't a log out followed by a login as that user suffice ?

I think with XP there are eaiser ways to do the same.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #17 on: June 17, 2006, 05:44:07 am »

Won't a log out followed by a login as that user suffice ?
Of course it does. But I have to close all open applications (or, even worse, use Fast User Switching). I was looking for something more user-friendly.  I need to keep other programs open.

Quote
I think with XP there are eaiser ways to do the same.
I think too, but I don’t know how to do that. Maybe it is so easy that I just cannot figure out how to.
Logged

mhakman

  • World Citizen
  • ***
  • Posts: 206
Re: Interaction with other players (both update file tags)
« Reply #18 on: June 17, 2006, 07:29:29 am »

You could let DJ access your files via read-only network share (on the same computer if you want) and let MC access the files in a normal read/write way. Then you don’t have to change users, neither to set access privileges or attributes in XP (except for the share) and I don’t think that DJ will be able to write to the files.

Regards/Mikael
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #19 on: June 17, 2006, 11:20:17 am »

Thanks to everybody for the suggestions.

In this discussion I have figured out that tagging of audio files could lead to hard disk fragmentation. So it is better to disable writing of tags in MC. The place to disable tag writing is the checkbox in Tools > Options > General > Importing & Tagging > Update tags when file info changes. However, with this option disabled, you cannot update tags even on demand. You have to set this option back on before proceeding, then disable it again when you are done.

As in a previous post of mine, let’s call:
A basic tags
B MC-specific tags
C DJ software-specific tags

So far I have found 4 possible solutions.

1) Let the DJ software write its own tag (C) in audio files, while keeping a backup copy of the original tags inside MC.
I am going to make further experiments in order to determine what happens to A, B and C tags.
2) Install the DJ software as a different user, disable NTFS-level writing to audio files for that user, and run the DJ software logged as that user.
This works, but it is not user-friendly. You have to close all applications before logging out and then in again.
3) Install the DJ software as a different user, disable NTFS-level writing to audio files for that user, log on as your standard user and run the DJ software using some form of impersonification or “switch user”.
I haven’t found how to do it in Windows XP yet.
4) Put the audio files on a read-only share and let the DJ software access them from there.
The concept is good, but it is too tricky and I fear it is not so reliable. There are too many levels of indirection involved here. Also, I have too many top-level directories to share.
Logged

mhakman

  • World Citizen
  • ***
  • Posts: 206
Re: Interaction with other players (both update file tags)
« Reply #20 on: June 17, 2006, 03:27:26 pm »


4) Put the audio files on a read-only share and let the DJ software access them from there.
The concept is good, but it is too tricky and I fear it is not so reliable. There are too many levels of indirection involved here. Also, I have too many top-level directories to share.

Not that I have the ambition to suggest for you which solution to choose but do it for the right reasons.

Pointing on a folder and selecting “share this folder” with your mouse – how tricky can it get?

Read-only network shares are of enterprise-grade reliability. It hardy gets more reliable than that.

Many top-level directories – read-only share the whole drive. And only with yourself, should the need be.

Regards/Mikael
Logged

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re: Interaction with other players (both update file tags)
« Reply #21 on: June 18, 2006, 02:40:40 am »

Of course it does. But I have to close all open applications (or, even worse, use Fast User Switching). I was looking for something more user-friendly.  I need to keep other programs open.
I think too, but I don’t know how to do that. Maybe it is so easy that I just cannot figure out how to.

Can't you right click and do a 'run as'?

This post illustrates why I allow no program to write to my files.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #22 on: June 18, 2006, 05:30:28 am »

Many top-level directories – read-only share the whole drive. And only with yourself, should the need be.
I seldom use Explorer, and I am not an authority about resource sharing. At work I see only directory-level shares, and I know that Windows already shares entire drives for administrative purposes (C$, D$, ...), so I thought I could not add another share for the entire drive. After I read your post I tried again, and I discovered with pleasure that Windows XP allows you to create more than one share. I didn't expect it to be so flexible.

Quote
Read-only network shares are of enterprise-grade reliability. It hardy gets more reliable than that.
About reliability I think that sharing a directory or a drive is always a security threat. But I'm doing it at home, where users are few and trusted, and I allow only one connection from my own authenticated user. So I should be somewhat safe.

In conclusion, given pros and cons, a read-only share seems the easiest method to stop the (impolite) DJ software from writing its own tags to audio files.
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #23 on: June 18, 2006, 05:50:27 am »

Can't you right click and do a 'run as'?
As I said earlier, Maybe it is so easy that I just cannot figure out how to. In facts it is so easy.

I prefer using the keyboard and I enjoy old school interfaces such as Orthodox File Managers.

I seldom use Windows Explorer. I think that a 2-dimensional user interface is appropriate only in a few contexts (media browsing, like in Media Center, is one of such contexts). Otherwise I prefer a 1-dimensional (command-line) interface. I enjoy typing, and having all functions available at my fingertips, without resorting to eye-hand coordination and useless mouse motion. It is so inefficient.

Of course there should be a way to start a program the "Run As" way from command line (or a shortcut icon) with an hard-coded username (password should always be entered manually). I don't know how to do that, however.

Quote
This post illustrates why I allow no program to write to my files.
What post? The link is missing.
Logged

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re: Interaction with other players (both update file tags)
« Reply #24 on: June 18, 2006, 07:26:35 am »

Of course there should be a way to start a program the "Run As" way from command line (or a shortcut icon) with an hard-coded username (password should always be entered manually). I don't know how to do that, however.

Indeed there should be.

Type 'runas' at the command prompt and see what you need to do.
Same info is here too:
runas info

You could also script it for fun. Save as a .vbs file

Code: [Select]
Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:administrator ""NotePad.exe"""
WScript.Sleep 100
'Replace password below with the users password. The tilde must remain!
oShell.Sendkeys "password~"
Wscript.Quit
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #25 on: June 18, 2006, 09:15:06 am »

Code: [Select]
Option explicit
dim oShell
set oShell= Wscript.CreateObject("WScript.Shell")
oShell.Run "runas /user:administrator ""NotePad.exe"""
WScript.Sleep 100
'Replace password below with the users password. The tilde must remain!
oShell.Sendkeys "password~"
Wscript.Quit
What language is it? Visual Basic or something else? Does Windows run BASIC programs even without an interpreter? What is WScript? I'm not into programming with Microsoft languages, my knowledge is limited is this field.
Logged

hit_ny

  • Citizen of the Universe
  • *****
  • Posts: 3310
  • nothing more to say...
Re: Interaction with other players (both update file tags)
« Reply #26 on: June 18, 2006, 11:59:57 am »

It's a vbscript, incredibly powerful, allows you to do everything on a windows PC.

Slight Problem with it is, all the win viruses out there also abuse it :P
Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #27 on: June 18, 2006, 01:27:44 pm »

It is included in every copy of Windows, I suppose. What development tools can be used to develop in vbscript?
Logged

GHammer

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1930
  • Stereotypes are a real timesaver!
Re: Interaction with other players (both update file tags)
« Reply #28 on: June 18, 2006, 11:34:19 pm »

I have no idea if there are tools for writing scripts.
There is a reference however, and except for dangerous commands, the best way to learn is to jump in. It is not C or VB, as you said, more like BASIC.

It is included in XP for certain, likely 2K and 2K3. Been awhile since I looked at 2K...

Is it useful for viruses? Sure, and because of that you may have to allow scripts you write or your malware tool might block the script from running.


Logged

negopus

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 295
  • Negopus: negotium, otium et opus
Re: Interaction with other players (both update file tags)
« Reply #29 on: June 25, 2006, 10:35:25 am »

A brief update about the interaction with a DJ software:
•   The DJ software actually does complain about not being able writing tags to audio files, but does not stop working.
•   While reading files from read-only shared directories, the DJ software has some hiccups. This does not happen during normal operation. The DJ software is supposed to be rock-solid, suitable for live acts and live broadcasting.

Logged
Pages: [1]   Go Up