Terminal Terminology

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help

Terminal Terminology

Postby Reavus on Sun Aug 16, 2009 4:58 am

Hey guys,

Does anyone know what the the gnome mplayer is called in terminal? I type in "mplayer" or "gmplayer" and I get the video player but I am only after the audio application. I'm trying to write a bash script to convert *.m4a into *.wav.

Also, is there a good site or resource I can use to learn terminal and all its commands and how programs are refered to in terminal? A lot of programs on linux seem to rely on typing in command lines and i'm new to linux so its not yet my cup of tea but I'm learning.

Thanks for your help!
Reavus
Level 1
Level 1
 
Posts: 34
Joined: Mon Aug 10, 2009 9:22 am

Linux Mint is funded by ads and donations.
 

Re: Terminal Terminology

Postby moodywoody on Sun Aug 16, 2009 6:32 am

It's called totem .
moodywoody
Level 2
Level 2
 
Posts: 70
Joined: Fri Aug 07, 2009 5:27 am

Re: Terminal Terminology

Postby emorrp1 on Sun Aug 16, 2009 8:15 am

do you mean mencoder? If you ever have problems with a terminal command, the man pages are a very useful reference:
Code: Select all
man mplayer


woodywoody: totem is another media player
If you have a question that has been answered and solved, then please edit your original post and put a [SOLVED] at the end of your subject header
Hint - use a google search including the search term site:forums.linuxmint.com
emorrp1
Level 8
Level 8
 
Posts: 2322
Joined: Thu Feb 26, 2009 8:58 pm

Re: Terminal Terminology

Postby moodywoody on Sun Aug 16, 2009 10:38 am

emorrp1 wrote:woodywoody: totem is another media player


Wasn't really sure which one he meant.

Anyhow .. if you have the program in the menu, here's how to find out the command:

Right click on menu > choose Edit Menu > navigate to desired program > Click Properties > look under Command > Profit
moodywoody
Level 2
Level 2
 
Posts: 70
Joined: Fri Aug 07, 2009 5:27 am

Re: Terminal Terminology

Postby Reavus on Sun Aug 16, 2009 11:17 am

Sounds good!

But I've recently tried installing faad and lame to convert a m4a to wav then lame to encode the wav to mp3 and I cant seem to get the code to work. Ive googled different codes and I keep getting errors. Heres some of the code:

Code: Select all
#!/bin/bash

for i in *.m4a; do
   echo "Converting: ${i%.m4a}.mp3"
   faad -o - "$i" | lame - "${i%.m4a}.mp3"
done


And this is the error I get:

Code: Select all
Air.m4a file info:
RAW

Error: Channel coupling not yet implemented
Warning: unsupported audio format


What's the deal? I thought faad supported .m4a files?
Reavus
Level 1
Level 1
 
Posts: 34
Joined: Mon Aug 10, 2009 9:22 am

Re: Terminal Terminology

Postby Kaye on Sun Aug 16, 2009 12:16 pm

Well, you don't really need to pipe the output of faad to lame. It would be easier to say something along the lines of
Code: Select all
faad "${i}"
lame -V2 "${i%.*}.wav" "${i%.*}.mp3"

That is completely untested by the way, it's just a structure that should work. For example, you'd need to trim out spaces and rename files etc.
Last edited by Kaye on Sun Aug 16, 2009 12:39 pm, edited 2 times in total.
"In somnis veritas"
Antivirus or defragging?
Image
User avatar
Kaye
Level 5
Level 5
 
Posts: 942
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College

Re: Terminal Terminology

Postby Reavus on Sun Aug 16, 2009 12:33 pm

Sorry, I'm afraid you are gonna have to clarify that code for me, I'll tell you know, I don't really understand this programming language so I can't really troubleshoot this myself.
Reavus
Level 1
Level 1
 
Posts: 34
Joined: Mon Aug 10, 2009 9:22 am

Re: Terminal Terminology

Postby Kaye on Sun Aug 16, 2009 12:39 pm

No problem. After going this far I figured I might as well just finish what I started. Here is a bash script for .m4a to .mp3 conversion. Just cd to the directory with the .m4a in them and run the script :)
Code: Select all
#!/bin/bash
#Author: Kaye

#Rename and convert files
for i in *.m4a; do
   hasSpaces=`echo "$i" | grep -i ' '`
   if [ -n "$hasSpaces" ]
   then
      echo Renaming $i
      i=mv "$i" `echo $i | tr ' ' '_'`;
   fi
   echo Converting $i
   echo `faad "$i"`
   echo `lame -V2 "${i%.*}.wav" "${i%.*}.mp3"`
done

#Clean up .m4a
for i in *.m4a; do
   rm $i
done

#Clean up .wav
for i in *.wav; do
   rm $i
done


Edit: Small improvement. It'll now remove the .m4a and .wav files for you after converting them to .mp3. If you want to keep the .wav or .m4a, just comment out the for loops at the bottom.
"In somnis veritas"
Antivirus or defragging?
Image
User avatar
Kaye
Level 5
Level 5
 
Posts: 942
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College

Re: Terminal Terminology

Postby Reavus on Mon Aug 17, 2009 10:14 am

Thanks for that Code Kaye, that was good. It turns out that I was doing something wrong with the file extensions. Apparently faad doesn't recognise .m4a files so I tried something else and changed the file extension to .aac and it worked! They are the same type of file it seems... im so noob :lol:
Reavus
Level 1
Level 1
 
Posts: 34
Joined: Mon Aug 10, 2009 9:22 am

Re: Terminal Terminology

Postby Kaye on Mon Aug 17, 2009 10:24 am

Reavus wrote:Thanks for that Code Kaye, that was good. It turns out that I was doing something wrong with the file extensions. Apparently faad doesn't recognise .m4a files so I tried something else and changed the file extension to .aac and it worked! They are the same type of file it seems... im so noob :lol:

That's odd, faad should recognize m4a. It does for me. Well, either way, as long as it works that's all that matters :D
"In somnis veritas"
Antivirus or defragging?
Image
User avatar
Kaye
Level 5
Level 5
 
Posts: 942
Joined: Fri Feb 06, 2009 5:05 pm
Location: Boston College

Linux Mint is funded by ads and donations.
 

Return to Newbie Questions

Who is online

Users browsing this forum: Bing [Bot], Google Adsense [Bot], paul.y91 and 32 guests