From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BLR5fE002792 for ; Mon, 11 Jan 2010 16:27:05 -0500 Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.14]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0BLQxsf015321 for ; Mon, 11 Jan 2010 16:27:00 -0500 Received: from klarich.net (klarich.net [24.249.75.179]) by mx1.redhat.com (8.13.8/8.13.8) with SMTP id o0BLQh88029576 for ; Mon, 11 Jan 2010 16:26:44 -0500 Message-Id: <201001112126.o0BLQh88029576@mx1.redhat.com> Received: (qmail 4371 invoked by uid 1000); 11 Jan 2010 21:06:51 -0000 Received: from localhost (HELO klarich.net) (sendmail-bs@127.0.0.1) by localhost with SMTP; 11 Jan 2010 21:06:51 -0000 To: Linux for blind general discussion Subject: analyze a .wav or .mp3 file MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4368.1263244011.1@klarich.net> Date: Mon, 11 Jan 2010 15:06:51 -0600 From: Terry Klarich X-RedHat-NoId: 24.249.75.179 sent message with No ID X-RedHat-Spam-Score: 1.495 * (MSGID_FROM_MTA_HEADER) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.12 X-Scanned-By: MIMEDefang 2.67 on 10.5.110.14 X-loop: blinux-list@redhat.com X-BeenThere: blinux-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk Reply-To: Linux for blind general discussion List-Id: Linux for blind general discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jan 2010 21:27:05 -0000 Hello All: I would like to see if anyone has an idea how to analyze a wav or mp3 file in a shell script to see if there is any audio present; or, it is a blank file. The story: I have used a script for several years called xmonline to listen to xmradio over the internet. Actually, I mostly used it to record shows I wanted to listen to later. Since, the original script used mplayer to play the stream, I modified the script to write to a file on disk. It worked well and I could listen to those shows on xm I had to miss for one reason or another. (my own xm audio recorder. Recently, XM has changed their interface such that the xmonline script will no longer work. I originally thought I cold use firefox, and the analysis of the network trafic to write a new script. Using curl as the xmonline script did, I am able to get logged into the site. But, when I dig out the stream and try and play it with mplayer, it doesn't work. I know I'm missing some simple little cookie or authorization parameter. (Who knows) Basically, I have given up on the streaming approach for now. And, will use the brute force method. I have my xmradio hooked up via a sound card. I am able to listen to xm on my computer with aplay just fine. I even have a lirc config file that will turn and off the unit and change channels. Works great. My problem is I have no way of knowing if the unit is on or off. There is only a power toggle ir code. If there was a power-on, my problems would be over. To get around this problem, I will first record a 10 second clip and see if there is anything there or not. If there isn't, I know the unit is off. So, does anyone know a way to discover if there is any audio in a wav or mp3 file using a shell script running in the background? Any suggestions wellcome. THANKS! Terry P.S. If anyone wants my failed xmrip script, they are welcome to see what they can do with it.