title: YTDL and FS creating broken mp3 on windows (node.js)
body: <p>I am trying to download a youtube video to mp3 and setting the mp3 ID3 tags afterwards.
  I am using node.js for this and the additional library <a href="https://www.npmjs.com/package/node-id3" rel="nofollow noreferrer">node-id3</a>. This Library does work on normal mp3 files, setting the tags like artist or album.
  This is the code I am using:</p>
  
  <pre class="lang-js prettyprint-override"><code>import nodeid3 from 'node-id3';
  import ytdl from 'ytdl-core';
  import fs from 'fs'
  const tags = {
    title: "Yesterday",
    artist: "Kevin Penkin",
    album: "TV BlaBla",
    TRCK: "42",
  };
  
  function downloadYt() {
    console.log("start downloading");
    ytdl('https://www.youtube.com/watch?v=PvAOeAwadbI', {
      filter: 'audioonly',
      quality: 'highestaudio',
      highWaterMark: 1 &lt;&lt; 25,
    }).pipe(fs.createWriteStream('./test_tags.mp3')).on('close',()=&gt;{
      setTags('./test_tags.mp3');
      console.log("Tags set");
    });
  
  }
  
  function setTags(filepath) {
    nodeid3.write(tags, filepath)
  }
  </code></pre>
  
  <p>When downloading the file, the resulting mp3-file is "sort of" broken. It can still be played and tagprograms like <a href="https://www.mp3tag.de/" rel="nofollow noreferrer">mp3tag</a> do still recognize the provided tags.</p>
  
  <p>However windows does not. The version of ID3 Tags is 2.3, but Windows does not show the tags and the tags cannot be edited by windows. This will result in an <code>0x8007000D</code> error, which is commonly known for broken mp3 tags (<a href="https://www.google.com/search?client=firefox-b-d&amp;sxsrf=ALeKk02KbcBmPoJUicOTLfuGEV2JI4wrxg%3A1585933440638&amp;ei=gGyHXt_RJq3nsAfqnZHYDQ&amp;q=0x8007000d+mp3+tag+edit&amp;oq=0x8007000d+mp3+tag+edit&amp;gs_lcp=CgZwc3ktYWIQAzIECCEQFTIECCEQFToECAAQR1CRPViJUGClUWgAcAV4AIABVogBlwiSAQIxM5gBAKABAaoBB2d3cy13aXo&amp;sclient=psy-ab&amp;ved=0ahUKEwjfkfe63szoAhWtM-wKHepOBNsQ4dUDCAo&amp;uact=5" rel="nofollow noreferrer">google search</a>). However using small tools to fix the mp3 or using MP3Tag (by deleting all tags) as suggested in many forums does NOT fix the file. The file is completly broken in that regard.</p>
  
  <p>I need another option to either retrieve the ytdl stream (if that is the problem) or save the stream to mp3 (if that is the problem).</p>