Terminal Terminology

Quick to answer questions about finding your way around Linux Mint as a new user.
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. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Reavus

Terminal Terminology

Post by Reavus »

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!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
moodywoody

Re: Terminal Terminology

Post by moodywoody »

It's called totem .
emorrp1

Re: Terminal Terminology

Post by emorrp1 »

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
moodywoody

Re: Terminal Terminology

Post by moodywoody »

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
Reavus

Re: Terminal Terminology

Post by Reavus »

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?
Kaye

Re: Terminal Terminology

Post by Kaye »

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.
Reavus

Re: Terminal Terminology

Post by Reavus »

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.
Kaye

Re: Terminal Terminology

Post by Kaye »

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.
Reavus

Re: Terminal Terminology

Post by Reavus »

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:
Kaye

Re: Terminal Terminology

Post by Kaye »

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
Locked

Return to “Beginner Questions”