Commandline question, Using just one channel of a stereo source? |
![]() ![]() |
Commandline question, Using just one channel of a stereo source? |
Jun 11 2007, 20:04
Post
#1
|
|
|
Group: Members Posts: 14 Joined: 6-December 05 Member No.: 26249 |
Is there a way to encode from WAV/FLAC/etc. to OGG using only the left or right channel of the stereo signal? I might be wrong, but I believe the mono command collapses both channels into mono... The reason I'm asking is because I have several CD's sourced from mono LP's that were transferred in stereo. I might be lazy, but it's a bit annoying having to edit the files in Adobe Audition or similar before encoding.
|
|
|
|
Jun 11 2007, 21:05
Post
#2
|
|
![]() A/V Moderator Group: Moderator Posts: 1666 Joined: 30-April 02 From: Slovenia Member No.: 1922 |
you could use command line sox and write a batch using commands like;
sox "input.wav" -c 1 "input.a2.wav" avg -r or sox "input.wav" -c 1 "input.a1.wav" avg -l --------------- http://sox.sourceforge.net/ p.s. i have a script writen that splits input stereo wav to two files, but it is writen for total commander and it is pretty ugly..., let me know and i will post it. This post has been edited by smok3: Jun 11 2007, 21:07 -------------------- PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung |
|
|
|
Jun 11 2007, 21:55
Post
#3
|
|
|
Group: Members Posts: 2036 Joined: 31-August 05 Member No.: 24222 |
For your own enlightenment, you might like to try a little exercise in audition.
Create a new stereo file. You could choose mono if you don't believe you have enough understanding of what will happen and thus don't trust what you observe when starting with stereo. Select one channel (of this currently zero length file). Generate a tone of 3 seconds, 10 seconds, 59 minutes, whatever makes you feel secure. You could also generate any flavor of noise, or paste in something from elsewhere. Select and copy the filled channel. Select the empty channel. Paste the contents into it. If you started with mono in the first step, you must now first create an empty stereo file and paste the clipboard contents into both channels. Now you should be certain that you have a true dual mono file. Run Analyze/Statistics on it and copy the results to notepad or some other convenient holder. Select Transform/Amplify/Channel Mixer. Select the LR to Mid-Side preset. Run it. This will combine the two channels into a mono result in the left channel and put the differences into the right channel. Observe that the right channel it totally blank, digital zero. Run Analyze/Statistics. Observe that all the left channels numbers are identical to your original file's results. Click on undo to restore the dual mono condition. Select Edit/Convert Sample Type. Select mono; make sure the other parameters match your file so no changes are made to sample rate and bit depth. Click on OK to convert to mono. Run Analyze/Statistics. Observe that all the numbers are identical to your original file's results. Conclusion. There is nothing to be gained by first editing in Audition -- unless the LAME process is defective. The end result will be the same as if you started with a mono file, without going through extra steps. |
|
|
|
Jun 12 2007, 14:06
Post
#4
|
|
|
Group: Members Posts: 14 Joined: 6-December 05 Member No.: 26249 |
Thanks for the help, smok3.
And, er, thanks AndyH-ha. Maybe we're misunderstanding each other, but I didn't really understand the "exercise"... Would you care to elaborate on that? you could use command line sox and write a batch using commands like; sox "input.wav" -c 1 "input.a2.wav" avg -r or sox "input.wav" -c 1 "input.a1.wav" avg -l By the way, does this mean I still have to go through two steps during encoding (convert the original WAV file, save it, then encode to OGG)? I'm not familiar with SoX and generally just use oggdropXP/aoTuV b5... |
|
|
|
Jun 12 2007, 15:29
Post
#5
|
|
![]() A/V Moderator Group: Moderator Posts: 1666 Joined: 30-April 02 From: Slovenia Member No.: 1922 |
QUOTE does this mean I still have to go through two steps during encoding (convert the original WAV file, save it, then encode to OGG)? yes, unless there is a way to pipe the sox output directly to oggenc.
-------------------- PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung |
|
|
|
Jun 12 2007, 15:48
Post
#6
|
|
|
Group: Members Posts: 346 Joined: 21-August 02 Member No.: 3138 |
Is there a way to encode from WAV/FLAC/etc. to OGG using only the left or right channel of the stereo signal? I might be wrong, but I believe the mono command collapses both channels into mono... The reason I'm asking is because I have several CD's sourced from mono LP's that were transferred in stereo. I might be lazy, but it's a bit annoying having to edit the files in Adobe Audition or similar before encoding. I'm not understanding. If the original source was mono, you should be able to use left, right, or combined. No difference. Just tell OGG to create a mono file. Maybe I missed something.... I'm not as astute as I once was. -------------------- [url=http://www.domain.com]Click here![/url]
|
|
|
|
Jun 12 2007, 16:08
Post
#7
|
|
![]() A/V Moderator Group: Moderator Posts: 1666 Joined: 30-April 02 From: Slovenia Member No.: 1922 |
p.s. and yes AndyH-ha & woody_woodward are right.
-------------------- PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung |
|
|
|
Jun 12 2007, 16:22
Post
#8
|
|
![]() Group: Super Moderator Posts: 4887 Joined: 12-August 04 From: Exeter, UK Member No.: 16217 |
CODE sox "test.wav" -t raw -s -w -c 1 - avg -l | oggenc2 -r -C 1 - -o "test1.ogg" CODE oggenc2 --downmix "test.wav" -o "test2.ogg" CODE Comparing:
"C:\Documents and Settings\Neil\Desktop\test1.ogg" "C:\Documents and Settings\Neil\Desktop\test2.ogg" No differences in decoded data found. -------------------- I'm on a horse.
|
|
|
|
Jun 12 2007, 23:16
Post
#9
|
|
|
Group: Members Posts: 14 Joined: 6-December 05 Member No.: 26249 |
Maybe I was a bit vague as to WHY I only wanted to use either the left or right channel, as opposed to combine both.
I always transfer mono LP's using my regular stereo set-up. That way I can pick the best-sounding channel (left or right) later on during editing/downsampling/etc.. As you might know, the record stylus will wear out the grooves a little by each play. This is especially true with second hand vinyl, as the previous owner might have played the records with an incorrect tone arm alignment or perhaps even a bad stylus. Er, well... I'm straying from the point here, but... Anyway, once again, thanks for your help! |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 21st May 2013 - 06:32 |