Re: [ecasound] how to upmix mono audio to stereo?

From: Jason Galyon <jgalyon@email-addr-hidden>
Date: Fri May 01 2009 - 02:57:13 EEST

Stuart Allie wrote:
> At some point you need to copy the data in channel 1 to channel 2 via
> the
> -chcopy:1,2 command (was -erc:1,2).
>
> Stuart
>
>
> -----Original Message-----
> From: Jason Galyon [mailto:jgalyon@email-addr-hidden]
> Sent: Friday, 1 May 2009 6:33 AM
> To: ecasound-list@email-addr-hidden
> Subject: Re: [ecasound] how to upmix mono audio to stereo?
>
> Jason Galyon wrote:
>
>> I have a need to take an audio file of variable format and channels
>>
> and
>
>> turn it into an AAC file with 16 bit, 44100 stereo.
>> However, when I give the command line below it is producing only sound
>> in the left channel. Some but not all of the input files are in fact
>> mono channel. It appears that ecasound is mixing everything down
>> instead of up... lowest common denominator?
>> I am doing something wrong but even with googling I am not finding
>>
> what
>
>> I need for this to work.
>> Details:
>> OSX 10.5
>> ecasound 2.6.0
>>
>> command line:
>> /opt/local/bin/ecasound -a:0 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,3.0,select,0,2.37714,/Users/jayson/testbed/timel
> ines/HVARun/9cbd35cc-04e8-43a4-b719-ce35dc8ca923.wav
>
>> -a:1 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,5.57714,select,0,0.901224,/Users/jayson/testbed/
> timelines/HVARun/71a474b4-9de4-4e29-806c-3dc056d16fcb.wav
>
>> -a:2 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,6.478364,select,0,0.973787,/Users/jayson/testbed
> /timelines/HVARun/81159bc5-d6af-4b45-86a9-0d9099fd8ea9.wav
>
>> -a:3 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,7.452151,select,0,1.66531,/Users/jayson/testbed/
> timelines/HVARun/20471550-a453-45f9-acdf-395885954e30.wav
>
>> -a:4 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,9.217461,select,0,4.13113,/Users/jayson/testbed/
> timelines/HVARun/a6e6065e-49d9-45ed-9189-a3b09f3451ad.wav
>
>> -a:5 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,13.448591,select,0,5.26512,/Users/jayson/testbed
> /timelines/HVARun/dc8f743b-fe43-4931-a51a-caa1c5f44c34.wav
>
>> -a:6 -f:s16_le,2,44100,interleaved
>>
>>
> -i:resample,auto,playat,18.813711,select,0,3.12308,/Users/jayson/testbed
> /timelines/HVARun/2cf71f75-4d64-46a1-80fd-f4657903b6a0.wav
>
>> -a:0,1,2,3,4,5,6 -o /Users/jayson/tmp/manual.aac
>>
>> Output:
>>
>>
> ************************************************************************
> ********
>
>> * ecasound v2.6.0 (C) 1997-2009 Kai Vehmanen and others
>>
>>
> ************************************************************************
> ********
>
>> [* Session created *]
>> [* Chainsetup created (cmdline) *]
>> [* Connecting chainsetup *]
>> (eca-chainsetup) 'nonrt' buffering mode selected.
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_le,1,44100
>
>> for object 'resample:playat (tried to open with -f:s16_le,2,44100).
>> (eca-chainsetup) Opening input "resample:playat", mode "read". Format:
>> s16_le, channels 1, srate 44100, interleaved (locked params).
>> (eca-chainsetup) NOTE: using existing audio parameters
>>
> -f:s16_be,2,44100
>
>> for object '/Users/jayson/tmp/manual.aac (tried to open with
>> -f:s16_le,2,44100).
>> (eca-chainsetup) Opening output "/Users/jayson/tmp/manual.aac", mode
>> "write". Format: s16_be, channels 2, srate 44100, interleaved (locked
>> params).
>> [* Chainsetup connected *]
>> (eca-control-objects) Connected chainsetup: "command-line-setup".
>> [* Controller/Starting batch processing *]
>> [* Engine - Driver start *]
>>
>> [* Engine - Processing finished *]
>> [* Controller/Batch processing finished (0) *]
>> (eca-control-objects) Disconnecting chainsetup: "command-line-setup".
>> [* Chainsetup disconnected *]
>>
>> Thank you for your help.
>>
>>
>>
> Note that I also tried with using the -x option... no difference.
> /opt/local/bin/ecasound -a:0 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,3.0,select,0,2.37714,/Users/jayson/testbed/timel
> ines/HVARun/9cbd35cc-04e8-43a4-b719-ce35dc8ca923.wav
> -a:1 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,5.57714,select,0,0.901224,/Users/jayson/testbed/
> timelines/HVARun/71a474b4-9de4-4e29-806c-3dc056d16fcb.wav
> -a:2 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,6.478364,select,0,0.973787,/Users/jayson/testbed
> /timelines/HVARun/81159bc5-d6af-4b45-86a9-0d9099fd8ea9.wav
> -a:3 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,7.452151,select,0,1.66531,/Users/jayson/testbed/
> timelines/HVARun/20471550-a453-45f9-acdf-395885954e30.wav
> -a:4 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,9.217461,select,0,4.13113,/Users/jayson/testbed/
> timelines/HVARun/a6e6065e-49d9-45ed-9189-a3b09f3451ad.wav
> -a:5 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,13.448591,select,0,5.26512,/Users/jayson/testbed
> /timelines/HVARun/dc8f743b-fe43-4931-a51a-caa1c5f44c34.wav
> -a:6 -x -f:s16_le,2,44100,interleaved
> -i:resample,auto,playat,18.813711,select,0,3.12308,/Users/jayson/testbed
> /timelines/HVARun/2cf71f75-4d64-46a1-80fd-f4657903b6a0.wav
> -a:0,1,2,3,4,5,6 -x -f:s16_le,2,44100,interleaved -o
> /Users/jayson/tmp/manual.aac
>
>
aha, ok... cool
However, does copy overwrite existing channel data? Since I don't know
until runtime what files will be mono or stereo, how can I do this?
(short of obvious extra analyzing steps in my logic to change the
command line)

Thank you VERY much, I wasn't sure if I needed to use this option for
the reason I stated above.

-- 
Jason Galyon
Silver Screen Tele-Reality, Inc. 
http://www.sister.tv | http://www.videocarlot.tv
Phone: 972-855-3500 |  Fax: 413-778-2146
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Ecasound-list mailing list
Ecasound-list@email-addr-hidden
https://lists.sourceforge.net/lists/listinfo/ecasound-list
Received on Fri May 1 04:15:02 2009

This archive was generated by hypermail 2.1.8 : Fri May 01 2009 - 04:15:02 EEST