When downloading a large batch of tracks (e.g. an artist discography, or album) with audio conversion enabled and set to AAC, many tracks fail with ConversionError: FFmpeg output:\n(None, b''). Because this exception is raised in Track.postprocess() before self.db.set_deonloaded(...) runs, the track ID is never actually added to the downloaded database causing following runs to redownload every track again, disabling conversion correct records track IDs in the database.
### With conversion enabled
[06:14:06] DEBUG Showing all debug logs cli.py:111
DEBUG executing CREATE TABLE downloads (id TEXT UNIQUE NOT NULL) db.py:83
DEBUG executing CREATE TABLE failed_downloads (source TEXT NOT NULL, media_type db.py:83
TEXT NOT NULL, id TEXT UNIQUE NOT NULL)
⠙ Resolving URLs...[06:14:07] DEBUG Pending tracks: [PendingTrack(id=3961514991, album.py:106
album=AlbumMetadata(info=AlbumInfo(id='961826611', quality=2,
container='FLAC', label='Sumerian Records', explicit=False,
sampling_rate=44100, bit_depth=16, booklets=None), album="Ironic
('Mile End Kicks' - Music Inspired by the Motion Picture)",
albumartist='Avril Lavigne', year='2026', genre=['Alternative'],
covers=Covers(('original',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/1000x1000-000000-80-0-0.jpg', None)
('large',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/500x500-000000-80-0-0.jpg',
'/mnt/Coding/Audio/Music/Unsorted/__artwork/cover-232128684721561292.j
pg')
('small',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/250x250-000000-80-0-0.jpg', None)
('thumbnail',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/56x56-000000-80-0-0.jpg', None)), tracktotal=1, disctotal=1,
albumcomposer=None, comment=None, compilation=None, copyright=None,
date='2026-04-17', description=None, encoder=None, grouping=None,
lyrics=None, purchase_date=None),
client=<streamrip.client.deezer.DeezerClient object at
0x7f89a0911940>, config=<streamrip.config.Config object at
0x7f89a0dd34d0>, folder='/mnt/Coding/Audio/Music/Unsorted',
db=Database(downloads=<streamrip.db.Downloads object at
0x7f89a0912660>, failed=<streamrip.db.Failed object at
0x7f89a09127b0>),
cover_path='/mnt/Coding/Audio/Music/Unsorted/__artwork/cover-232128684
721561292.jpg')]
DEBUG Executing SELECT EXISTS(SELECT 1 FROM downloads WHERE id=?) db.py:108
WARNING The requested quality 2 is not available. Falling back to quality 1 deezer.py:170
WARNING The requested quality 1 is not available. Falling back to quality 0 deezer.py:170
DEBUG Fetching deezer url with token deezer.py:189
<Token Redacted>
DEBUG dz track info: {'ALB_ID': '961826611', 'ALB_PICTURE': deezer.py:212
'67de6ac1915361bd52c14b9130e313d1', 'ALB_TITLE': "Ironic ('Mile End
Kicks' - Music Inspired by the Motion Picture)", 'ARTISTS':
[{'ART_ID': '35', 'ROLE_ID': '0', 'ARTISTS_SONGS_ORDER': '1',
'ART_NAME': 'Avril Lavigne', 'ARTIST_IS_DUMMY': False, 'ART_PICTURE':
'4b6910349178701af19d401213e8c279', 'RANK': '761426', 'LOCALES':
{'lang_en': {'name': 'Avril Lavigne'}, 'lang_ja-hrkt': {'name':
'アヴリルラヴィーン'}, 'lang_ja-jpan': {'name':
'アヴリル・ラヴィーン'}, 'lang_ja-kana': {'name':
'アヴリルラヴィーン'}, 'lang_zh-hant': {'name': '艾薇兒'}, 'lang_ar':
{'name': 'آفريل لافين'}, 'lang_ja': {'name': 'AVRIL LAVIGNE'}},
'__TYPE__': 'artist'}], 'ART_ID': '35', 'ART_NAME': 'Avril Lavigne',
'ARTIST_IS_DUMMY': False, 'DIGITAL_RELEASE_DATE': '2026-04-17',
'DISK_NUMBER': '1', 'DURATION': '227', 'EXPLICIT_LYRICS': '0',
'EXPLICIT_TRACK_CONTENT': {'EXPLICIT_LYRICS_STATUS': 0,
'EXPLICIT_COVER_STATUS': 0}, 'GENRE_ID': '0', 'HIERARCHICAL_TITLE':
'', 'ISRC': 'USYFZ2691101', 'LYRICS_ID': 0, 'PHYSICAL_RELEASE_DATE':
'2026-04-15', 'PROVIDER_ID': '49', 'RANK': '557352', 'SMARTRADIO': 0,
'SNG_CONTRIBUTORS': {'main_artist': ['Avril Lavigne'], 'composer':
['Alanis Morissette', 'Glen Ballard'], 'author': ['Alanis
Morissette']}, 'SNG_ID': '3961514991', 'SNG_TITLE': "Ironic ('Mile
End Kicks' - Music Inspired by the Motion Picture)", 'STATUS': 1,
'TRACK_NUMBER': '1', 'USER_ID': 0, 'VERSION': '', 'MD5_ORIGIN':
'aae7ce7180429819ff52a84d536992da', 'FILESIZE_AAC_64': '0',
'FILESIZE_MP3_64': '0', 'FILESIZE_MP3_128': '3637915',
'FILESIZE_MP3_256': '0', 'FILESIZE_MP3_320': '0', 'FILESIZE_MP4_RA1':
'0', 'FILESIZE_MP4_RA2': '0', 'FILESIZE_MP4_RA3': '0',
'FILESIZE_FLAC': '0', 'FILESIZE': '3637915', 'GAIN': '-7.8',
'MEDIA_VERSION': '1', 'TRACK_TOKEN':
'<Track Token Redacted>',
'TRACK_TOKEN_EXPIRE': 1782954847, 'MEDIA': [{'TYPE': 'preview',
'HREF':
'http://cdnt-preview.dzcdn.net/api/1/1/9/8/6/0/986ca0f97bb00180cf6c1f
cfc6667009.mp3?hdnea=exp=1782883747~acl=/api/1/1/9/8/6/0/986ca0f97bb0
0180cf6c1fcfc6667009.mp3*~data=user_id=0,application_id=42~hmac=14f5f
19a3bfbf65d9d15601e2e0626df2adb111bcfbe90a7c778defd73083782'}],
'RIGHTS': {'STREAM_ADS_AVAILABLE': True, 'STREAM_ADS': '2000-01-01',
'STREAM_SUB_AVAILABLE': True, 'STREAM_SUB': '2000-01-01'},
'__TYPE__': 'song'}
DEBUG Deezer info for downloadable: {'quality': 0, 'id': 3961514991, downloadable.py:123
'quality_to_size': [3637915, 0, 0], 'url':
'https://cdnt-stream.dzcdn.net/media/1/1/f/2/1/3961514991/f219c
34f48d6a9327c2d443dbca8d535.mp3?hdnea=exp=1782954847~acl=/media
/1/1/f/2/1/3961514991/f219c34f48d6a9327c2d443dbca8d535.mp3*~dat
a=user_id=6876837581,iat=1782882847~hmac=a50f38e4e63ec7f44b684e
ef4bcfcf18f63b38185defc86d678bf95837b7096d'}
DEBUG Deezer file (id 3961514991) at downloadable.py:167
https://cdnt-stream.dzcdn.net/media/1/1/f/2/1/3961514991/f219c3
4f48d6a9327c2d443dbca8d535.mp3?hdnea=exp=1782954847~acl=/media/
1/1/f/2/1/3961514991/f219c34f48d6a9327c2d443dbca8d535.mp3*~data
=user_id=6876837581,iat=1782882847~hmac=a50f38e4e63ec7f44b684ee
f4bcfcf18f63b38185defc86d678bf95837b7096d is encrypted.
Decrypting with b"lcn;d2qof' 5i:c6"
[06:14:08] DEBUG Tagging with [('TIT2', TIT2(encoding=<Encoding.UTF8: 3>, tagger.py:254
text=["Ironic ('Mile End Kicks' - Music Inspired by the Motion
Picture)"])), ('TPE1', TPE1(encoding=<Encoding.UTF8: 3>, text=['Avril
Lavigne'])), ('TALB', TALB(encoding=<Encoding.UTF8: 3>, text=["Ironic
('Mile End Kicks' - Music Inspired by the Motion Picture)"])),
('TPE2', TPE2(encoding=<Encoding.UTF8: 3>, text=['Avril Lavigne'])),
('TYER', TYER(encoding=<Encoding.UTF8: 3>, text=['2026'])), ('TCON',
TCON(encoding=<Encoding.UTF8: 3>, text=['Alternative'])), ('USLT',
USLT(encoding=<Encoding.UTF8: 3>, lang='XXX', desc='', text='')),
('TRCK', TRCK(encoding=<Encoding.UTF8: 3>, text=['1/1'])), ('TPOS',
TPOS(encoding=<Encoding.UTF8: 3>, text=['1/1'])), ('TSRC',
TSRC(encoding=<Encoding.UTF8: 3>, text=['USYFZ2691101']))]
DEBUG No arguments provided. Codec defaults will be used converter.py:66
DEBUG FFmpeg codec extra argument: -b:a 256k converter.py:72
DEBUG ['ffmpeg', '-i', "/mnt/Coding/Audio/Music/Unsorted/Ironic ('Mile converter.py:156
End Kicks' - Music Inspired by the Motion Picture) -
3961514991.mp3", '-c:a', 'libfdk_aac', '-c:v', 'copy', '-b:a',
'256k', '-y', "/tmp/Ironic ('Mile End Kicks' - Music Inspired by
the Motion Picture) - 3961514991.m4a"]
DEBUG Generated conversion command: ['ffmpeg', '-i', converter.py:85
"/mnt/Coding/Audio/Music/Unsorted/Ironic ('Mile End Kicks' - Music
Inspired by the Motion Picture) - 3961514991.mp3", '-c:a',
'libfdk_aac', '-c:v', 'copy', '-b:a', '256k', '-y', "/tmp/Ironic
('Mile End Kicks' - Music Inspired by the Motion Picture) -
3961514991.m4a"]
ERROR Error downloading track: FFmpeg output: album.py:41
(None, b"ffmpeg version n8.1.1 Copyright (c) 2000-2026 the FFmpeg
developers\n built with gcc 16.1.1 (GCC) 20260430\n configuration:
--prefix=/usr --disable-debug --disable-static --disable-stripping
--enable-amf --enable-avisynth --enable-cuda-llvm --enable-lto
--enable-fontconfig --enable-frei0r --enable-gmp --enable-gnutls
--enable-gpl --enable-ladspa --enable-lcms2 --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libdav1d
--enable-libdrm --enable-libdvdnav --enable-libdvdread
--enable-libfreetype --enable-libfribidi --enable-libglslang
--enable-libgsm --enable-libharfbuzz --enable-libiec61883
--enable-libjack --enable-libjxl --enable-libmodplug
--enable-libmp3lame --enable-libopencore_amrnb
--enable-libopencore_amrwb --enable-libopenjpeg --enable-libopenmpt
--enable-libopus --enable-libplacebo --enable-libpulse
--enable-librav1e --enable-librsvg --enable-librubberband
--enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt
--enable-libssh --enable-libsvtav1 --enable-libtheora --enable-libv4l2
--enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpl
--enable-libvpx --enable-libwebp --enable-libx264 --enable-libx265
--enable-libxcb --enable-libxml2 --enable-libxvid --enable-libzimg
--enable-libzmq --enable-nvdec --enable-nvenc --enable-opencl
--enable-opengl --enable-shared --enable-vapoursynth --enable-version3
--enable-vulkan\n libavutil 60. 26.101 / 60. 26.101\n libavcodec
62. 28.101 / 62. 28.101\n libavformat 62. 12.101 / 62. 12.101\n
libavdevice 62. 3.101 / 62. 3.101\n libavfilter 11. 14.101 /
11. 14.101\n libswscale 9. 5.101 / 9. 5.101\n libswresample
6. 3.101 / 6. 3.101\nInput #0, mp3, from
'/mnt/Coding/Audio/Music/Unsorted/Ironic ('Mile End Kicks' - Music
Inspired by the Motion Picture) - 3961514991.mp3':\n Metadata:\n
title : Ironic ('Mile End Kicks' - Music Inspired by the
Motion Picture)\n artist : Avril Lavigne\n track
: 1/1\n album : Ironic ('Mile End Kicks' - Music Inspired
by the Motion Picture)\n disc : 1/1\n genre
: Alternative\n album_artist : Avril Lavigne\n lyrics-XXX
: \n TSRC : USYFZ2691101\n date : 2026\n
Duration: 00:03:47.34, start: 0.000000, bitrate: 129 kb/s\n Stream
#0:0: Audio: mp3 (mp3float), 44100 Hz, stereo, fltp, 128 kb/s\n
Metadata:\n encoder : Lame3.100\n Stream #0:1: Video:
mjpeg (Baseline), yuvj444p(pc, bt470bg/unknown/unknown), 500x500 [SAR
1:1 DAR 1:1], 90k tbr, 90k tbn (attached pic)\n Metadata:\n
comment : Cover (front)\n[aost#0:1 @ 0x55b57c1f28c0] Unknown
encoder 'libfdk_aac'\n[aost#0:1 @ 0x55b57c1f28c0] Error selecting an
encoder\nError opening output file /tmp/Ironic ('Mile End Kicks' -
Music Inspired by the Motion Picture) - 3961514991.m4a.\nError opening
output files: Encoder not found\n")
──────────── Downloading Ironic ('Mile End Kicks' - Music Inspired by the Motion Picture) ─────────────
DEBUG Removing dirs {'/mnt/Coding/Audio/Music/Unsorted/__artwork'} artwork.py:19
### With conversion disabled
[06:20:17] DEBUG Showing all debug logs cli.py:111
⠙ Resolving URLs...[06:20:18] DEBUG Pending tracks: [PendingTrack(id=3961514991, album.py:106
album=AlbumMetadata(info=AlbumInfo(id='961826611', quality=2,
container='FLAC', label='Sumerian Records', explicit=False,
sampling_rate=44100, bit_depth=16, booklets=None), album="Ironic
('Mile End Kicks' - Music Inspired by the Motion Picture)",
albumartist='Avril Lavigne', year='2026', genre=['Alternative'],
covers=Covers(('original',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/1000x1000-000000-80-0-0.jpg', None)
('large',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/500x500-000000-80-0-0.jpg',
'/mnt/Coding/Audio/Music/Unsorted/__artwork/cover2983122623075921185.j
pg')
('small',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/250x250-000000-80-0-0.jpg', None)
('thumbnail',
'https://cdn-images.dzcdn.net/images/cover/67de6ac1915361bd52c14b9130e
313d1/56x56-000000-80-0-0.jpg', None)), tracktotal=1, disctotal=1,
albumcomposer=None, comment=None, compilation=None, copyright=None,
date='2026-04-17', description=None, encoder=None, grouping=None,
lyrics=None, purchase_date=None),
client=<streamrip.client.deezer.DeezerClient object at
0x7fc8a8281940>, config=<streamrip.config.Config object at
0x7fc8a874b4d0>, folder='/mnt/Coding/Audio/Music/Unsorted',
db=Database(downloads=<streamrip.db.Downloads object at
0x7fc8a8282660>, failed=<streamrip.db.Failed object at
0x7fc8a82827b0>),
cover_path='/mnt/Coding/Audio/Music/Unsorted/__artwork/cover2983122623
075921185.jpg')]
DEBUG Executing SELECT EXISTS(SELECT 1 FROM downloads WHERE id=?) db.py:108
WARNING The requested quality 2 is not available. Falling back to quality 1 deezer.py:170
WARNING The requested quality 1 is not available. Falling back to quality 0 deezer.py:170
DEBUG Fetching deezer url with token deezer.py:189
<Token Redacted>
DEBUG dz track info: {'ALB_ID': '961826611', 'ALB_PICTURE': deezer.py:212
'67de6ac1915361bd52c14b9130e313d1', 'ALB_TITLE': "Ironic ('Mile End
Kicks' - Music Inspired by the Motion Picture)", 'ARTISTS':
[{'ART_ID': '35', 'ROLE_ID': '0', 'ARTISTS_SONGS_ORDER': '1',
'ART_NAME': 'Avril Lavigne', 'ARTIST_IS_DUMMY': False, 'ART_PICTURE':
'4b6910349178701af19d401213e8c279', 'RANK': '761426', 'LOCALES':
{'lang_en': {'name': 'Avril Lavigne'}, 'lang_ja-hrkt': {'name':
'アヴリルラヴィーン'}, 'lang_ja-jpan': {'name':
'アヴリル・ラヴィーン'}, 'lang_ja-kana': {'name':
'アヴリルラヴィーン'}, 'lang_zh-hant': {'name': '艾薇兒'}, 'lang_ar':
{'name': 'آفريل لافين'}, 'lang_ja': {'name': 'AVRIL LAVIGNE'}},
'__TYPE__': 'artist'}], 'ART_ID': '35', 'ART_NAME': 'Avril Lavigne',
'ARTIST_IS_DUMMY': False, 'DIGITAL_RELEASE_DATE': '2026-04-17',
'DISK_NUMBER': '1', 'DURATION': '227', 'EXPLICIT_LYRICS': '0',
'EXPLICIT_TRACK_CONTENT': {'EXPLICIT_LYRICS_STATUS': 0,
'EXPLICIT_COVER_STATUS': 0}, 'GENRE_ID': '0', 'HIERARCHICAL_TITLE':
'', 'ISRC': 'USYFZ2691101', 'LYRICS_ID': 0, 'PHYSICAL_RELEASE_DATE':
'2026-04-15', 'PROVIDER_ID': '49', 'RANK': '557352', 'SMARTRADIO': 0,
'SNG_CONTRIBUTORS': {'main_artist': ['Avril Lavigne'], 'composer':
['Alanis Morissette', 'Glen Ballard'], 'author': ['Alanis
Morissette']}, 'SNG_ID': '3961514991', 'SNG_TITLE': "Ironic ('Mile
End Kicks' - Music Inspired by the Motion Picture)", 'STATUS': 1,
'TRACK_NUMBER': '1', 'USER_ID': 0, 'VERSION': '', 'MD5_ORIGIN':
'aae7ce7180429819ff52a84d536992da', 'FILESIZE_AAC_64': '0',
'FILESIZE_MP3_64': '0', 'FILESIZE_MP3_128': '3637915',
'FILESIZE_MP3_256': '0', 'FILESIZE_MP3_320': '0', 'FILESIZE_MP4_RA1':
'0', 'FILESIZE_MP4_RA2': '0', 'FILESIZE_MP4_RA3': '0',
'FILESIZE_FLAC': '0', 'FILESIZE': '3637915', 'GAIN': '-7.8',
'MEDIA_VERSION': '1', 'TRACK_TOKEN':
'<Track Token Redacted>',
'TRACK_TOKEN_EXPIRE': 1782955218, 'MEDIA': [{'TYPE': 'preview',
'HREF':
'http://cdnt-preview.dzcdn.net/api/1/1/9/8/6/0/986ca0f97bb00180cf6c1f
cfc6667009.mp3?hdnea=exp=1782884118~acl=/api/1/1/9/8/6/0/986ca0f97bb0
0180cf6c1fcfc6667009.mp3*~data=user_id=0,application_id=42~hmac=bfbed
6c3b9c290a44d5faf8876dd53fcd8ec37ba9092ff0db11f20b57348b836'}],
'RIGHTS': {'STREAM_ADS_AVAILABLE': True, 'STREAM_ADS': '2000-01-01',
'STREAM_SUB_AVAILABLE': True, 'STREAM_SUB': '2000-01-01'},
'__TYPE__': 'song'}
DEBUG Deezer info for downloadable: {'quality': 0, 'id': 3961514991, downloadable.py:123
'quality_to_size': [3637915, 0, 0], 'url':
'https://cdnt-stream.dzcdn.net/media/1/1/f/2/1/3961514991/f219c
34f48d6a9327c2d443dbca8d535.mp3?hdnea=exp=1782955218~acl=/media
/1/1/f/2/1/3961514991/f219c34f48d6a9327c2d443dbca8d535.mp3*~dat
a=user_id=6876837581,iat=1782883218~hmac=f30ef618e2d72d0aac3c5b
da7478fa03056802361891b1c923e2d2b7f1ad9058'}
DEBUG Deezer file (id 3961514991) at downloadable.py:167
https://cdnt-stream.dzcdn.net/media/1/1/f/2/1/3961514991/f219c3
4f48d6a9327c2d443dbca8d535.mp3?hdnea=exp=1782955218~acl=/media/
1/1/f/2/1/3961514991/f219c34f48d6a9327c2d443dbca8d535.mp3*~data
=user_id=6876837581,iat=1782883218~hmac=f30ef618e2d72d0aac3c5bd
a7478fa03056802361891b1c923e2d2b7f1ad9058 is encrypted.
Decrypting with b"lcn;d2qof' 5i:c6"
DEBUG Tagging with [('TIT2', TIT2(encoding=<Encoding.UTF8: 3>, tagger.py:254
text=["Ironic ('Mile End Kicks' - Music Inspired by the Motion
Picture)"])), ('TPE1', TPE1(encoding=<Encoding.UTF8: 3>, text=['Avril
Lavigne'])), ('TALB', TALB(encoding=<Encoding.UTF8: 3>, text=["Ironic
('Mile End Kicks' - Music Inspired by the Motion Picture)"])),
('TPE2', TPE2(encoding=<Encoding.UTF8: 3>, text=['Avril Lavigne'])),
('TYER', TYER(encoding=<Encoding.UTF8: 3>, text=['2026'])), ('TCON',
TCON(encoding=<Encoding.UTF8: 3>, text=['Alternative'])), ('USLT',
USLT(encoding=<Encoding.UTF8: 3>, lang='XXX', desc='', text='')),
('TRCK', TRCK(encoding=<Encoding.UTF8: 3>, text=['1/1'])), ('TPOS',
TPOS(encoding=<Encoding.UTF8: 3>, text=['1/1'])), ('TSRC',
TSRC(encoding=<Encoding.UTF8: 3>, text=['USYFZ2691101']))]
DEBUG Executing INSERT INTO downloads (id) VALUES (?) db.py:124
DEBUG Items to add: ('3961514991',) db.py:125
──────────── Downloading Ironic ('Mile End Kicks' - Music Inspired by the Motion Picture) ─────────────
DEBUG Removing dirs {'/mnt/Coding/Audio/Music/Unsorted/__artwork'} artwork.py:19
Describe the bug
When downloading a large batch of tracks (e.g. an artist discography, or album) with audio conversion enabled and set to AAC, many tracks fail with
ConversionError: FFmpeg output:\n(None, b''). Because this exception is raised inTrack.postprocess()beforeself.db.set_deonloaded(...)runs, the track ID is never actually added to the downloaded database causing following runs to redownload every track again, disabling conversion correct records track IDs in the database.The
ConversionErrordoesn't actually cause malformed or corrupted downloads, files are still fully functional with all the metadata expected just not converted, I think it's becauseos.remove(self.filename)inconverter.pyonly runs on success.Command Used
`rip url https://www.deezer.com/en/album/961826611 `Debug Traceback
Config File
Operating System
Arch Linux
streamrip version
rip, version 2.2.0 (Downloaded from AUR)
Screenshots and recordings
No response
Additional context
sqlite downloaded database after running with conversion enabled
sqlite downloaded database after running with conversion disabled