This happens in pandoc 2.0.5 compiled with pandoc-types 1.17.3.
When running: pandoc -f html -i a.html -t html5 -o b.html -s --self-contained
With the contents of a.html being:
~

~
The output b.html file contains the jpg file correctly inlined but none of the audio tags are present, which is strange since pandoc's source code in the SelfContained module indicates that audio tags are supported.
Now if a.html contains:
~
~
Then it is converted to
A little bit of progress : the disappearing of <audio> tags already happens without --self-contained.
Can you try:
pandoc -f html+raw_html
I guess opus would need to be added to https://github.com/jgm/pandoc/blob/master/src/Text/Pandoc/MIME.hs
btw, pandoc only supports a subset of html natively (the rest is carried along as raw html), so if you鈥檙e going from html to html, there are better tools for that...
I've added opus to the mime types list.
The other thing you need to do is use -f html+raw_html, as noted by @mb21.
With the dev version and this change, it should work.
Closed by b5ae5373213634a92cb9cca6ae17e8df995e246c
Thanks a lot for the indications and the quick fix!