Skip to main content
Topic: consecutive pipe processes as one encoder (without temp file %s) (Read 1025 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

consecutive pipe processes as one encoder (without temp file %s)

Hello,

Is there a way to put two consecutive pipe processes as one output encoder in converter (without using temporary %s file)?

for example: eac3to - stdout.wav | Lame -V 2 - %d


Re: consecutive pipe processes as one encoder (without temp file %s)

Reply #2
Here's a few examples of command lines I use.

ffmpeg compressing with the DynamicAudioNormalizer and piping to QAAC.
 /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -af dynaudnorm=f=150 -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe --ignorelength -s --no-optimize --no-delay -V 91 -o %d -

A PAL to NTSC slowdown using SoundTouch, piped to QAAC.
 /d /c c:\progra~1\foobar2000\encoders\soundstretch.exe stdin stdout -rate=-4.09590409590409590409590409590413 | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe --ignorelength -s --no-optimize --no-delay -V 91 -o %d -

A PAL to NTSC slowdown using SoX, while also applying a -74ms delay (just as an example). Resampling quality is "-v". Piped to QAAC.
 /d /c c:\progra~1\foobar2000\encoders\SoX\sox.exe --ignore-length -t wav - -t wav -e float -b 32 - trim 0.074 -0 speed 1.0427083333333333333333333333333 rate -v | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe --ignorelength -s --no-optimize --no-delay -V 91 -o %d -

Fairly pointless as it is, but ffmpeg to Nero:
 /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\neroAacEnc.exe -q 0.5 -ignorelength -if - -of %d

Fairly pointless as it is again, but ffmpeg to LAME.
 /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe -i - -ignore_length true -c:a pcm_f32le -f wav - | c:\progra~1\foobar2000\encoders\lame.exe -S --noreplaygain -V 2 - %d

The encoder is cmd.exe for each of the above. The format is lossy and the highest BPS mode supported is 32, except for SoundTouch which is 24 (possibly because I'm using an older version on XP).

It's moments like these I find myself wishing the area for entering a command line in the encoder configuration was much larger, because editing long command lines is a pain, and for me it generally involves a fair degree of trial and error to get it working initially,. It's easier to edit the command line with notepad and copy and paste the whole thing into fb2k.

I've been meaning to try eac3to, but I haven't got around to that one yet.

Re: consecutive pipe processes as one encoder (without temp file %s)

Reply #3
Whoops.... the SoX command line above is for an NTSC to PAL speedup, not a slowdown. I must have copied the wrong command line from fb2k.

Re: consecutive pipe processes as one encoder (without temp file %s)

Reply #4
Thank you Rollin and yetanotherid.
I tried in a few variations of these and receive error code 1 for all.

Re: consecutive pipe processes as one encoder (without temp file %s)

Reply #5
If you copied and pasted them, did you include the space at the beginning? ie
 /d /c c:\progra~1\foobar2000\encoders\ffmpeg.exe.....
There's a space before the first forward slash.

Or maybe use the full file path in quotation marks. For me it'd be
 /d /c "c:\program files\foobar2000\encoders\ffmpeg.exe"
I'm not good with command line problems. Someone else may have a better idea. I gave some of those command lines to someone running Win7 a while back and he said they worked. I'm running XP, but I can at least demonstrate they work for me with a few fb2k console screenshots.

I specified m4a as the output extension for the QAAC piping, and cmd.exe as the encoder, and fb2k adds the full path to cmd.exe to the command line.




Re: consecutive pipe processes as one encoder (without temp file %s)

Reply #6
I had a play, and as best as I can tell eac3to doesn't accept stdin, so there's no normal way to avoid a temporary wave file. This eac3to command line works for me.... with a temporary wave input file.

 /d /c c:\progra~1\foobar2000\encoders\eac3to\eac3to.exe %s stdout.wav -simple | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe -s --ignorelength --no-optimize --no-delay -V 91 -o %d -

Code: [Select]
eac3to v3.34
command line: c:\progra~1\foobar2000\encoders\eac3to\eac3to.exe "D:\temp-2FBEEEA939B108B16CB25CB2EC5D9428.wav" stdout.wav -simple
------------------------------------------------------------------------------
WAV, 2.0 channels, 0:03:54, 32 bits <float>, 2822kbps, 44.1kHz
Reading WAV...
Reducing depth from 64 to 24 bits...
Writing WAV...
Creating file "stdout.wav"...
Original audio track: max 32 bits, average 28 bits, most common 27 bits.
The processed audio track has a constant bit depth of 24 bits.
eac3to processing took 7 seconds.
Done.

The closest I got to not using a temporary input file was to specify the file to be decoded in the command line instead of %s or stdin, but that involves editing the command line each time, and fb2k always reports the encoding failed at the end of the conversion (probably because eac3to never accepted fb2k's output), however it does work. It's probably easier to not use fb2k for that though.

To pipe the audio stream (stream #2) in an MKV to QAAC:

 /d /c c:\progra~1\foobar2000\encoders\eac3to\eac3to.exe "D:\test.mkv" 2: stdout.wav -simple | c:\progra~1\foobar2000\encoders\QAAC\qaac.exe -s --ignorelength --no-optimize --no-delay -V 91 -o %d -

Code: [Select]
eac3to v3.34

command line: c:\progra~1\foobar2000\encoders\eac3to\eac3to.exe "D:\test.mkv" 2: stdout.wav -simple
------------------------------------------------------------------------------
MKV, 1 video track, 1 audio track, 1 subtitle track, 0:21:52, 24p /1.001
1: h264/AVC, English, 720p24 /1.001 (16:9)
2: AC3, English, 5.1 channels, 384kbps, 48kHz, dialnorm: -27dB
3: Subtitle (SRT), English
[a02] Extracting audio track number 2...
[a02] Removing AC3 dialog normalization...
[a02] Decoding with libav/ffmpeg...
[a02] Reducing depth from 64 to 24 bits...
[a02] Writing WAV...
[a02] Creating file "stdout.wav"...
Video track 1 contains 31459 frames.
eac3to processing took 1 minute, 37 seconds.
Done.

 
SimplePortal 1.0.0 RC1 © 2008-2019