Sponsored Content
Top Forums Shell Programming and Scripting Help with 'batch conversion using lame' shell script Post 302410766 by Kingzy on Tuesday 6th of April 2010 08:44:14 PM
Old 04-06-2010
Question Help with 'batch conversion using lame' shell script

Hi.

I am trying to write an sh script that will:

1. take each wav file in ~/Documents
2. convert each into mp3 format using "lame" encoder
3. save the new mp3 in ~/Documents/newmp3s.

It has to follow the 3 steps in this order for each wav file before taking the next file.

I tried a for loop taken from another forum, but not only does the script still saves the new mp3 files in ~/Documents but the loop also doesn't end.

Any help would be much appreciated. Right now I'm using Audacity for manual conversion Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

batch command in a shell script

How do I execute a batch command from a script, which "waits" with the next command until the first one has finished? ======= A piece of my script looks like this: #!/bin/sh (...) # run a long batch job: ./run_calculation.sh # then rename resulting file: mv output.dat backup.dat (...) ... (7 Replies)
Discussion started by: ivvo
7 Replies

2. Shell Programming and Scripting

Change the Windows Batch script to UNIX shell script.

Hi, When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script... Script: REM :: File Name : Refresh_OTL.bat REM :: Parameters : %1 - Region REM :: : %2 - Cube Type REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies

3. Shell Programming and Scripting

Executing a batch of files within a shell script with option to refire the individual files in batch

Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below. I am on a solaris server btw. Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose. ... (2 Replies)
Discussion started by: goddevil
2 Replies

4. Shell Programming and Scripting

Dos batch script to execute unix shell script

Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh. Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies

5. Shell Programming and Scripting

Conversion batch shell script

while converting batch file to shell script ...dis command is ther i dunno how to change...can anyone knws how to change into shell script rm !(D:\temp\XX.txt) (3 Replies)
Discussion started by: monisha
3 Replies

6. Shell Programming and Scripting

Need to run the batch script from shell scripting

Hi All, I am working on shell scripting.My script is completed but I have one task that is to trigger the batch script(with or without parameter) from my shell scripting(reside on linux system) and output which is geneareted by the batch should e.g. if batch script creates any files then I want... (5 Replies)
Discussion started by: anuragpgtgerman
5 Replies

7. Shell Programming and Scripting

Batch to bash conversion

Hi, I am just trying to convert the batch script to bash script and i am stuck at one point where I have the below code for /f "delims=" %%a in (a.txt) do ( for /f "tokens=1,2,3* delims==" %%i in ("%%a") do ( for /f "tokens=1,2,3* delims= " %%x in ("%%i") do ( if... (4 Replies)
Discussion started by: prasanna2166
4 Replies

8. Shell Programming and Scripting

Shell script from batch file

Hi, I am a junior dba and started carrier very new. I have a batch file to create some script of db creation. I want that batch file to convert in .sh file so that I can directly run that in the AIX box to generate those files. Please help me with the code for AIX. Batch file is here: ... (2 Replies)
Discussion started by: dba_aix
2 Replies

9. Shell Programming and Scripting

Batch script to execute shell script in UNIX server

Hi team, My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server. I have completed the first part i.e From windows to using to unix server with the help of psftp.exe code: psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies

10. Shell Programming and Scripting

Batch to shell script conversion

Hi All, I have a small tool which is currently configured in batch scripts only. But my need is to run it on Linux platform, so I have been trying to convert a batch script to shell script. below is the batch script: @echo off IF "%1"== "" GOTO ARGERR REM UPDATE THESE PROPERTIES TO... (2 Replies)
Discussion started by: sukhdip
2 Replies
GStreamer(1)						      General Commands Manual						      GStreamer(1)

NAME
gst-launch - build and run a GStreamer pipeline SYNOPSIS
gst-launch [OPTION...] PIPELINE-DESCRIPTION DESCRIPTION
gst-launch is a tool that builds and runs basic GStreamer pipelines. In simple form, a PIPELINE-DESCRIPTION is a list of elements separated by exclamation marks (!). Options may be appended to elements, in the form "option=value". A group of elements surrounded by curly braces {, } will be executed in a separate thread. Connections between non-consecutive elements are created by specifying a element names and pad names immediately before and after the exclamation mark, in the form "element0.sinkpad!element1.srcpad". The default name given to an element is the name of its class followed by an index. If the element names are omitted, the previous and next elements in the PIPELINE-DESCRIPTION will be used. If the pad names are omitted, a default pad of the correct type (source or sink) is found on the given element, typically named "src" or "sink". See the GStreamer documentation for a complete description of a a PIPELINE-DESCRIPTION. EXAMPLES
The examples below assume that you have the correct plug-ins available. In general, "osssink" can be substituted with another audio output plug-in such as "esdsink", "alsasink", or "artsdsink". Likewise, "xvideosink" can be substituted with "sdlvideosink" or "aasink". Audio playback Play the mp3 music file "music.mp3" using a libmad-based plug-in and output to an OSS device: gst-launch filesrc location=music.mp3 ! mad ! osssink Play an Ogg Vorbis format file: gst-launch filesrc location=music.ogg ! vorbisfile ! osssink Play an mp3 file or stream retrieved via http: gst-launch httpsrc location=http://domain.com/music.mp3 ! mad ! osssink Play an mp3 file or stream using GNOME-VFS: gst-launch gnomevfssrc location=music.mp3 ! mad ! osssink gst-launch gnomevfssrc location=http://domain.com/music.mp3 ! mad ! osssink Use GNOME-VFS to play an mp3 file located on an SMB server: gst-launch gnomevfssrc location=smb://computer/music.mp3 ! mad ! osssink Format conversion Convert an mp3 music file to an Ogg Vorbis file: gst-launch filesrc location=music.mp3 ! mad ! vorbisenc ! filesink location=music.ogg Alternatively, to convert to the FLAC format, use the command line: gst-launch filesrc location=claptrap.mp3 ! mad ! flacenc ! filesink location=test.flac Other Plays a .WAV file: gst-launch filesrc location=music.wav ! wavparse ! osssink Convert a .WAV file into Ogg Vorbis (or mp3) file: gst-launch filesrc location=music.wav ! wavparse ! vorbisenc ! filesink location=music.ogg gst-launch filesrc location=music.wav ! wavparse ! mpegaudio ! filesink location=music.mp3 Alternatively, if you have lame installed (and have the lame plug-in), you can substitute lame for mpegaudio in the previous example. It gives better results than mpegaudio. Rip all tracks from compact disc and convert them into a single mp3 file: gst-launch cdparanoia ! mpegaudio ! filesink location=cd.mp3 Using gst-inspect, it is possible to discover settings for cdparanoia that will tell it to rip individual tracks. Record sound from your audio input and encode it into an ogg file: gst-launch osssrc ! vorbisenc ! filesink location=input.ogg Video Display only the video portion of an MPEG-1 video file, outputting to an X display window (The "queue" element is necessary to buffer data between the threads): gst-launch filesrc location=JB_FF9_TheGravityOfLove.mpg ! mpegdemux video_%02d!src { queue ! mpeg2dec ! xvideosink } Display the video portion of a .vob file (used on DVDs), outputting to an SDL window: gst-launch filesrc location=/flflfj.vob ! mpegdemux video_%02d!src { queue ! mpeg2dec ! sdlvideosink } Play both video and audio portions of an MPEG movie: gst-launch filesrc location=movie.mpg ! mpegdemux video_%02d!src { queue ! mpeg2dec ! sdlvideosink } mpegdemux0.audio_%02d!src { queue ! mad ! osssink } Play an AVI movie: gst-launch filesrc location=movie.avi ! avidemux video_%02d!src { queue ! windec ! sdlvideosink } Network streaming An MPEG-1 system stream can be streamed via RTP from one machine to another. On the receiver, execute: gst-launch rtprecv media_type=mpeg1_sys ! mpegdemux video_%02d!src { queue ! mpeg2dec ! xvideosink } mpegdemux0.audio_%02d!src { queue ! mad ! osssink } On the transmitter, execute: gst-launch filesrc location=mpeg1system.mpeg ! mpegparse ! rtpsend ip=IPorHostname Diagnostic Generate a null stream and ignore it: gst-launch fakesrc ! fakesink Generate a pure tone to test the audio output: gst-launch sinesrc ! osssink Generate a familiar test pattern to test the video output: gst-launch videotestsrc ! xvideosink OPTIONS
gst-launch accepts the following options: --help Print help synopsis and available FLAGS --silent Do not output status information --exclude=TYPE, -XTYPE Do not output status information of TYPE --output=FILE, -oFILE Save XML representation of pipeline to FILE and exit --gst-info-mask=FLAGS GStreamer info flags to set (list with --help) --gst-debug-mask=FLAGS GStreamer debugging flags to set (list with --help) --gst-mask=FLAGS GStreamer info and debugging flags to set (list with --help) --gst-plugin-spew GStreamer info flags to set Enable printout of errors while loading GStreamer plugins --gst-plugin-path=PATH Add directories separated with ':' to the plugin search path SEE ALSO
gst-complete(1), gst-register(1), gst-inspect(1) AUTHOR
The GStreamer team at http://gstreamer.net/ March 2001 GStreamer(1)
All times are GMT -4. The time now is 04:31 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy