Home > OS >  Strange Timestamp
Strange Timestamp

Time:12-16

I am working on a system related to Audio recordings, specifically a single audio file which contains different tracks mixed together, one after the other.

Each audio file comes with a plist file (xml) with the timestamp details, however im struggling to work out how the timestamps work as I have no documentation at all.

As an example I've made a very simple audio file which is just 3 minutes long, and contains just 3 tracks. Each track lasts for 1 minute. The resulting xml is created, containing 2 timestamps which is expected...but as mentioned I've no idea how to convert these created timestamps to something I can use.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>playlist_Artist</key>
    <array>
        <string></string>
        <string></string>
    </array>
    <key>playlist_TimeStamp</key>
    <array>
        <integer>2918400</integer>
        <integer>5763072</integer>
    </array>
    <key>playlist_Title</key>
    <array>
        <string></string>
        <string></string>
    </array>
    <key>plist_AudioDuration</key>
    <string>00:03:03</string>
    <key>plist_Format</key>
    <string>WAV 48kHz</string>
    <key>plist_ReleaseDate</key>
    <integer>1671104959</integer>
    <key>plist_SampleRate</key>
    <real>48000</real>
    <key>plist_Tag</key>
    <array>
        <string>LIVE-RECORDING</string>
    </array>
    <key>plist_Title</key>
    <string>LIVE-RECORDING.wav</string>
    <key>plist_UpdateDate</key>
    <integer>1671104959</integer>
</dict>
</plist>

I tried to make the tracks switch at nice round timings hoping it would make things more apparent, but due to human error the first timestamp (2918400) occurs after 61 seconds, and the second timestamp (5763072) occurs after 120 seconds.

So does anyone have any ideas what format these timestamps are in, or how these timestamps work? There may well be something obvious im overlooking.

I appreciate any ideas/suggestions. Thanks

Due to the presence of epoch timestamps elsewhere in the plist file I (wrongly) presumed they would be some variation of these, but looking at them now im not seeing how this is possible. Ive had a look at other timestamp types but so far have come up with nothing.

CodePudding user response:

It seems to me that it is not a timestamp, but the number of samples since the beginning of the recording at a sampling rate of 48 kHz (<real>48000</real>). The key name <key>playlist_TimeStamp</key> is misleading.

If you divide both values by the seconds, you get almost the same result:

2918400 ÷ 61 = 47843

5763072 ÷ 120 = 48026

If you have a <playlist_TimeStamp> and want to know the position in your recording, devide it by the value of <real> and you get the seconds from start:

Example

<integer>2016000</integer>: 2016000 samples ÷ 480000 samples/sec= 42 sec

CodePudding user response:

Answered correctly by @jpseng. The key playlist_TimeStamp is misleading, it’s the number of samples since the beginning of the recording at a sampling rate of 48 kHz.

  • Related