View Single Post
Old 27th January 2015, 21:06   #21  |  Link
Selur
Registered User
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,277
When I call:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -acodec pcm_s16le -f wav h:\Output\test.wav"
the channel order inside the test.wav file is okay, when I call:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -acodec pcm_s16le -f wav - > h:\Output\pipe.wav"
the channel order inside the pipe.wav file is okay, when I call:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -acodec pcm_s32le -f wav - | sox --multi-threaded --ignore-length --temp "H:\Temp" --buffer 524288 -S -t wav - -b 16 -t wav h:\Output\sox.wav
the channel order inside the sox.wav file is okay, when I call:
Code:
opusenc --bitrate 192 --comp 10 --framesize 20 --expect-loss 0 --max-delay 1000 h:\Output\sox.wav "H:\Output\test.opus"
the channel order of the test.opus file is okay, when I call:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -f sox - | sox --multi-threaded --ignore-length --temp "H:\Temp" --buffer 524288 -S -t sox - -t wav h:\Output\sox2.wav
the channel order of the sox2.wav file is okay, when I call:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -f sox - | sox --multi-threaded --ignore-length --temp "H:\Temp" --buffer 524288 -S -t sox - -t wav -b 16 - | opusenc --bitrate 192 --comp 10 --framesize 20 --expect-loss 0 --max-delay 1000 --ignorelength --raw-bits 16 --raw-rate 48000 --raw-chan 6 - "H:\Output\test.opus
the channel order is messed up.
Using:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -f sox - | sox --multi-threaded --ignore-length --temp "H:\Temp" --buffer
 524288 -S -t sox - -t raw -b 16 - | opusenc --bitrate 192 --comp 10 --framesize 20 --expect-loss 0 --max-delay 1000 --ignorelength --raw --raw-bits 16 --raw-rate 48000 --raw-chan 6 - "H:\Output\test.opus"
channels are still messed up, but in another way.

Checked LameXP, and from the look of it, LameXP avoids the problem by creating a temporal wav file.

Found a workaround by using flac as intermediate:
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -f sox - | sox --multi-threaded --ignore-length --temp "H:\Temp" --buffer 524288 -S -t sox - -t flac - | opusenc --bitrate 192 --comp 10 --framesize 20 --expect-loss 0 --max-delay 1000 --ignorelength - "H:\Output\test.opus"
alternatively if sox isn't used
Code:
ffmpeg -y -threads 8 -loglevel fatal -i "H:\Output\test.ac3" -ac 6 -ar 48000 -f flac - | opusenc --bitrate 192 --comp 10 --framesize 20 --expect-loss 0 --max-delay 1000 --ignorelength - "H:\Output\test.opus"
in both cases the channel order is correct.

Cu Selur
__________________
Hybrid here in the forum, homepage
Selur is offline   Reply With Quote