Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Commandline question (Read 5551 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Commandline question

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.

Commandline question

Reply #1
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.
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

Commandline question

Reply #2
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.

Commandline question

Reply #3
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... 

Commandline question

Reply #4
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

Commandline question

Reply #5
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.

Commandline question

Reply #6
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

Commandline question

Reply #7
Code: [Select]
sox "test.wav" -t raw -s -w -c 1 - avg -l | oggenc2 -r -C 1 - -o "test1.ogg"

Code: [Select]
oggenc2 --downmix "test.wav" -o "test2.ogg"

Code: [Select]
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.

 

Commandline question

Reply #8
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!