Skip to content
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

How is the audio recording stored? #93

Closed
gomingchen opened this issue Oct 26, 2022 · 9 comments
Closed

How is the audio recording stored? #93

gomingchen opened this issue Oct 26, 2022 · 9 comments
Labels
documentation Improvements or additions to documentation

Comments

@gomingchen
Copy link

gomingchen commented Oct 26, 2022

Hi folks,

Amazing work here. But I have trouble reading the microphone recordings. So I can get the audio data by using readDataRecordByTime(mic_stream_id, timestamp), and got a matrix with dimensions (number of timestamps) X 28672. I know there are 7 microphones, and I assume the recordings from the 7 channels are stored like (mic0, mic1,...mic6) sample-wise, but I also observe the class is called stereoaudiorecordable class, and there seem to be repetitions of the same sound block, and they are 4096 samples apart. After taking every other block of 4096 samples, the one-mic recording still sounds weird. I used the everyday activity file in the sample dataset. How can I correctly extract data from each microphone? Thank you very much!

Update: I got most of it, but have one question: is the cutoff time 0.65?
I used the time stamps provided in the CSV file "timestamp_map" which I think is not for microphones. 4096 samples equal to 85333 ms, while the interval between neighboring timestamps is 33333.3 ms which is shorter than 85333. That's why I am seeing repeating blocks of 28672 samples either every two or three blocks. I plotted many and found a pattern that retrieved the Nth recording if the fraction of the time difference (timestamp[i] - timestamp[0])*1e-3/(4096/fs)/1e6 is less than 0.65 (the integer of the time difference is N), or it'll be (N+1)th. This assigns an index for each block read from the time stamps, so I can only choose the unique ones. I got a decent recording that sounds like normal speech. Just want to double-check, is the cutoff fraction 0.65 correct? Or is it some other number?

Thank you. Much appreciate any response from your team!

@gomingchen gomingchen added the documentation Improvements or additions to documentation label Oct 26, 2022
@SeaOtocinclus
Copy link
Contributor

Hello @gomingchen
FYI, we would advise you to post in https://github.com/facebookresearch/Aria_data_tools for questions related to the Aria Pilot dataset and its data provider.
It seems that today you are using directly VRS to parse sound data, that's one way to do it, but we are also providing data_provider in aria_data_tools to ease how to get data in sync (i.e AriaAudioPlayer class https://github.com/facebookresearch/Aria_data_tools/blob/main/src/data_provider/players/AriaAudioPlayer.h to retrieve your audio samples).

Regarding the timestamps they should be valid for the given recording (start to end).

@georges-berenger Any comment regarding a cutoff time?

@georges-berenger
Copy link
Contributor

I'm not sure how you're reading the audio data, or how you see "the interval between neighboring timestamps is 33333.3 ms" (which is 33.333 seconds, but I assume you actually meant 33.333 ms), or how you get "28672 samples".

The audio records should have 147465 bytes total, 32777 bytes of metadata in a datalayout content block, followed by 114688 bytes of audio data. If you're using a RecordFormatStreamPlayer to read the records (as you should), then the record is parsed for you and you receive the audio data in the onAudioRead callback.
The audio format should be: audio/pcm/int32le/channels=7/rate=48000, and each audio block should contain 114688 bytes.
That's 4096 frames of 7 int32 little endian values, one int32 value for each of the 7 audio channels recorded at 48.000 samples per second. 7 channels x 4 bytes x 4096 = 114688 bytes.
If you look at the timestamps in ns for each sample, which you get in the onDataLayoutRead callback, you should see an increment of roughly 1000000000/48000 = 20833.33 ns, with the timestamp of the first audio sample matching the timestamp of the VRS record.

@gomingchen
Copy link
Author

gomingchen commented Oct 28, 2022

Hi @georges-berenger and @SeaOtocinclus ,

Thank you for your replies. It's very helpful to learn the details. It was a typo, which should be "us". I read it three times before submitting it but never noticed it.

This is how I got 28672 (=4096 X 7) samples. By sample, I mean a datapoint in audio recording.

def readmicdata(filename, tsarr):
    vrs_data_provider = datatools.dataprovider.AriaVrsDataProvider()
    vrs_data_provider.openFile(filename)

    # 1. set sensor player
    vrs_data_provider.setAudioPlayer()

    # 2. Get stream ID
    mic_type_id = 231
    mic_instance_id = 1
    mic_stream_id = datatools.dataprovider.StreamId(mic_type_id, mic_instance_id)


    # 3. Set stream player
    vrs_data_provider.setStreamPlayer(mic_stream_id)
    vrs_data_provider.setVerbose(True)
    vrs_data_provider.readAllRecords()

    # 4. Get stream player
    mic_player = vrs_data_provider.getAudioPlayer()  # 'getConfigRecord', 'getData', 'getDataRecord', 'getNextTimestampSec', 'getStreamId'
    config = mic_player.getConfigRecord()
    fs = config.sampleRate
    Nchan = config.numChannels
    splfmt = config.sampleFormat
   

    # 5. Read frame from a timestamp
    barr = []
    for someTimestamp in tsarr:
        timestampinSec = int(someTimestamp) * 1e-9
        readresult = vrs_data_provider.readDataRecordByTime(mic_stream_id,
                                                            timestampinSec)  
        mic_data = mic_player.getData() 
        sound = mic_data.data
        if readresult:
            barr.append(sound)


   return barr

The Dataset is recording_1 in everyday activity in sample aria dataset. The main function:

if __name__ == '__main__':

    file = 'data/everydayact/recording.vrs'
    csv_file = 'data/everydayact/synchronization/timestamp_map.csv'
    timestamparr = []

    with open(csv_file, newline='') as csvfile:

        csvreader = csv.reader(csvfile, delimiter=',', quotechar='"')
        first_row = next(csvreader)
        # get number of columns
        for idx, row in enumerate(csvreader):
            first_item = row[0]
            timestamparr.append(first_item)

    buff = readmicdata(file, timestamparr)

This buff is the matrix I mentioned. The last three timestamps can't be read, message below:

Can't read record at timestamp 499.993856212 for stream: 231-1, Stereo Audio Class #1.
Can't read record at timestamp 500.02719036200006 for stream: 231-1, Stereo Audio Class #1.
Can't read record at timestamp 500.06052362500003 for stream: 231-1, Stereo Audio Class #1.

So I got a matrix with dimension 3549 (number of timestamps) X 28672.
The following is the plot of the 10 blocks from the first 10 timestamps:
first10

Notice how they repeat every two or three blocks? There are only four unique recordings in the first 10 blocks.
Here is a list of the timestamps and the index of the unique audio recordings:

VRS Timestamp Index of unique blocks
1 379694144350.000 0
2 379727477650.000 0
3 379760810750.000 1
4 379794143875.000 1
5 379827477150.000 1
6 379860810675.000 2
7 379894143775.000 2
8 379927477012.000 3
9 379960810425.000 3
10 379994146487.000 3

I tried to find the pattern. Call this time difference (timestamp[i] - timestamp[0])*1e-9/(4096/fs)

VRS Timestamp Index of unique blocks Time difference
1 379694144350.000 0 0
2 379727477650.000 0 0.390621093750000
3 379760810750.000 1 0.781242187500000
4 379794143875.000 1 1.17187500000000
5 379827477150.000 1 1.56249609375000
6 379860810675.000 2 1.95311718750000
7 379894143775.000 2 2.34373828125000
8 379927477012.000 3 2.73437109375000
9 379960810425.000 3 3.12499218750000
10 379994146487.000 3 3.51564843750000

See line 8, the index of unique blocks changes to 3 when the time difference is 2.73. I have also manually labeled tens. I think the cutoff is around 0.65. The following is MATLAB code for me to decide:

ts = csvread('data/everydayact/synchronization/timestamp_map.csv', 1, 0);
stamp = ts(:,1);
aff = round(stamp*1e-9 - stamp(1)*1e-9)/(4096/fs); % the time difference
u = 0;
re = zeros(length(stamp),1);
for p = 1:length(aff)
    number = aff(p);
    integ = fix(number);
    fract = abs(number - integ);
    if fract >= 0.65
        re(p) = integ + 1;
    else
        re(p) = integ;
    end
    
end

I think after all I cheated on this. There are better ways to read the audio recordings by using the real timestamps of them.
A question for you, why is the increment "1000000000/48000 = 20833.33 ns"?

@SeaOtocinclus Could you please give me a few lines as an example about how to use AriaAudioPlayer class? I found some documentation about pyvrs.reader module. Is that where I should look at?

@georges-berenger
Copy link
Contributor

In order to be sure about you're looking at, let's use the command line tools that allow you to look at the data. Part of the vrs open source project, there is the "vrs" command line tool, which allows you to peek at the data. Here, we need to inspect audio data only, which means we only need to look at streams with the RecordableTypeId 231 (there should be only one such streams in your files), so we will add the "+ 231" options to commands. To limit the time range of what we're looking at, let's only look at the first 1 second of data records, with the "--before +1" options. Please make sure to use these exactly as indicated, with the plus sign and spaces. The last command will also validate that the file can be read correctly.

vrs file.vrs + 231 # will give us an overview of the audio stream
vrs file.vrs + 231 --before +1 # will show the list of records until 1 second after the first audio data record
vrs print + 231 --before +1 # will print the records (much larger output)

Please provide me with the 3 outputs so we can talk about the same thing, I know for sure what you're looking at.
What you call "VRS Timestamp" aren't really VRS timestamps, if only because all timestamps at the VRS file format level are expressed using double numbers which are counting seconds, so when you write "379694144350.000", which is a floating point value, but a count of ns, I can't tell where you got the number.
When you write "28672 (=4096 X 7) samples", I see what you're saying: you're counting the number of individual audio samples indeed within a record. So in each audio record, you will find 4096 "frames" of 7 samples recorded at the same timestamp, one for each of the 7 audio channels.
The audio sample rate is 48k, meaning we record 48,000 audio sample for each channel per second, which is why the timestamp increment between successive audio samples should be about "1000000000/48000 = 20833.33 ns". So frames of 7 audio samples (one per audio channel), are about 20.833us apart, and the audio records which contain 4096 frames are about 4096*1000.0/48000=85.33ms apart.

@gomingchen
Copy link
Author

gomingchen commented Nov 1, 2022

Thank you, @georges-berenger !

My comments

The three fractional zeros after the timestamps are added by MATLAB when it reads the csv file. The timestamps are from a file called "timestamp_map.csv" in "synchronization" folder under "recording_1" folder. If you download aria sample dataset, there are two folders under "everyday activity", one is "recording_1", and another is "recording_2".

Exactly - 85.33ms apart between every 4096 samples for one mic or 28672 samples collected by all 7 mics. That's what I was asking, since 85.33 ms is longer than 33.33 ms (the time interval between neighboring vrs timestamps), what are the rules of audio recordings being retrieved based on vrs timestamps? Or are there audio timestamps that are 85.33 ms apart? How can I read audio recordings without trying to find the repetitions?

Thank you for your time!

Output of the three commands

Output of vrs file.vrs + 231
root@2f3495aab0d9:/# vrs recording.vrs + 231
VRS file: 'recording.vrs', 1.19 GB.
Tag: calib_json = {"AlgorithmName":"AriaEtExtrinsicsMirrorStationCalibration","AlgorithmVersion":"<No HG commit hash available - Buck build>","BaroCalibrations":[{"Label":"baro0","PressureModel":{"Name":"Linear","OffsetPa":-106.6714,"Slope":1.0001},"SerialNumber":""}],"CalibrationSource":"Factory","CameraCalibrations":[{"Calibrated":true,"Label":"camera-slam-left","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[241.8971379654589,318.9457502749067,237.7491728877724,-0.0298902638495018,0.112147910386769,-0.08553607773802731,0.02157134450478395,-0.001722443931504995,-3.687227546202424e-05,0.0007568568738212922,-0.001798331427039427,-0.0009920238048332897,-9.508126715431386e-05,0.00135792509216215,-0.0002030069298922764]},"SerialNumber":"0072510f1b210405090000052f1b0001","T_Device_Camera":{"Translation":[3.469446951953614e-18,1.387778780781446e-17,0],"UnitQuaternion":[1,[0,0,0]]}},{"Calibrated":true,"Label":"camera-slam-right","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[241.9816554299552,317.5921103929318,242.3414267934209,-0.0252229265415765,0.09916485968301648,-0.06883656772078174,0.01074643686159648,0.001808057702775166,-0.0004971607519367475,0.001407583960672652,-0.000397342335625801,-0.00228249166683509,0.0001359719975547116,0.001225855976053143,6.117842910678839e-06]},"SerialNumber":"0072510f1b2107010800000b11290001","T_Device_Camera":{"Translation":[0.005042415731391439,-0.1082579265750135,-0.08500089066565701],"UnitQuaternion":[0.7870726893662587,[0.6159760624091268,0.004271920230851599,0.03273870630085256]]}},{"Calibrated":true,"Label":"camera-et-left","Projection":{"Description":"fx, fy, cx, cy, kb0, kb1, kb2, kb3","Name":"KannalaBrandtK3","Params":[553.7353568555496,553.5271036717626,319.4999041005779,239.4996564814754,0.01211698887990899,0.2238615877537595,-0.8040674074332136,0.7689037079543423]},"SerialNumber":"4753313330474a31303234303030304c","T_Device_Camera":{"Translation":[0.02153333643987137,-0.01153649433424641,-0.007557141933489846],"UnitQuaternion":[-0.2248225653968274,[0.38475033105069,0.858344932954478,-0.2542950509076937]]}},{"Calibrated":true,"Label":"camera-et-right","Projection":{"Description":"fx, fy, cx, cy, kb0, kb1, kb2, kb3","Name":"KannalaBrandtK3","Params":[551.4306538980707,550.8609462028721,319.5001339751798,239.5003674068313,0.02618081083253225,0.06372604002065624,-0.1783862227439982,0.005238298034630603]},"SerialNumber":"4753313330474a313032343030303052","T_Device_Camera":{"Translation":[0.02565591322019532,-0.0951120139328757,-0.07577969442248363],"UnitQuaternion":[-0.7464319539867283,[0.4656229231619292,0.4731855294443145,0.04615285709681265]]}},{"Calibrated":true,"Label":"camera-rgb","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[1217.85111143048,1456.022964240926,1445.73331423538,0.3877090025533652,-0.3156133839689442,-0.3434984955068093,1.856587420098875,-2.179937222100279,0.7713834762565884,-0.0002747018833370422,0.0005228973690976568,0.0001348840117906014,-8.482198309822946e-05,-0.0009420014144244382,-0.0001276837565837671]},"SerialNumber":"0450577b730404624401100000000000","T_Device_Camera":{"Translation":[-0.00433180930377256,-0.01234305749819164,-0.004914047224571636],"UnitQuaternion":[0.9421936735973006,[0.3306208306265709,0.03714453301302346,0.03976470113384847]]}}],"DeviceClassInfo":{"BuildVersion":"DVT-S","DeviceClass":"Aria"},"FileFormat":{"Tags":[],"Timestamp":"2021-04-22T19:57:54Z","UnixTime":1619121474,"Version":3},"ImuCalibrations":[{"Accelerometer":{"Bias":{"Name":"Constant","Offset":[-0.01027114210827732,0.1127197962062395,-0.009266027595436741]},"Model":{"Name":"Linear","RectificationMatrix":[[1.001614087107826,0.0007397978477572706,-0.0003611023731378555],[0,0.996682397742586,-0.005687029974743305],[0,0,1.002910688865928]]},"TimeOffsetSec_Device_Accel":0.002631951864033251},"Calibrated":false,"Gyroscope":{"Bias":{"Name":"Constant","Offset":[-0.0006552111067098978,0.002533260298516383,0.0009599937419155016]},"Model":{"Name":"Linear","RectificationMatrix":[[1.002003578371679,0.002369989551054614,0.0004664903042645385],[-0.00154515518354723,0.9972023008400547,-0.002696725385097661],[-0.001335029110433323,0.004598515130627168,0.9991196610196331]]},"TimeOffsetSec_Device_Gyro":0.004117400152189929},"Label":"imu-right","SerialNumber":"rift://","T_Device_Imu":{"Translation":[0.005655863683276073,-0.1017875371939266,-0.08645599007565337],"UnitQuaternion":[0.6110363750661001,[-0.7855006576309256,-0.0758318041594183,0.06223184623158158]]}},{"Accelerometer":{"Bias":{"Name":"Constant","Offset":[0.2370235512984153,0.03385206019075164,-0.08133615625247721]},"Model":{"Name":"Linear","RectificationMatrix":[[0.9945623061091718,-0.0003630965784716247,0.0004418493571605525],[0,0.9948184218656916,-0.007197030046447742],[0,0,1.000202621911108]]},"TimeOffsetSec_Device_Accel":0.0009131367602927063},"Calibrated":false,"Gyroscope":{"Bias":{"Name":"Constant","Offset":[-0.001720981542728912,-0.004444018029079233,-0.0006331050681054437]},"Model":{"Name":"Linear","RectificationMatrix":[[1.013326147069318,0.001155775399958921,-0.0001478862195567975],[7.5899322401886e-05,0.9960741537814215,-0.009912814551315426],[0.004245744485726823,0.01072008113540228,0.9776854953119078]]},"TimeOffsetSec_Device_Gyro":0.00179587493713094},"Label":"imu-left","SerialNumber":"rift://","T_Device_Imu":{"Translation":[0.0006754004520236143,-0.000241026036537391,-0.00641755193470829],"UnitQuaternion":[0.02845973649136782,[-0.6933859418177197,-0.7193087165779132,0.03163778347847943]]}}],"MagCalibrations":[{"Bias":{"Name":"Constant","Offset":[-2.17748,-1.43505,-5.4545]},"Label":"mag0","Model":{"Name":"Linear","RectificationMatrix":[[-1.00092e-06,-3.48739e-08,2.73189e-08],[5.84731e-08,-9.965140000000001e-07,7.18459e-08],[-2.6453e-08,-6.7374e-08,-1.01857e-06]]},"SerialNumber":""}],"MicCalibrations":[{"DSensitivity1KDbv":-32.23,"Label":"mic0","SerialNumber":"M000"},{"DSensitivity1KDbv":-33.05,"Label":"mic1","SerialNumber":"M001"},{"DSensitivity1KDbv":-32.12,"Label":"mic2","SerialNumber":"M002"},{"DSensitivity1KDbv":-32.37,"Label":"mic3","SerialNumber":"M003"},{"DSensitivity1KDbv":-32.99,"Label":"mic4","SerialNumber":"M004"},{"DSensitivity1KDbv":-32.46,"Label":"mic5","SerialNumber":"M005"},{"DSensitivity1KDbv":-31.69,"Label":"mic6","SerialNumber":"M006"}],"OriginSpecification":{"ChildLabel":"camera-slam-left","Type":"Custom"},"Serial":"1WM093700U1141"}
Tag: capture_time_epoch = 1649276817 -- Wed Apr 6 20:26:57 2022 UTC
Tag: device_serial = 1WM093700U1141
Tag: device_type = Aria
Tag: device_version = 29828000000000000
Tag: firmware_version = 3.23.14
Tag: hardware_version = DVT-S
Tag: metadata = {"companion_version":"55.0","device_id":"6449c306-5e10-4bb5-a993-d527a1477273","device_version":"29828000000000000","encryption_enabled":true,"filename":"32b900c2-7976-45b1-bd57-734cbc724707.vrs","firmware_version":"3.23.14","recording_profile":"profile9","start_time":1649276817,"telemetry_id":"32b900c2-7976-45b1-bd57-734cbc724707"}
Tag: os_fingerprint = Meta
Tag: recording_profile = profile9
Tag: rgb_eeprom_3100K_B_Gb = 0.673828
Tag: rgb_eeprom_3100K_Gb_Gr = 1.002930
Tag: rgb_eeprom_3100K_LSC_B = 0 0 0 0 41 155 220 241 244 240 219 166 56 0 0 0 0 2 5 46 151 233 265 281 292 299 295 283 269 242 169 57 7 1 0 64 201 263 297 338 379 406 418 409 384 347 306 274 226 84 0 27 194 269 315 381 452 514 557 573 562 525 466 395 329 279 226 56 150 253 304 379 475 571 660 733 765 742 678 589 493 397 317 272 202 214 272 336 432 546 667 795 902 945 916 820 694 569 454 354 285 252 228 276 347 452 573 710 854 973 1023 991 886 744 603 480 368 290 257 215 269 333 432 546 671 799 907 954 925 831 703 575 459 354 285 246 151 251 301 379 475 575 667 742 776 756 692 601 502 402 317 269 196 27 192 263 313 379 452 518 564 585 573 534 473 400 329 276 221 57 0 64 196 258 292 333 374 406 418 411 386 347 304 269 219 82 0 0 5 43 148 226 256 274 288 292 290 279 260 235 164 57 7 1 0 0 0 0 40 146 198 215 219 214 202 157 59 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_Gb = 0 1 0 0 47 175 248 270 273 268 247 187 64 0 0 0 0 1 5 49 169 260 294 309 322 326 323 311 295 269 189 65 6 0 0 71 225 291 325 368 408 437 448 440 415 377 334 302 252 95 0 28 217 297 345 411 482 543 585 601 591 554 497 426 357 308 254 63 170 283 332 409 503 597 681 751 781 761 700 617 526 431 349 302 228 240 302 365 462 572 688 808 908 951 925 837 718 601 489 385 314 283 255 306 378 483 600 729 865 975 1023 995 898 766 632 514 400 322 285 240 300 365 465 575 694 815 917 961 937 848 729 608 492 386 315 278 169 280 332 411 506 601 691 761 797 778 717 631 535 435 349 300 222 31 215 291 343 412 486 551 595 615 606 568 508 432 360 308 249 65 0 71 222 288 323 366 409 440 454 446 420 378 335 300 246 94 0 1 5 49 166 252 286 305 318 325 322 309 291 263 186 65 6 0 0 1 0 0 47 165 227 245 247 244 229 178 66 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_Gr = 0 1 0 0 46 175 250 272 275 270 250 186 62 0 0 0 0 1 5 51 170 262 296 312 326 330 327 316 299 272 190 63 6 0 0 73 227 293 327 370 412 443 455 447 421 381 336 304 253 94 0 28 218 298 347 414 486 549 593 611 600 563 503 430 361 310 253 60 171 284 333 410 506 600 688 759 790 770 708 623 531 432 350 302 226 241 301 364 461 572 690 810 912 955 929 841 722 603 491 384 315 280 254 306 376 481 597 727 863 975 1023 995 898 765 631 512 398 319 284 240 298 364 461 572 690 812 913 958 934 844 725 605 491 384 313 276 170 279 330 407 503 599 687 758 793 775 713 628 532 432 347 298 222 31 214 290 341 410 483 546 591 613 603 565 505 430 358 306 248 63 0 71 222 287 321 366 407 438 452 446 420 378 333 298 245 93 0 1 5 49 167 253 285 304 318 324 321 309 290 262 187 63 6 0 0 1 0 0 47 166 228 244 248 245 228 179 67 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_R = 0 0 0 0 44 178 254 276 281 275 254 191 60 0 0 0 0 0 5 47 171 265 298 317 327 332 332 317 298 275 189 62 5 0 0 71 227 298 332 374 422 450 464 455 426 384 341 303 256 95 0 28 218 303 350 422 502 568 611 625 611 573 511 436 365 313 256 60 169 289 341 422 526 625 706 767 796 772 715 635 540 436 350 303 227 245 308 374 478 597 710 824 919 952 924 838 725 611 497 388 317 286 256 313 388 502 625 748 876 980 1023 990 890 767 639 516 403 322 284 246 303 374 478 597 715 824 919 957 928 843 729 611 497 388 317 279 171 284 336 422 521 620 706 767 800 781 720 639 545 440 350 303 227 28 218 294 350 422 497 564 611 630 616 578 516 440 365 313 251 68 0 71 223 294 327 374 417 450 464 455 431 388 341 303 251 95 0 0 5 47 166 256 294 308 322 332 327 317 298 270 189 62 5 0 0 0 0 0 47 167 232 253 256 251 235 185 68 0 0 0 0
Tag: rgb_eeprom_3100K_R_Gr = 0.325195
Tag: rgb_eeprom_5000K_B_Gb = 0.503906
Tag: rgb_eeprom_5000K_Gb_Gr = 1.000977
Tag: rgb_eeprom_5000K_LSC_B = 0 0 0 0 42 155 221 245 243 240 220 166 54 0 0 0 0 0 6 45 153 233 266 281 293 299 296 284 269 245 171 57 6 0 0 66 203 263 299 341 380 407 419 410 386 347 305 275 227 87 0 27 194 269 317 383 455 517 562 577 565 526 467 398 329 281 227 56 151 254 305 380 476 574 664 739 769 745 679 592 497 401 320 275 203 212 272 335 434 547 673 799 903 948 915 823 697 574 458 356 287 255 226 278 347 455 577 712 855 975 1023 990 888 748 604 482 371 293 257 212 272 335 434 550 676 805 909 957 927 835 709 580 461 356 287 251 152 251 302 380 479 577 673 745 781 760 697 607 506 404 320 272 200 28 191 263 314 383 455 523 568 589 577 538 479 404 332 281 227 60 0 63 197 260 293 335 377 407 422 413 389 350 305 272 224 84 0 0 6 45 147 227 257 275 290 296 293 281 263 236 168 57 6 0 0 0 0 0 40 146 199 218 220 217 205 160 61 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_Gb = 0 1 0 0 46 177 250 272 274 270 249 188 64 0 0 0 0 1 5 50 171 261 296 312 324 330 326 314 299 272 192 65 6 0 0 72 226 294 327 370 412 441 453 445 418 379 335 303 253 97 0 28 219 299 347 415 486 549 591 608 598 560 501 429 359 309 255 62 171 285 335 413 508 602 687 756 786 766 705 622 530 433 352 303 229 243 303 368 466 576 693 812 910 952 925 839 721 605 492 388 317 285 257 309 380 486 604 732 865 976 1023 994 899 768 635 516 403 323 289 243 302 368 468 579 697 818 917 963 937 849 732 611 496 389 318 280 169 282 333 413 510 607 694 765 800 782 720 635 539 439 352 303 227 31 216 293 346 415 489 555 601 622 611 573 512 436 364 312 255 68 0 71 223 290 326 370 412 445 459 451 424 383 338 303 250 95 0 1 5 50 167 255 290 308 323 329 326 312 296 267 189 65 6 0 0 1 0 0 46 167 229 246 250 247 234 181 68 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_Gr = 0 1 0 0 45 177 252 274 276 271 251 188 62 0 0 0 0 1 5 50 171 263 298 314 326 332 329 317 301 272 190 63 6 0 0 73 228 295 329 373 416 446 458 449 423 382 338 305 254 95 0 29 221 301 349 417 490 553 597 613 603 565 505 432 361 311 255 60 171 286 335 414 511 606 692 762 792 772 710 626 532 435 352 304 229 244 302 367 467 579 695 814 913 955 929 842 724 606 493 388 317 283 256 308 381 487 604 733 866 976 1023 994 899 768 635 515 402 322 288 242 301 367 467 579 695 816 914 960 934 846 728 609 494 388 317 279 170 281 332 411 508 604 691 762 795 777 716 632 536 437 351 302 226 31 216 292 345 414 487 552 597 618 607 570 509 435 361 310 254 69 0 71 224 289 325 369 411 443 456 450 423 382 337 301 249 95 0 1 5 50 168 255 289 307 322 328 325 313 295 266 189 65 6 0 0 1 0 0 48 168 230 247 251 248 232 182 69 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_R = 0 0 0 0 44 178 256 278 280 275 253 190 61 0 0 0 0 2 5 48 172 267 301 318 330 335 330 318 303 274 192 63 7 1 0 70 228 298 332 376 419 451 463 453 427 385 339 308 257 95 0 27 221 303 352 422 499 565 606 623 611 572 512 436 364 313 257 60 172 288 339 419 521 616 698 764 793 771 710 630 538 439 354 305 231 247 305 373 475 591 703 815 911 953 924 836 725 611 499 390 320 288 261 313 385 497 616 739 868 977 1023 989 892 766 640 521 405 325 293 247 305 373 478 591 705 819 914 958 928 844 730 613 499 393 320 284 173 286 339 419 519 613 698 766 798 778 720 638 543 441 354 305 228 27 218 296 349 422 497 562 606 628 616 579 519 441 368 315 257 66 0 70 225 293 330 376 419 451 465 458 432 388 342 305 255 95 0 2 5 48 170 259 293 313 327 335 330 318 301 272 192 65 7 1 0 0 0 0 46 170 235 253 257 255 240 184 68 0 0 1 0
Tag: rgb_eeprom_5000K_R_Gr = 0.622070
Tag: session_id = bc3586b4-f0ce-449a-bfe6-37fd303e9aeb
Found 1 device, 1412 records, 231702 data records from 379.620 to 500.007 (2m 0.386s, 1925rps).
1412 Stereo Audio Class #1 - device/aria [231-1] records.
VRS Tag: DL:Configuration:1:0 = {"data_layout":[{"name":"stream_id","type":"DataPieceValue<uint32_t>","offset":0},{"name":"audio_channel_count","typ...
VRS Tag: DL:Data:2:0 = {"data_layout":[{"name":"audio_muted","type":"DataPieceValue<uint8_t>","offset":0},{"name":"capture_timestamps_ns","type":"Da...
VRS Tag: RF:Configuration:1 = data_layout/size=10
VRS Tag: RF:Data:2 = data_layout+audio/pcm/int32le/channels=7/rate=48000
VRS Tag: VRS_Original_Recordable_Name = Stereo Audio Class
VRS Tag: VRS_Recordable_Flavor = device/aria
Tag: session_id = bc3586b4-f0ce-449a-bfe6-37fd303e9aeb
1 configuration record, at 4.941e-324.
1 state record, at 9.881e-324.
1410 data records, from 379.749 to 499.984 (2m 0.235s, 11.72rps).

Output of vrs recording.vrs + 231 --before +1
root@2f3495aab0d9:/# vrs recording.vrs + 231 --before +1
VRS file: 'recording.vrs', 1.19 GB.
Tag: calib_json = {"AlgorithmName":"AriaEtExtrinsicsMirrorStationCalibration","AlgorithmVersion":"<No HG commit hash available - Buck build>","BaroCalibrations":[{"Label":"baro0","PressureModel":{"Name":"Linear","OffsetPa":-106.6714,"Slope":1.0001},"SerialNumber":""}],"CalibrationSource":"Factory","CameraCalibrations":[{"Calibrated":true,"Label":"camera-slam-left","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[241.8971379654589,318.9457502749067,237.7491728877724,-0.0298902638495018,0.112147910386769,-0.08553607773802731,0.02157134450478395,-0.001722443931504995,-3.687227546202424e-05,0.0007568568738212922,-0.001798331427039427,-0.0009920238048332897,-9.508126715431386e-05,0.00135792509216215,-0.0002030069298922764]},"SerialNumber":"0072510f1b210405090000052f1b0001","T_Device_Camera":{"Translation":[3.469446951953614e-18,1.387778780781446e-17,0],"UnitQuaternion":[1,[0,0,0]]}},{"Calibrated":true,"Label":"camera-slam-right","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[241.9816554299552,317.5921103929318,242.3414267934209,-0.0252229265415765,0.09916485968301648,-0.06883656772078174,0.01074643686159648,0.001808057702775166,-0.0004971607519367475,0.001407583960672652,-0.000397342335625801,-0.00228249166683509,0.0001359719975547116,0.001225855976053143,6.117842910678839e-06]},"SerialNumber":"0072510f1b2107010800000b11290001","T_Device_Camera":{"Translation":[0.005042415731391439,-0.1082579265750135,-0.08500089066565701],"UnitQuaternion":[0.7870726893662587,[0.6159760624091268,0.004271920230851599,0.03273870630085256]]}},{"Calibrated":true,"Label":"camera-et-left","Projection":{"Description":"fx, fy, cx, cy, kb0, kb1, kb2, kb3","Name":"KannalaBrandtK3","Params":[553.7353568555496,553.5271036717626,319.4999041005779,239.4996564814754,0.01211698887990899,0.2238615877537595,-0.8040674074332136,0.7689037079543423]},"SerialNumber":"4753313330474a31303234303030304c","T_Device_Camera":{"Translation":[0.02153333643987137,-0.01153649433424641,-0.007557141933489846],"UnitQuaternion":[-0.2248225653968274,[0.38475033105069,0.858344932954478,-0.2542950509076937]]}},{"Calibrated":true,"Label":"camera-et-right","Projection":{"Description":"fx, fy, cx, cy, kb0, kb1, kb2, kb3","Name":"KannalaBrandtK3","Params":[551.4306538980707,550.8609462028721,319.5001339751798,239.5003674068313,0.02618081083253225,0.06372604002065624,-0.1783862227439982,0.005238298034630603]},"SerialNumber":"4753313330474a313032343030303052","T_Device_Camera":{"Translation":[0.02565591322019532,-0.0951120139328757,-0.07577969442248363],"UnitQuaternion":[-0.7464319539867283,[0.4656229231619292,0.4731855294443145,0.04615285709681265]]}},{"Calibrated":true,"Label":"camera-rgb","Projection":{"Description":"see FisheyeRadTanThinPrism.h","Name":"FisheyeRadTanThinPrism","Params":[1217.85111143048,1456.022964240926,1445.73331423538,0.3877090025533652,-0.3156133839689442,-0.3434984955068093,1.856587420098875,-2.179937222100279,0.7713834762565884,-0.0002747018833370422,0.0005228973690976568,0.0001348840117906014,-8.482198309822946e-05,-0.0009420014144244382,-0.0001276837565837671]},"SerialNumber":"0450577b730404624401100000000000","T_Device_Camera":{"Translation":[-0.00433180930377256,-0.01234305749819164,-0.004914047224571636],"UnitQuaternion":[0.9421936735973006,[0.3306208306265709,0.03714453301302346,0.03976470113384847]]}}],"DeviceClassInfo":{"BuildVersion":"DVT-S","DeviceClass":"Aria"},"FileFormat":{"Tags":[],"Timestamp":"2021-04-22T19:57:54Z","UnixTime":1619121474,"Version":3},"ImuCalibrations":[{"Accelerometer":{"Bias":{"Name":"Constant","Offset":[-0.01027114210827732,0.1127197962062395,-0.009266027595436741]},"Model":{"Name":"Linear","RectificationMatrix":[[1.001614087107826,0.0007397978477572706,-0.0003611023731378555],[0,0.996682397742586,-0.005687029974743305],[0,0,1.002910688865928]]},"TimeOffsetSec_Device_Accel":0.002631951864033251},"Calibrated":false,"Gyroscope":{"Bias":{"Name":"Constant","Offset":[-0.0006552111067098978,0.002533260298516383,0.0009599937419155016]},"Model":{"Name":"Linear","RectificationMatrix":[[1.002003578371679,0.002369989551054614,0.0004664903042645385],[-0.00154515518354723,0.9972023008400547,-0.002696725385097661],[-0.001335029110433323,0.004598515130627168,0.9991196610196331]]},"TimeOffsetSec_Device_Gyro":0.004117400152189929},"Label":"imu-right","SerialNumber":"rift://","T_Device_Imu":{"Translation":[0.005655863683276073,-0.1017875371939266,-0.08645599007565337],"UnitQuaternion":[0.6110363750661001,[-0.7855006576309256,-0.0758318041594183,0.06223184623158158]]}},{"Accelerometer":{"Bias":{"Name":"Constant","Offset":[0.2370235512984153,0.03385206019075164,-0.08133615625247721]},"Model":{"Name":"Linear","RectificationMatrix":[[0.9945623061091718,-0.0003630965784716247,0.0004418493571605525],[0,0.9948184218656916,-0.007197030046447742],[0,0,1.000202621911108]]},"TimeOffsetSec_Device_Accel":0.0009131367602927063},"Calibrated":false,"Gyroscope":{"Bias":{"Name":"Constant","Offset":[-0.001720981542728912,-0.004444018029079233,-0.0006331050681054437]},"Model":{"Name":"Linear","RectificationMatrix":[[1.013326147069318,0.001155775399958921,-0.0001478862195567975],[7.5899322401886e-05,0.9960741537814215,-0.009912814551315426],[0.004245744485726823,0.01072008113540228,0.9776854953119078]]},"TimeOffsetSec_Device_Gyro":0.00179587493713094},"Label":"imu-left","SerialNumber":"rift://","T_Device_Imu":{"Translation":[0.0006754004520236143,-0.000241026036537391,-0.00641755193470829],"UnitQuaternion":[0.02845973649136782,[-0.6933859418177197,-0.7193087165779132,0.03163778347847943]]}}],"MagCalibrations":[{"Bias":{"Name":"Constant","Offset":[-2.17748,-1.43505,-5.4545]},"Label":"mag0","Model":{"Name":"Linear","RectificationMatrix":[[-1.00092e-06,-3.48739e-08,2.73189e-08],[5.84731e-08,-9.965140000000001e-07,7.18459e-08],[-2.6453e-08,-6.7374e-08,-1.01857e-06]]},"SerialNumber":""}],"MicCalibrations":[{"DSensitivity1KDbv":-32.23,"Label":"mic0","SerialNumber":"M000"},{"DSensitivity1KDbv":-33.05,"Label":"mic1","SerialNumber":"M001"},{"DSensitivity1KDbv":-32.12,"Label":"mic2","SerialNumber":"M002"},{"DSensitivity1KDbv":-32.37,"Label":"mic3","SerialNumber":"M003"},{"DSensitivity1KDbv":-32.99,"Label":"mic4","SerialNumber":"M004"},{"DSensitivity1KDbv":-32.46,"Label":"mic5","SerialNumber":"M005"},{"DSensitivity1KDbv":-31.69,"Label":"mic6","SerialNumber":"M006"}],"OriginSpecification":{"ChildLabel":"camera-slam-left","Type":"Custom"},"Serial":"1WM093700U1141"}
Tag: capture_time_epoch = 1649276817 -- Wed Apr 6 20:26:57 2022 UTC
Tag: device_serial = 1WM093700U1141
Tag: device_type = Aria
Tag: device_version = 29828000000000000
Tag: firmware_version = 3.23.14
Tag: hardware_version = DVT-S
Tag: metadata = {"companion_version":"55.0","device_id":"6449c306-5e10-4bb5-a993-d527a1477273","device_version":"29828000000000000","encryption_enabled":true,"filename":"32b900c2-7976-45b1-bd57-734cbc724707.vrs","firmware_version":"3.23.14","recording_profile":"profile9","start_time":1649276817,"telemetry_id":"32b900c2-7976-45b1-bd57-734cbc724707"}
Tag: os_fingerprint = Meta
Tag: recording_profile = profile9
Tag: rgb_eeprom_3100K_B_Gb = 0.673828
Tag: rgb_eeprom_3100K_Gb_Gr = 1.002930
Tag: rgb_eeprom_3100K_LSC_B = 0 0 0 0 41 155 220 241 244 240 219 166 56 0 0 0 0 2 5 46 151 233 265 281 292 299 295 283 269 242 169 57 7 1 0 64 201 263 297 338 379 406 418 409 384 347 306 274 226 84 0 27 194 269 315 381 452 514 557 573 562 525 466 395 329 279 226 56 150 253 304 379 475 571 660 733 765 742 678 589 493 397 317 272 202 214 272 336 432 546 667 795 902 945 916 820 694 569 454 354 285 252 228 276 347 452 573 710 854 973 1023 991 886 744 603 480 368 290 257 215 269 333 432 546 671 799 907 954 925 831 703 575 459 354 285 246 151 251 301 379 475 575 667 742 776 756 692 601 502 402 317 269 196 27 192 263 313 379 452 518 564 585 573 534 473 400 329 276 221 57 0 64 196 258 292 333 374 406 418 411 386 347 304 269 219 82 0 0 5 43 148 226 256 274 288 292 290 279 260 235 164 57 7 1 0 0 0 0 40 146 198 215 219 214 202 157 59 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_Gb = 0 1 0 0 47 175 248 270 273 268 247 187 64 0 0 0 0 1 5 49 169 260 294 309 322 326 323 311 295 269 189 65 6 0 0 71 225 291 325 368 408 437 448 440 415 377 334 302 252 95 0 28 217 297 345 411 482 543 585 601 591 554 497 426 357 308 254 63 170 283 332 409 503 597 681 751 781 761 700 617 526 431 349 302 228 240 302 365 462 572 688 808 908 951 925 837 718 601 489 385 314 283 255 306 378 483 600 729 865 975 1023 995 898 766 632 514 400 322 285 240 300 365 465 575 694 815 917 961 937 848 729 608 492 386 315 278 169 280 332 411 506 601 691 761 797 778 717 631 535 435 349 300 222 31 215 291 343 412 486 551 595 615 606 568 508 432 360 308 249 65 0 71 222 288 323 366 409 440 454 446 420 378 335 300 246 94 0 1 5 49 166 252 286 305 318 325 322 309 291 263 186 65 6 0 0 1 0 0 47 165 227 245 247 244 229 178 66 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_Gr = 0 1 0 0 46 175 250 272 275 270 250 186 62 0 0 0 0 1 5 51 170 262 296 312 326 330 327 316 299 272 190 63 6 0 0 73 227 293 327 370 412 443 455 447 421 381 336 304 253 94 0 28 218 298 347 414 486 549 593 611 600 563 503 430 361 310 253 60 171 284 333 410 506 600 688 759 790 770 708 623 531 432 350 302 226 241 301 364 461 572 690 810 912 955 929 841 722 603 491 384 315 280 254 306 376 481 597 727 863 975 1023 995 898 765 631 512 398 319 284 240 298 364 461 572 690 812 913 958 934 844 725 605 491 384 313 276 170 279 330 407 503 599 687 758 793 775 713 628 532 432 347 298 222 31 214 290 341 410 483 546 591 613 603 565 505 430 358 306 248 63 0 71 222 287 321 366 407 438 452 446 420 378 333 298 245 93 0 1 5 49 167 253 285 304 318 324 321 309 290 262 187 63 6 0 0 1 0 0 47 166 228 244 248 245 228 179 67 0 0 0 0
Tag: rgb_eeprom_3100K_LSC_R = 0 0 0 0 44 178 254 276 281 275 254 191 60 0 0 0 0 0 5 47 171 265 298 317 327 332 332 317 298 275 189 62 5 0 0 71 227 298 332 374 422 450 464 455 426 384 341 303 256 95 0 28 218 303 350 422 502 568 611 625 611 573 511 436 365 313 256 60 169 289 341 422 526 625 706 767 796 772 715 635 540 436 350 303 227 245 308 374 478 597 710 824 919 952 924 838 725 611 497 388 317 286 256 313 388 502 625 748 876 980 1023 990 890 767 639 516 403 322 284 246 303 374 478 597 715 824 919 957 928 843 729 611 497 388 317 279 171 284 336 422 521 620 706 767 800 781 720 639 545 440 350 303 227 28 218 294 350 422 497 564 611 630 616 578 516 440 365 313 251 68 0 71 223 294 327 374 417 450 464 455 431 388 341 303 251 95 0 0 5 47 166 256 294 308 322 332 327 317 298 270 189 62 5 0 0 0 0 0 47 167 232 253 256 251 235 185 68 0 0 0 0
Tag: rgb_eeprom_3100K_R_Gr = 0.325195
Tag: rgb_eeprom_5000K_B_Gb = 0.503906
Tag: rgb_eeprom_5000K_Gb_Gr = 1.000977
Tag: rgb_eeprom_5000K_LSC_B = 0 0 0 0 42 155 221 245 243 240 220 166 54 0 0 0 0 0 6 45 153 233 266 281 293 299 296 284 269 245 171 57 6 0 0 66 203 263 299 341 380 407 419 410 386 347 305 275 227 87 0 27 194 269 317 383 455 517 562 577 565 526 467 398 329 281 227 56 151 254 305 380 476 574 664 739 769 745 679 592 497 401 320 275 203 212 272 335 434 547 673 799 903 948 915 823 697 574 458 356 287 255 226 278 347 455 577 712 855 975 1023 990 888 748 604 482 371 293 257 212 272 335 434 550 676 805 909 957 927 835 709 580 461 356 287 251 152 251 302 380 479 577 673 745 781 760 697 607 506 404 320 272 200 28 191 263 314 383 455 523 568 589 577 538 479 404 332 281 227 60 0 63 197 260 293 335 377 407 422 413 389 350 305 272 224 84 0 0 6 45 147 227 257 275 290 296 293 281 263 236 168 57 6 0 0 0 0 0 40 146 199 218 220 217 205 160 61 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_Gb = 0 1 0 0 46 177 250 272 274 270 249 188 64 0 0 0 0 1 5 50 171 261 296 312 324 330 326 314 299 272 192 65 6 0 0 72 226 294 327 370 412 441 453 445 418 379 335 303 253 97 0 28 219 299 347 415 486 549 591 608 598 560 501 429 359 309 255 62 171 285 335 413 508 602 687 756 786 766 705 622 530 433 352 303 229 243 303 368 466 576 693 812 910 952 925 839 721 605 492 388 317 285 257 309 380 486 604 732 865 976 1023 994 899 768 635 516 403 323 289 243 302 368 468 579 697 818 917 963 937 849 732 611 496 389 318 280 169 282 333 413 510 607 694 765 800 782 720 635 539 439 352 303 227 31 216 293 346 415 489 555 601 622 611 573 512 436 364 312 255 68 0 71 223 290 326 370 412 445 459 451 424 383 338 303 250 95 0 1 5 50 167 255 290 308 323 329 326 312 296 267 189 65 6 0 0 1 0 0 46 167 229 246 250 247 234 181 68 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_Gr = 0 1 0 0 45 177 252 274 276 271 251 188 62 0 0 0 0 1 5 50 171 263 298 314 326 332 329 317 301 272 190 63 6 0 0 73 228 295 329 373 416 446 458 449 423 382 338 305 254 95 0 29 221 301 349 417 490 553 597 613 603 565 505 432 361 311 255 60 171 286 335 414 511 606 692 762 792 772 710 626 532 435 352 304 229 244 302 367 467 579 695 814 913 955 929 842 724 606 493 388 317 283 256 308 381 487 604 733 866 976 1023 994 899 768 635 515 402 322 288 242 301 367 467 579 695 816 914 960 934 846 728 609 494 388 317 279 170 281 332 411 508 604 691 762 795 777 716 632 536 437 351 302 226 31 216 292 345 414 487 552 597 618 607 570 509 435 361 310 254 69 0 71 224 289 325 369 411 443 456 450 423 382 337 301 249 95 0 1 5 50 168 255 289 307 322 328 325 313 295 266 189 65 6 0 0 1 0 0 48 168 230 247 251 248 232 182 69 0 0 0 0
Tag: rgb_eeprom_5000K_LSC_R = 0 0 0 0 44 178 256 278 280 275 253 190 61 0 0 0 0 2 5 48 172 267 301 318 330 335 330 318 303 274 192 63 7 1 0 70 228 298 332 376 419 451 463 453 427 385 339 308 257 95 0 27 221 303 352 422 499 565 606 623 611 572 512 436 364 313 257 60 172 288 339 419 521 616 698 764 793 771 710 630 538 439 354 305 231 247 305 373 475 591 703 815 911 953 924 836 725 611 499 390 320 288 261 313 385 497 616 739 868 977 1023 989 892 766 640 521 405 325 293 247 305 373 478 591 705 819 914 958 928 844 730 613 499 393 320 284 173 286 339 419 519 613 698 766 798 778 720 638 543 441 354 305 228 27 218 296 349 422 497 562 606 628 616 579 519 441 368 315 257 66 0 70 225 293 330 376 419 451 465 458 432 388 342 305 255 95 0 2 5 48 170 259 293 313 327 335 330 318 301 272 192 65 7 1 0 0 0 0 46 170 235 253 257 255 240 184 68 0 0 1 0
Tag: rgb_eeprom_5000K_R_Gr = 0.622070
Tag: session_id = bc3586b4-f0ce-449a-bfe6-37fd303e9aeb
Found 1 device, 1412 records, 231702 data records from 379.620 to 500.007 (2m 0.386s, 1925rps).
1412 Stereo Audio Class #1 - device/aria [231-1] records.
VRS Tag: DL:Configuration:1:0 = {"data_layout":[{"name":"stream_id","type":"DataPieceValue<uint32_t>","offset":0},{"name":"audio_channel_count","typ...
VRS Tag: DL:Data:2:0 = {"data_layout":[{"name":"audio_muted","type":"DataPieceValue<uint8_t>","offset":0},{"name":"capture_timestamps_ns","type":"Da...
VRS Tag: RF:Configuration:1 = data_layout/size=10
VRS Tag: RF:Data:2 = data_layout+audio/pcm/int32le/channels=7/rate=48000
VRS Tag: VRS_Original_Recordable_Name = Stereo Audio Class
VRS Tag: VRS_Recordable_Flavor = device/aria
Tag: session_id = bc3586b4-f0ce-449a-bfe6-37fd303e9aeb
1 configuration record, at 4.941e-324.
1 state record, at 9.881e-324.
1410 data records, from 379.749 to 499.984 (2m 0.235s, 11.72rps).

Output of vrs print + 231 --before +1, it's too much to copy it here. Please find the last few lines below:
380772819861 380772840695 380772861528 380772882361 380772903195 380772924028 380772944861
380772965695 380772986528 380773007361 380773028195 380773049028 380773069861 380773090695
380773111528 380773132361 380773153195 380773174028 380773194861 380773215695 380773236528
380773257361
-- Audio block, audio/pcm/int32le/channels=7/rate=48000/samples=4096, 114688 bytes.

Those are timestamps of each audio sample in the first second(?)"

@georges-berenger
Copy link
Contributor

I still don't see where the 33.33 ms comes from. I got a command wrong: I meant to ask for:
vrs list file.vrs + 231 --before +1 # will show the list of records until 1 second after the first audio data record
...which should be fairly short, but the line:
1410 data records, from 379.749 to 499.984 (2m 0.235s, 11.72rps).
...tells me pretty much what I was looking for. The data records for the audio stream come at 11.72rps, so at 1000 / 11.72 = 85.324 ms intervals on average, and confirms that the audio records are ~85.33ms apart.
So when you mention "33.33 ms (the time interval between neighboring vrs timestamps)", you must be looking at other VRS records, records from other streams, such as image records, which might come at 30 Hz.

@gomingchen
Copy link
Author

Thanks, @georges-berenger. Could you give an example of a few lines of code about how to retrieve audio records in a VRS file?

@georges-berenger
Copy link
Contributor

First, since we're talking about Aria files, you probably want to use the Aria data tools, which has a specialized AriaAudioPlayer class (see the first reply to your post). The VRS project also has sample code for a audio playback, as it happens, also using Aria definitions published in this project, though in that case, we do a bit less, but you can take a look at our own simpler version of AriaAudioPlayer in the AriaFileReader
sample app.

@georges-berenger
Copy link
Contributor

I believe we can call this issue resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

3 participants