Menu

#313 --replay-gain when encoding stdin with --force-raw-format

closed-fixed
6
2009-01-02
2007-11-28
No

Issuing this command

flac -V -o file.flac --best --replay-gain --force-raw-format --endian=big --channels=2 --sample-rate=44100 --sign=signed --bps=16 -

will cause flac to quit with

ERROR: --replay-gain cannot be used when encoding to stdout

But I am not encoding to stdout, am I? I am encoding from stdin to a file. In this case, flac should either let me use --replay-gain or tell me a different reason why I can't use it.

flac is happy to encode if I remove the --force-raw-format flag.

Discussion

  • Josh Coalson

    Josh Coalson - 2007-11-28
    • priority: 5 --> 6
    • assigned_to: nobody --> jcoalson
    • status: open --> open-accepted
     
  • K-o-x

    K-o-x - 2008-07-03

    Logged In: YES
    user_id=1940052
    Originator: NO

    Hi

    Any progress on this bug ? It's still present with 1.2.1 and I don't know if anyone is working on it.

     
  • K-o-x

    K-o-x - 2008-07-03

    Logged In: YES
    user_id=1940052
    Originator: NO

    src/flac/main.c on lines 1481-1485 states :
    if(/*@@@@@@why no stdin?*/encode_infile == stdin || option_values.force_to_stdout) {
    if(option_values.replay_gain) {
    conditional_fclose(encode_infile);
    return usage_error("ERROR: --replay-gain cannot be used when encoding to stdout\n");
    }

    Removing the encode_infile == stdin condition seems to be a good start. Unfortunately when doing this, encoding from stdin with --replay-gain makes flac exit with "internal error" just after completing the encoding and writing the file. Note that the generated file is valid (flac -a outputs nothing unusual and all the files I encoded this way have no problem playing in several players).

    Any clue on how to investigate this further ? I'm quite new to flac sourcecode (actually this was my first look at it) so I'm a bit lost about where to look now.

     
  • Josh Coalson

    Josh Coalson - 2009-01-02
    • status: open-accepted --> closed-fixed
     
  • Josh Coalson

    Josh Coalson - 2009-01-02

    fixed in cvs, replay gain from stdin now ok.

     

Log in to post a comment.