Se Connecter:     


Forum: VirtualDJ Technical Support

Sujet: Understanding Song Flags in VirtualDJ's database.xml
Hi everyone,

It's best not to mess around with your database. The software manages all the <Song Flag="..."> bits for you, and manually editing them can easily lead to unexpected behavior or database corruption.

That said, some have been curious about what the flag numbers represent. Thanks to a ChatGPT deep dive through the official forums, wiki pages, archived posts and attempts to find any GitHub examples etc, I've compiled what's known (and deduced) so far.

Please treat this as a starting point rather than gospel, and by all means please share corrections or clarifications if you have them. (Remember Cunningham's Law: "the best way to get the right answer on the Internet is to post the wrong one.")

What Each <Song Flag="..."> Value Means

Flag: 0 (omitted)
Meaning: Default audio track, present on disk, searchable
Source: Official (implied)

Flag: 1
Meaning: Hidden from search results (“Remove from search DB”)
Source: Official (VDJ team)

Flag: 16
Meaning: File not found on disk (“Missing track”)
Source: Official (VDJ team)

Flag: 32
Meaning: Karaoke format
Source: Official (VDJ CTO)

Flag: 64
Meaning: Video format
Source: Official (VDJ CTO)

Flag: 256
Meaning: Online/NetSearch streaming content
Source: Community example

Flag: 17 (16+1)
Meaning: Missing and hidden from search
Source: Community deduction

Flag: 18 (16+2)
Meaning: Missing + unused bit (effectively still “missing”)
Source: Community deduction

Flag: 33 (32+1)
Meaning: Karaoke and hidden
Source: Community deduction

Flag: 48 (32+16)
Meaning: Karaoke and missing
Source: Community deduction

Flag: 49 (32+16+1)
Meaning: Karaoke, missing, and hidden
Source: Community deduction

Flag: 65 (64+1)
Meaning: Video and hidden
Source: Community deduction

Flag: 80 (64+16)
Meaning: Video and missing
Source: Community deduction

Flag: 81 (64+16+1)
Meaning: Video, missing, and hidden
Source: Community deduction

Flag: 257 (256+1)
Meaning: NetSearch audio track
Source: Community example


Quote :

Note: Bits 2, 4, 8 and 128 are currently unused—VirtualDJ ignores them (treats them like zero), so setting them has no effect.



A Few Important Caveats


  1. Don't edit flags by hand.
    VirtualDJ teams have explicitly warned against manual database edits. Use the built-in commands (e.g. "Remove missing files" or "Remove from search database") to let the engine keep the flags in sync with your library's actual state.
  2. Official vs. Community sources.

    • Official: Bits 1, 16, 32 and 64 are confirmed by VirtualDJ staff or documentation.
    • Community: Composite flags (17, 33, 65, etc.) and the "online" flag (256/257) are inferred from real-world database dumps and forum examples.

  3. Cunningham's Law in action.
    This post may contain mistakes—please reply with corrections or official insights. That's often the fastest way to refine our collective understanding.



I'll post the full deep-dive report below. Hope this helps anyone curious about what's really going on under the hood of your VirtualDJ library!

Your Friendly (Cunningham-inspired) Researcher
Full Report is below
==================================================

Understanding the <Song> Flag in VirtualDJ's database.xml

Overview: In VirtualDJ's database.xml, the Flag attribute on a <Song> element is a bit-mask that encodes various song properties (like media type, missing status, and search visibility). Certain flag values correspond to single conditions (e.g. 1, 16, 32, 64), while "composite" numbers (e.g. 17, 18, 33, etc.) indicate combinations of those conditions. The details below summarize known flag values, their meanings, whether the info comes from official VirtualDJ sources or community reverse-engineering, and notes/examples. (Note: This is specifically about the <Song ... Flag="x"> attribute – not to be confused with the <Tags ... Flag="x"> attribute, which serves a different purpose​virtualdj.com).

Flag Values and Meanings

Flag Value: 0 (or flag omitted)
Meaning: No special flags. The track is a normal audio music track, file present, and included in search.
Source: Official (implied)
Notes / Examples: Default state. If a flag's value would be 0, the attribute is omitted in the XML​ virtualdj.com. (A typical audio track has no Flag attribute, indicating 0.)

Flag Value: 1
Meaning: Removed from search database (track hidden from search results).
Source: Official (VirtualDJ Team)
Notes / Examples: Set when you choose "Remove from search database." The track remains in the database but is excluded from search​ virtualdj.com. (E.g. <Song ... Flag="1"> means the song is hidden from searches.)

Flag Value: 2
Meaning: No defined meaning (ignored by VirtualDJ).
Source: Official (VirtualDJ Team)
Notes / Examples: This value is not used for any feature – VirtualDJ ignores it (treats it like 0)​ virtualdj.com. If present (e.g. due to manual edit or old quirk), it has no effect on the track's behavior.

Flag Value: 16
Meaning: File not found (missing track on disk).
Source: Official (VirtualDJ Team)
Notes / Examples: Automatically set when the file's path is invalid or the file was moved/deleted​ virtualdj.com. The song will appear as missing in VirtualDJ (e.g. <Song ... Flag="16"> indicates VirtualDJ could not find the file).

Flag Value: 17 (16 + 1)
Meaning: Missing file and removed from search.
Source: Community (deduced)
Notes / Examples: Combination of the missing bit and hidden bit. For example, an audio track that was hidden from search (Flag 1) and later got moved or missing would show Flag="17", meaning VirtualDJ marks it missing​ virtualdj.com and it remains hidden from search​ virtualdj.com.

Flag Value: 18 (16 + 2)
Meaning: Missing file + undefined bit.
Source: Community (deduced)
Notes / Examples: Combination of missing (16) plus an unused flag (2). Effectively this still means the file is missing; the extra "2" is ignored by the software​ virtualdj.com. (In practice, a Flag="18" entry is treated the same as 16 – the track is missing, and not hidden from search.)

Flag Value: 32
Meaning: Karaoke track (marked as karaoke format).
Source: Official (VirtualDJ CTO)
Notes / Examples: VirtualDJ sets this for karaoke files​ virtualdj.com (e.g. MP3+CDG pairs or other recognized karaoke formats). A song with Flag="32" will show the karaoke icon in VirtualDJ's browser.

Flag Value: 33 (32 + 1)
Meaning: Karaoke track hidden from search.
Source: Community (deduced)
Notes / Examples: Karaoke file that was manually removed from search results. Combines the karaoke flag and the "hidden from search" flag. (E.g. if a karaoke song is flagged 32 normally, setting it to 33 would hide it from searches as well.)

Flag Value: 48 (32 + 16)
Meaning: Karaoke track missing on disk.
Source: Community (deduced)
Notes / Examples: Karaoke file not found at its stored location – combines karaoke (32) and missing (16). VirtualDJ would mark it missing and it would still be listed as a karaoke type.

Flag Value: 49 (32 + 16 + 1)
Meaning: Karaoke track missing and hidden.
Source: Community (deduced)
Notes / Examples: All three bits: the track is a karaoke file, the file is missing, and it's excluded from search. (This would be a rare case – e.g. a karaoke track that was hidden, and then the file was removed.)

Flag Value: 64
Meaning: Video track (marked as video format).
Source: Official (VirtualDJ CTO)
Notes / Examples: Set for video files​ virtualdj.com (e.g. .mp4, .avi). A song entry with Flag="64" means VirtualDJ recognizes it as a video and will show the video icon in the browser.

Flag Value: 65 (64 + 1)
Meaning: Video track hidden from search.
Source: Community (deduced)
Notes / Examples: Video file that was manually removed from the search database. Combines the video flag and hidden-from-search flag. (E.g. Flag="65" would denote a video track that will not appear in searches.)

Flag Value: 80 (64 + 16)
Meaning: Video track missing on disk.
Source: Community (deduced)
Notes / Examples: Video file whose location is invalid or file is missing – combines video (64) and missing (16). VirtualDJ would show it as a missing video entry.

Flag Value: 81 (64 + 16 + 1)
Meaning: Video track missing and hidden.
Source: Community (deduced)
Notes / Examples: All three bits: the track is a video, the file cannot be found, and it's hidden from search results.

Flag Value: 256
Meaning: Online track (streaming/NetSearch content).
Source: Community (forum example)
Notes / Examples: Used for entries that come from VirtualDJ's online catalogs (e.g. ContentUnlimited/NetSearch). A value of 256 (0x100) appears to flag a track as an online/streaming sourcevirtualdj.com. (In practice, this bit is seen combined with others – see Flag 257 below.)

Flag Value: 257 (256 + 1)
Meaning: Online audio track (NetSearch content, audio).
Source: Community (forum example)
Notes / Examples: Example: a NetSearch song entry with Flag="257"​ virtualdj.com. Here 256 marks it as an online track, and the low-order 1 indicates a normal audio track. (Notably, in this context the track was not hidden from search by default – the 1 served as an audio-type flag. Users would still need to manually hide it if desired.)


Official vs. Community: In the details above, Official sources mean the meaning was confirmed by VirtualDJ staff or documentation, whereas Community indicates the value was inferred by users from observed behavior or examples. For instance, VirtualDJ team members have explicitly confirmed the meanings of 1, 16, 32, 64 in forum posts​ virtualdj.comvirtualdj.comvirtualdj.com. Composite values like 17, 33, 65, etc., are not directly documented but are logically derived from the bitmask (combining official bits). The 256/257 for online tracks was found in a user's database snippet​ virtualdj.com and is understood through community analysis (VirtualDJ's developers did not publicly document this, but the example implies 0x100 for online content).

Example Entries with Uncommon Flags

To illustrate, here are two real examples of <Song> entries from VirtualDJ databases showing non-basic flag values:

- Flag="16" (Missing file): A song entry from a forum post had Flag="16", indicating the file wasn't found by VirtualDJ​ virtualdj.com. For example:
[code=xml]<Song FilePath="C:\Path\To\MissingSong.mp3" Flag="16">
<Tags Author="Artist" Title="MissingSong" Flag="2" />
<Infos FirstSeen="1627343446" LastModified="1627343641" />
</Song>[/code]
In this case the track was marked as missing (flag 16). (The Tags Flag="2" here is a separate tags-related flag, not to be confused with the song flag.)

- Flag="257" (Online audio track): Another user found entries like:
[code=xml]<Song FilePath="netsearch://dz15194531" Flag="257">
<Tags Author="Wham!" Title="Wake Me Up Before You Go-Go" Album="Make It Big" Flag="1" />
<Infos SongLength="231.341474" FirstSeen="1582652423" Bitrate="320" />
...
</Song>[/code]
Here Flag="257" shows an online-streamed song (from NetSearch)​ virtualdj.com. The 256 portion of the flag marks it as an online track, and the additional 1 indicates it's an audio track. This song would appear in the database with the online source path (netsearch://…) and was not hidden from search by default. (A DJ could later hide it by adding the "1" bit to the flag if it wasn't already set, or by using the UI option to remove from search.)

Conclusion

In summary, the <Song> flag in VirtualDJ is a bitfield combining several indicators:

  • 1 (bit0) – track is excluded from search results (when set via "remove from search db")​ virtualdj.com.
  • 16 (bit4) – track is missing (file not found on disk)​ virtualdj.com.
  • 32 (bit5) – track is karaoke format​ virtualdj.com.
  • 64 (bit6) – track is video format​ virtualdj.com.
  • 256 (bit8) – track is an online/NetSearch content item​ virtualdj.com.

Other values are either combinations of these bits or not used. Official VirtualDJ sources confirm the primary flag meanings, while the community has deduced composite values and uncovered flags for online tracks. Always use caution if manually editing the database – as the VirtualDJ team notes, you generally should not alter these flags by handvirtualdj.com, since the software manages them automatically. Instead, use VirtualDJ's interface (e.g. Add/Remove from search DB, the "Remove missing files" command, etc.) to ensure the flags stay consistent with the actual track status.

Sources: Official VirtualDJ forum posts by staff and developers, VirtualDJ Wiki, and user-contributed examples (citations inline).

Citations

VirtualDJ - DataBase.xml, field for format (karaoke, music, video).
VirtualDJ - Tracks with song flags = 1 aren't searchable
VirtualDJ - Tracks with song flags = 1 aren't searchable
VirtualDJ - Tracks with song flags = 1 aren't searchable
VirtualDJ - database flag="16"
VirtualDJ - DataBase.xml, field for format (karaoke, music, video).
VirtualDJ - Tracks with song flags = 1 aren't searchable
VirtualDJ - database flag="16"
VirtualDJ - Tracks with song flags = 1 aren't searchable

All Sources

virtualdj
virtualdj
virtualdj
 

Posté 5 days ago @ 3:19 am
Very interesting, thanks for the research! 👍🏻

By deduction though, I think the last one is wrong. 257 (0x101) should be streaming track that has been removed from search DB. 257 has bits 8 and 0 set. Bit 8 means streaming track, and bit 0 means hidden.

adamlovedj wrote :
Flag: 1
Meaning: Hidden from search results (“Remove from search DB”)
Source: Official (VDJ team)


adamlovedj wrote :
Flag: 256
Meaning: Online/NetSearch streaming content
Source: Community example


adamlovedj wrote :
Flag: 257 (256+1)
Meaning: NetSearch audio track
Source: Community example