Few improvements to reduce/eliminate corrupt MP3 files#1
Open
b606 wants to merge 11 commits intopanticz:masterfrom
Open
Few improvements to reduce/eliminate corrupt MP3 files#1b606 wants to merge 11 commits intopanticz:masterfrom
b606 wants to merge 11 commits intopanticz:masterfrom
Conversation
- move the .WAV file to a temp filename - Use multiprocessing.Process for convert_to_mp3 That still does not solve all the problem of corrupt .MP3 file for the track just before advertisement track. The bug still exists but occurrence seems to be reduced. The source of the bug might be deeper in pydub.AudioSegment
NB. win32 not tested
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reduces the problem of corrupt .MP3 file for the track just before advertisement track: that track was not fully converted even though the WAV file was OK.
The download path is system/language-independent (although not tested on win32).
The bitrate is optionally increased to 320k, not sure if it is helpful.
Display an error message when the Spotify client is not registered with the audio server.
Remaining issue : the recording of the track just after advertisement bits still starts a little too earlier (~1 second on my system).
Have not yet find out the way to filter out the related dbus messages avalanche and start the parec subprocess at the right moment. The quick workaround is to replay that track if needed or edit it with some software such as audacity.The issue seems to be solved in the last commit by adding extra delay before the parec subprocess