flacsync icon indicating copy to clipboard operation
flacsync copied to clipboard

Faulty flac files should be handled better

Open svalgaard opened this issue 12 years ago • 2 comments

If you have faulty FLAC files (as I unfortunately have), flacsync simply stops in the middle of the file, and leaves a partial aac file. flacsync should either not create an aac file or try to decode the entire file if possible (using -F).

e.g., for a 10:00 flac file with an error 2 minutes inside the file, you get a 2 minute aac file.

adding -F looks like the easiest solution (and the best in many cases). This can be done by adding -F in encoder.py approx line 131:

    # encode to AAC                                                                                                                                                                                
     err = sp.call( 'flac -d "%s" -c -s -F | neroAacEnc -q %s -if - -of "%s"' %
       (self.src, self.q, self.dst), shell=True, stderr=NULL)

Cheers,

Jens

svalgaard avatar Jan 30 '13 19:01 svalgaard

Thanks for the report. I'll try and address this soon.

On Wed, Jan 30, 2013 at 9:26 AM, Jens Svalgaard Kohrt < [email protected]> wrote:

If you have faulty FLAC files (as I unfortunately have), flacsync simply stops in the middle of the file, and leaves a partial aac file. flacsync should either not create an aac file or try to decode the entire file if possible (using -F).

e.g., for a 10:00 flac file with an error 2 minutes inside the file, you get a 2 minute aac file.

adding -F looks like the easiest solution (and the best in many cases). This can be done by adding -F in encoder.py approx line 131:

# encode to AAC
 err = sp.call( 'flac -d "%s" -c -s -F | neroAacEnc -q %s -if - -of "%s"' %
   (self.src, self.q, self.dst), shell=True, stderr=NULL)

Cheers,

Jens

— Reply to this email directly or view it on GitHubhttps://github.com/cmcginty/flacsync/issues/4.

cmcginty avatar Feb 01 '13 20:02 cmcginty

Thanks. Let me know if you need a test Flac file. Though I guess that you could create one by simply changing a byte somewhere in the middle af any flac file... :)

svalgaard avatar Feb 02 '13 08:02 svalgaard