# Help with Mp3tag export script: Handling MP3 bitrate and DSD (MHz) sample rates

**URL:** https://community.mp3tag.de/t/help-with-mp3tag-export-script-handling-mp3-bitrate-and-dsd-mhz-sample-rates/71345
**Category:** Support
**Created:** [May 24, 2026, 2:11pm UTC](https://community.mp3tag.de/t/help-with-mp3tag-export-script-handling-mp3-bitrate-and-dsd-mhz-sample-rates/71345 "2026-05-24T14:11:17Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![PatrikSelin](https://community.mp3tag.de/user_avatar/community.mp3tag.de/patrikselin/32/22528_2.png) [@PatrikSelin](https://community.mp3tag.de/u/PatrikSelin)
#### Post date: [May 24, 2026, 2:11pm UTC](https://community.mp3tag.de/t/help-with-mp3tag-export-script-handling-mp3-bitrate-and-dsd-mhz-sample-rates/71345/1 "2026-05-24T14:11:17Z")

</div>

I would like to create an export list of my music albums. My goal is to format the list like this: `[album name] / [file format] / [bit depth] / [sample rate] / [album size]`

Here is the script I have created so far:  
`$filename(Albums.txt,utf-8)$loop(%album%,1)%album% / $lower(%_extension%) / %_bitspersample%/$div(%_samplerate%,1000) / %_total_size%`  
`$loopend()`

It works okay, but I run into issues because my library includes regular MP3s (320 kbps) as well as high-resolution albums (e.g., DSD at 11.3 MHz).

I figure I need some `$if` conditions to handle these different formats properly, but my scripting skills aren't quite there yet. Could anyone help me tweak the script to handle both MP3 bitrates and high-res sample rates correctly?

Thanks in advance!

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [May 24, 2026, 2:20pm UTC](https://community.mp3tag.de/t/help-with-mp3tag-export-script-handling-mp3-bitrate-and-dsd-mhz-sample-rates/71345/2 "2026-05-24T14:20:51Z")

</div>

What should be the condition for the $if() statement?

I could imagine `$ifgreater(%_samplerate%,320,$div(%_samplerate%,100000) Mhz,$div(%_samplerate%,1000) kbps)`  
But I am not sure what the

> [@PatrikSelin](#):
>
> issues

are.

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [June 4, 2026, 6:29am UTC](https://community.mp3tag.de/t/help-with-mp3tag-export-script-handling-mp3-bitrate-and-dsd-mhz-sample-rates/71345/3 "2026-06-04T06:29:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
