Crack when converting with pipe

Bug #675683 reported by mlx
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
dir2ogg
Fix Released
Undecided
Unassigned

Bug Description

An mp3 file I produces a "crack" sound in the beginning of the resulting .ogg file when it's converted using pipe.
dir2ogg output:
$ dir2ogg -q4 ./
dir2ogg 0.11.8 (2009-08-04), converts audio files into ogg vorbis.

INFO: Converting "/home/michal/sftp/_michal/disk_200/Music/MP3s to be converted/Chris Rea-16 cd/Chris Rea-Gods Great Banana Skin-1992/01 - Nothing To Fear.mp3" (using mpg123 as decoder)...
[wav.c:371] warning: Cannot rewind WAV file. File-format isn't fully conform now.
Encoding standard input to
         "/home/michal/sftp/_michal/disk_200/Music/MP3s to be converted/Chris Rea-16 cd/Chris Rea-Gods Great Banana Skin-1992/01 - Nothing To Fear.ogg"
at quality 4,00
        Encoding [ 0m53s so far] | [wav.c:371] warning: Cannot rewind WAV file. File-format isn't fully conform now.

Done encoding file "/home/michal/sftp/_michal/disk_200/Music/MP3s to be converted/Chris Rea-16 cd/Chris Rea-Gods Great Banana Skin-1992/01 - Nothing To Fear.ogg"

        File length: 9m 12,0s
        Elapsed time: 0m 53,7s
        Rate: 10,2846
        Average bitrate: 118,3 kb/s

Using the -P option eliminates this. I can upload the source/resulting files if necessary.

Revision history for this message
admiralnemo (admiralnemo) wrote :

I too am experiencing this problem. The issue is that when using the `mpg123` and `mpg321` decoders, `dir2ogg` calls them in a way that causes them to generate a WAV-formatted audio stream to send to `oggenc`, which is expecting a RAW stream.

I have attached a patch that adjusts the arguments for the noted decoders that should correct this.

Revision history for this message
Julian Andres Klode (juliank) wrote :

The patch is obviously wrong, it breaks mpg321 with temporary files. I also haven't really looked at the problem, although I may do so later.

Revision history for this message
admiralnemo (admiralnemo) wrote :

This bug has been open for months being ignored and that's how you respond when someone steps up to help? Good luck finding a solution.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Just Facts. I did not look at this bug yet, as I have other things to do and also forget some bugs from time to time; and the patch is wrong. You should be happy that your patch got reviewed within 5 hours and not complain about how I express the facts.

Revision history for this message
Matthieu Dalstein (matthieu-dalstein) wrote :

Hello,

I would like to confirm and highlight the importance of this issue, as I have just realized that I ruined my ogg collection due to this bug.
This is quite embarassing :S

Revision history for this message
Matthieu Dalstein (matthieu-dalstein) wrote :

Hello,

Actually the issue comes from the fact that in this situation oggenc is triggered with the -r/-R flags which explicitely declare the format as raw, instead of wavefile as created by mpg123/321

Please find this patch which corrects the behaviour for mpg123/321 conversions.
I tested this patch with some samples and did not find any issue in removing the mutagen data. Oggenc detected it properly.

Regards

Revision history for this message
Matthieu Dalstein (matthieu-dalstein) wrote :

Hello,

Are you looking for some help on the tool maintenance ?
If yes I volunteer to contribute.

Cheers

Revision history for this message
Julian Andres Klode (juliank) wrote :

Matthieu: I committed a fix from the Debian BTS in

https://github.com/julian-klode/dir2ogg/commit/3e3a74c51af4e14cb3de0ea782727f7e7c1596ee

(yes, I'm migrating to git, and probably github too).

This should resolve the issue while still working with older versions of mpg123. Can you confirm this?

Changed in dir2ogg:
status: New → Fix Committed
Revision history for this message
Matthieu Dalstein (matthieu-dalstein) wrote :

I confirm the patch fixes the issue with mpg123.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Fixed in 0.12

Changed in dir2ogg:
status: Fix Committed → Fix Released
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.