Corrupt files when converting from WAV to FLAC

Bug #381358 reported by Volcano
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
soundconverter (Ubuntu)
Incomplete
Undecided
Unassigned

Bug Description

Hi, I record with a Edirol R 09 HR WAV-files. http://www.edirol.net/products/en/R-09/
When I convert the WAV-files, directly from the Edirol, with Sound Converter to FLAC only approximatly 1 out of 10 tracks play in Amarok or other players.
If I check the files in Easy-Tag, it says that the not-working tracks have 6 or 8 channels, other tracks have 2 channels, but bitrate: 0 kb/s, they also don't play.

Revision history for this message
Volcano (bjorn-boonen) wrote :
Revision history for this message
Stefan Friesel (stefan-friesel) wrote :

please paste here the output of "soundconverter --debug" while reproducing the problem.
Thank you for your help.

Changed in soundconverter (Ubuntu):
status: New → Incomplete
Revision history for this message
GautierPortet (kassoulet) wrote :

Well, I would prefer a small wav instead.
If we must change something to support weird wav, it will be simpler to have one sample to try.

Revision history for this message
alexxtasi (alexxtasi) wrote :

hi
I have the a similar problem when trying to convert wav files to flac...
Adding a folder, I select all files and press the "convert" button. Before that, I have checked:
       >Same folder as the input file
       >create subfolders (artist - album)
       >custom filename pattern {Track} - {Title}
       >format: FLAC
the application runs properly and ends creating just one flac file (happens to be the first song) and nothing else, without any message.
I made this comment here not knowing whether it's the same bug or not, so please correct me.

I use ubuntu 9.04 and SoundConverter 1.4.1
I 'll make some other tests with flac to ogg or else conversions.
thanx

Revision history for this message
Volcano (bjorn-boonen) wrote :

Hi, sorry for the late reaction, i still have the same problem...

this is what i get from soundconverter --debug:

SoundConverter 1.4.1
  using Gstreamer version: 0.10.22, Python binding version: 0.10.14
  using gio
  'faac' element not found, disabling AAC.
  using 1 thread(s)
launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.wav" ! typefind name=typefinder ! fakesink'
found_type 01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.wav
launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.wav" name=src ! decodebin name=decoder ! fakesink'
got file duration: 227
TagReading done...
Queue done in 0s
pipeline already stopped!
Queue done in 0s
launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.wav" name=src ! decodebin name=decoder ! audioconvert ! flacenc mid-side-stereo=true quality=8 ! giosink location=file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.flac'
Queue done in 54s

This file is read by easytag as a 6 channels, 775 kb/s Bitrate, 44101Hz Freq file

The original wav is too big to upload, i'll just put a little silence other one in the attachment

It does play in Totem, but not in Amarok.

If i take this file and convert it to mp3 as VBR and insanely High quality i get a 112kb/s joint stereo file, which could be a second bug....

launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.flac" ! typefind name=typefinder ! fakesink'
found_type 01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.flac
launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.flac" name=src ! decodebin name=decoder ! fakesink'
TagReading done...
Queue done in 0s
pipeline already stopped!
Queue done in 0s
launching: 'giosrc location="file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.flac" name=src ! decodebin name=decoder ! audioconvert ! lame quality=2 vbr=4 vbr-quality=0 ! xingmux ! id3v2mux ! giosink location=file:///media/My%20Book/Platen/Maxies/Carib%20Sound/General%20T.K.%20%7C%20Glamour%20Murphy%20-%20I%20Spy%20%7C%20Romantic%20Murphy/01.%20Glamour%20Murphy%20-%20Romantic%20Murphy.mp3'
Queue done in 23s

Hoping this can help you

Revision history for this message
Stefan Friesel (stefan-friesel) wrote :

Should the result you uploaded also produce a corrupt file or is this only about the mp3-bitrate? If yes, on karmic the converted flac looks correct and converting back produces a bit identic wav. If not Gautier still needs a sample wav that produces wrong output;)

As for the mp3 encoding, this may or may not be related to gstreamer's lame plugin passing bad options to the encoder (https://bugzilla.gnome.org/show_bug.cgi?id=494528, https://bugs.launchpad.net/ubuntu/+source/sound-juicer/+bug/195483). It may or may not be reasonable to switch SC to use the new lamemp3enc plugin (see first link, comment 7).

Revision history for this message
woodyson (woodyson) wrote :

I have been getting what I think could be the same problem converting WAV to FLAC. In my case the WAV files have been produced by the gramofile package. I am using Ubuntu 9.04 and SoundConverter 1.4.1. The FLAC files produced play OK in Quod Libet, but only about half the tracks play when downloaded to my portable music player. The bitstream, as you say, is intact and I am using SoundConverter to convert the files back to WAV and then using the command line "flac" utility to convert back to FLAC.

The problems appear to be in the STREAMINFO block in the FLAC file (see http://flac.sourceforge.net/format.html for block layout). "metaflac --list file.flac" shows that the FLAC files produced by SoundConverter have various values for the number of channels, sample rate and the number of bits per sample in the STREAMINFO block, and the values are not derived from the WAV files which are all stereo (2 channels), 44100 Hz and 16 bits per sample. I have found the best way to test if a FLAC file is valid is to use "flac --test file.flac" and over 90% of the FLAC files I have produced using Sound Converter come up with some error relating to the STREAMINFO fields.

Example messages from flac --test with FLAC files I have produced using SoundConverter are:
Chant.flac: ERROR, channels is 2 in frame but 8 in STREAMINFO
l42a.flac: ERROR, channels is 2 in frame but 6 in STREAMINFO
Do.flac: ERROR: bits per sample is 32, must be 4-24
test1.flac: WARNING, cannot check MD5 signature since it was unset in the STREAMINFO
Tracks.flac: ERROR, sample rate is 44100 in frame but 44108 in STREAMINFO

A short example WAV file (recorded from an LP after the end of the last track) is attached. The relevant part of output (after conversion by Sound Converter) from "metaflac --list test3.flac" is:
METADATA block #0
  type: 0 (STREAMINFO)
  is last: false
  length: 34
  minimum blocksize: 4608 samples
  maximum blocksize: 4608 samples
  minimum framesize: 2019 bytes
  maximum framesize: 5033 bytes
  sample_rate: 44100 Hz
  channels: 6
  bits-per-sample: 16
  total samples: 568891
  MD5 signature: 00f673e2ccbedc1f3b5287b69391f7aa

And output from "flac --test test3.flac" is:

flac 1.2.1, Copyright (C) 2000,2001,2002,2003,2004,2005,2006,2007 Josh Coalson
flac comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it under certain conditions. Type `flac' for details.

test3.flac: ERROR, channels is 2 in frame but 6 in STREAMINFO

test3.flac: ERROR while decoding data
            state = FLAC__STREAM_DECODER_READ_FRAME

Revision history for this message
Eddie (zx4636313) wrote :

Same problem...
It never work properly when I'm going to convert a .wav file to a .flac file!
Moreover, Gstreamer can't play the file either.

Revision history for this message
Eddie (zx4636313) wrote :

lin@lin-laptop:~/桌面/Liberty Rock$ soundconverter --debug
SoundConverter 1.4.4
  using Gstreamer version: 0.10.28, Python binding version: 0.10.18
  using gio
  using 2 thread(s)
launching: 'giosrc location="file:///home/lin/%E6%A1%8C%E9%9D%A2/Liberty%20Rock/1979.wav" ! typefind name=typefinder ! fakesink'
found_type 1979.wav
launching: 'giosrc location="file:///home/lin/%E6%A1%8C%E9%9D%A2/Liberty%20Rock/1979.wav" name=src ! decodebin name=decoder ! fakesink'
error: 無法決定資料串流的類型。 (1979.wav)
error: GStreamer encountered a general stream error. (1979.wav)
Queue done in 0s
Queue done in 0s
Creating folder: 'file:///home/lin/%E6%A1%8C%E9%9D%A2/LRR%20flac/Unknown%20Artist/Unknown%20Album'
home
lin
%E6%A1%8C%E9%9D%A2
LRR%20flac
Unknown%20Artist
Unknown%20Album
launching: 'giosrc location="file:///home/lin/%E6%A1%8C%E9%9D%A2/Liberty%20Rock/1979.wav" name=src ! decodebin name=decoder ! audioconvert ! flacenc mid-side-stereo=true quality=8 ! giosink location=file:///home/lin/%E6%A1%8C%E9%9D%A2/LRR%20flac/Unknown%20Artist/Unknown%20Album/00%20-%20Unknown%20Title.flac'
Queue done in 0s

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.