How to include audio with Pandoc

I have a Scrivener project and I’m trying to add a few mp3 files to give readers the option to listen to audio at a few selected points in the document. I want these mp3s to be included in my epub. To compile, I am using Multimarkdown and calling pandoc via the processing option, which makes the epub.

To embed images, I do this:

![alt text](pandoc_link_made_by_holding_down_alt_key_to_svg_file)

I tried to do the same for mp3s, but they don’t get embedded into the epub:

![alt text](pandoc_link_made_by_holding_down_alt_key_to_mp3_file)

About linking to media, the Pandoc manual says this:

However, I have all my audio files inside a folder in the Scrivener binder. How can I put audio files in the Binder in my document in a way that they will be included/accessible when exporting to epub3 via pandoc?

Scrivener only exports “known” file types which would be image formats. You will probably have to File :arrow_forward:︎ Export… them into the compile folder before you compile, then compile.

BUT a second question is whether using caption will work at all. This creates a HTML5 block and it will not support audio. I think you need to just use raw HTML to input the

```{=html5}
<audio id="bgsound" epub:type="media:soundtrack media:background" src="../audio/asharedculture_soundtrack.mp3" autoplay="" loop="">
  <div class="errmsg">
    <p>Your Reading System does not support (this) audio</p>
  </div>    
</audio>
```

This official spec site has some sample EPub 3 projects so you can see how it is implemented:

idpf.github.io/epub3-samples/30/samples.html
github.com/IDPF/epub3-samples/b … .xhtml#L18