Repository: yt-dlp
Issue: --extract-audio flags makes yt-dlp to download again already downloaded audio files
Labels: enhancement

### DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

- [X] I understand that I will be **blocked** if I remove or skip any mandatory\* field

### Checklist

- [X] I'm reporting a bug unrelated to a specific site
- [X] I've verified that I'm running yt-dlp version **2022.09.01** ([update instructions](https://github.com/yt-dlp/yt-dlp#update)) or later (specify commit)
- [X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
- [X] I've checked that all URLs and arguments with special characters are [properly quoted or escaped](https://github.com/yt-dlp/yt-dlp/wiki/FAQ#video-url-contains-an-ampersand--and-im-getting-some-strange-output-1-2839-or-v-is-not-recognized-as-an-internal-or-external-command)
- [X] I've searched the [bugtracker](https://github.com/yt-dlp/yt-dlp/issues?q=) for similar issues **including closed ones**. DO NOT post duplicates
- [X] I've read the [guidelines for opening an issue](https://github.com/yt-dlp/yt-dlp/blob/master/CONTRIBUTING.md#opening-an-issue)

### Provide a description that is worded well enough to be understood

--extract-audio flags makes yt-dlp to download again already downloaded audio files (maybe its because of changed extension of file - from .webm to .opus?)
without --extract-audio flag it shows `**.webm has already been downloaded`

### Provide verbose output that clearly demonstrates the problem

- [X] Run **your** yt-dlp command with **-vU** flag added (`yt-dlp -vU <your command line>`)
- [X] Copy the WHOLE output (starting with `[debug] Command-line config`) and insert it below

### Complete Verbose Output

```shell
user@pi:/downloads/youtube/test$ yt-dlp --extract-audio -f bestaudio https://www.youtube.com/watch?v=S6eZHnIA__A
[youtube] S6eZHnIA__A: Downloading webpage
[youtube] S6eZHnIA__A: Downloading android player API JSON
[info] S6eZHnIA__A: Downloading 1 format(s): 251
[download] Destination: Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm
[download] 100% of 50.10MiB in 00:05 at 8.36MiB/s
[ExtractAudio] Destination: Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].opus
Deleting original file Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm (pass -k to keep)
user@pi:/downloads/youtube/test$ ls
'Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].opus'
user@pi:/downloads/youtube/test$ yt-dlp -vU --extract-audio -f bestaudio https://www.youtube.com/watch?v=S6eZHnIA__A
[debug] Command-line config: ['-vU', '--extract-audio', '-f', 'bestaudio', 'https://www.youtube.com/watch?v=S6eZHnIA__A']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out UTF-8, error UTF-8, screen UTF-8
[debug] yt-dlp version 2022.09.01 [5d7c7d6] (zip)
[debug] Python 3.7.3 (CPython 64bit) - Linux-5.10.63-v8+-aarch64-with-debian-10.11 (glibc 2.28)
[debug] Checking exe version: ffmpeg -bsfs
[debug] Checking exe version: ffprobe -bsfs
[debug] exe versions: ffmpeg N-62475-g130d19bf20-static (setts), ffprobe N-62475-g130d19bf20-static
[debug] Optional libraries: certifi-2018.08.24, sqlite3-2.6.0
[debug] Proxy map: {}
[debug] Loaded 1670 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Latest version: 2022.09.01, Current version: 2022.09.01
yt-dlp is up to date (2022.09.01)
[debug] [youtube] Extracting URL: https://www.youtube.com/watch?v=S6eZHnIA__A
[youtube] S6eZHnIA__A: Downloading webpage
[youtube] S6eZHnIA__A: Downloading android player API JSON
[debug] Sort order given by extractor: quality, res, fps, hdr:12, source, vcodec:vp9.2, channels, acodec, lang, proto
[debug] Formats sorted by: hasvid, ie_pref, quality, res, fps, hdr:12(7), source, vcodec:vp9.2(10), channels, acodec, lang, proto, filesize, fs_approx, tbr, vbr, abr, asr, vext, aext, hasaud, id
[info] S6eZHnIA__A: Downloading 1 format(s): 251
[debug] Invoking http downloader on "https://rr3---sn-5hnednss.googlevideo.com/videoplayback?expire=1662664918&ei=duwZY5L7IZO57QS94piQAw&ip=185.193.159.150&id=o-AC_fDD5YGn7JaUPZAl2KPSbOhw6nbXM9M2sutzSIUppC&itag=251&source=youtube&requiressl=yes&mh=mJ&mm=31%2C29&mn=sn-5hnednss%2Csn-5hne6n6l&ms=au%2Crdu&mv=m&mvi=3&pl=24&initcwndbps=1483750&spc=lT-Kht7zWX4AnXQKR2iEAlsjZuD0xh0&vprv=1&svpuc=1&mime=audio%2Fwebm&gir=yes&clen=52534941&dur=3113.321&lmt=1612966607990179&mt=1662643029&fvip=1&keepalive=yes&fexp=24001373%2C24007246&c=ANDROID&rbqsm=fr&txp=5431432&sparams=expire%2Cei%2Cip%2Cid%2Citag%2Csource%2Crequiressl%2Cspc%2Cvprv%2Csvpuc%2Cmime%2Cgir%2Cclen%2Cdur%2Clmt&sig=AOq0QJ8wRQIhANLQCh21FzX_0INqi0u_G8EmkevM_0-yB8mk9bogJPBDAiBUHtIh5q4N0JebO58bvui-OeD1UVqNAZ5d-tpppjGoeQ%3D%3D&lsparams=mh%2Cmm%2Cmn%2Cms%2Cmv%2Cmvi%2Cpl%2Cinitcwndbps&lsig=AG3C_xAwRgIhAJzv8D-_1f6t_ux26GgemuWpYAhcAg6Pd_bPy00cT7IuAiEAnwFZVMk1Txv5blVdcC6jnyk8DexzH35qr_WGd9Yaq2k%3D"
[download] Destination: Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm
[download] 100% of 50.10MiB in 00:06 at 8.09MiB/s
[debug] ffmpeg command line: ffprobe -show_streams 'file:Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm'
[ExtractAudio] Destination: Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].opus
[debug] ffmpeg command line: ffmpeg -y -loglevel repeat+info -i 'file:Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm' -vn -acodec copy -movflags +faststart 'file:Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].opus'
Deleting original file Miles Davis - Miles In The Sky (1968) full album [S6eZHnIA__A].webm (pass -k to keep)
user@pi:/downloads/youtube/test$
```