Menu

#172 Stdout and stderr - Output confusing

v1.0_(example)
open
nobody
None
1
2014-06-10
2014-06-09
abssorb
No

I'm making great use of the silence detection error reporting - warn_if_no_aa

I have a project to resize splitpoints on a collection of 18 audiobook cd's. In most cases, the silence detection works well. But some of the audio has background sound effects, which has a negative impact. Playing with parameters can't overcome the problem (so far).

I'm going to batch split the whole lot using a script, and then manually tweak the failures in a sound editor.

I want to capture the "failures", so I'm redirecting output to a log file.

I've encountered two problems.

As far as I can tell, the progress lines, e.g.:
[ 4.31 %] preparing "02_01_Dune.mp3" (1 of 8)

Are going to stderr rather than stdout.

This makes picking out the errors difficult.
Useful info, such as:
warning: splitpoint 10.0.0 is not auto-adjusted

Does go to stderr.

The second problem, is if I try and grep out the good stuff, grep is failing. It seems that all the progress lines and the std err are all coming out as one line, missing CR/NL. So grep on the one pattern of "warning" returns 20 progress lines too.

Discussion

  • abssorb

    abssorb - 2014-06-09

    See attached file. Strangeness relating to ^M

    For instance, cat .temp_logfile_mp3_divider and more .temp_logfile_mp3_divider give two different results.

     
  • Munteanu Alexandru

    Try adding the -q option.

     
  • abssorb

    abssorb - 2014-06-10

    Hi, Thanks.
    I tried the -q option already, but I do need stdout also. I'm using the tee command.

    As a workaround I'm using sed 's/\o015/\n/g' which gets rid of the ^M

     
  • Munteanu Alexandru

    -q also keeps stdout, but do not output some lines such as 'Working with SILENCE AUTO-ADJUST (Threshold: -48,0 dB Gap: 30 sec Offset: 0,80 Min: 0,00 sec)'

    There is also a non-documented parameter that I use for the automatic tests called -X.

     
  • abssorb

    abssorb - 2014-06-10

    Ah OK, I'll do some more experimenting. This isn't a big deal of course, just giving feedback. But very grateful for your advice :)