LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-24-2005, 03:13 PM   #1
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Rep: Reputation: 15
mp3 to ogg help


I can turn an mp3 into an ogg by using oggre plugin for xmms, but for some reason I can't copy the id3 tag info over. is there anything similar to oggre plugin or a seperate aplication I can use to convert my mp3's into oggs and keep the tags so I know what album/artist a song came from

thanks
 
Old 09-24-2005, 04:56 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Grip can probably do it. Start Grip, click on the Config tab, then id3 tab, and select 'Add id3 tags to encoded files'.

Be careful to go through each tab and set up grip to use source mp3 and target ogg. Grip won't give an error message if the source and target filetypes aren't set up correctly (unless the version I've upgraded to has fixed that - haven't used it yet). It will seem to make an ogg, but when you try to play it, nothing happens. Set up the filetypes for source and target, and it works just fine.

You may need to increase the buffer size, and decrease write speed to get skip-free results.
 
Old 09-24-2005, 06:47 PM   #3
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Original Poster
Rep: Reputation: 15
Question confused

Isn't grip for CD's? I don't see any choices for changing from CD to MP3 for input source
 
Old 09-24-2005, 06:58 PM   #4
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
Re: mp3 to ogg help

Quote:
Originally posted by bunnyknight13
I can turn an mp3 into an ogg by using oggre plugin for xmms, but for some reason I can't copy the id3 tag info over. is there anything similar to oggre plugin or a seperate aplication I can use to convert my mp3's into oggs and keep the tags so I know what album/artist a song came from

thanks
I use easytag to rename the .mp3 files with all the information in the song name then once you have converted to .ogg then I again use easytag to take the information from the file name and put it back into the tags. Works great takes an extra minute to do both steps this of course assumes that the mp3 files are sanely tagged if not then you can use it to search the web for the proper tags then have it automatically enter the information for you.
 
Old 09-24-2005, 07:44 PM   #5
bunnyknight13
Member
 
Registered: Aug 2004
Location: Virginia
Distribution: Lunar Linux
Posts: 57

Original Poster
Rep: Reputation: 15
Smile Thanks

I bow to your superiority, and may the source be with us all
 
Old 09-25-2005, 02:21 AM   #6
heema
Senior Member
 
Registered: Sep 2003
Location: Egypt
Distribution: Arch
Posts: 1,528

Rep: Reputation: 47
i made a scripts before that will convert mp3s to ogg while retaining the id3 tags

dependencies : mp3info , mpg123 , vorbis-tools

Code:
#/bin/sh
#
# converts mp3 to ogg


function mp3-ogg () {

if [ ! -f "$1" ]; then

  echo "File "$1" not found!"

else

  mp3info -p "title%t\nartist%a\nalbum%l\nbitrate%r\n" "$1" > tag.txt
  
  title=$(cat tag.txt | grep title | cut -c 6-50)
  artist=$(cat tag.txt | grep artist | cut -c 7-50)
  album=$(cat tag.txt | grep album | cut -c 6-50)
  bitrate=$(cat tag.txt | grep bitrate | cut -c 8-50)

  if [ "$bitrate" -ge 256 ];then
	quality=8
  elif [ "$bitrate" -ge 192 ];then
	quality=7
  elif [ "$bitrate" -ge 128 ];then
	quality=6
  else
	quality=5
  fi

  wav=`echo "$1"|sed -e 's/.[mM][pP]3/.wav/'`
  notag=`echo "$1"|sed -e 's/.[mM][pP]3/.ogg/'`
  mpg123 --wav "$wav" "$1" &&
  oggenc -q $quality -t "$title" -a "$artist" -l "$album" -o "$notag" "$wav"
  rm tag.txt
  rm -f "$wav" ||
  echo "There was a problem with the conversion process!"

fi

}



# convert all mp3 files in directory

if [ $# -eq 1 -a -d "$1" ]; then

for file in $1/*.[mM][pP]3; do
	mp3-ogg "$file"
done
exit

fi

# One or more mp3 files were given

for file in $*; do

  mp3-ogg "$file"

done

# Not enough information

if [ $# -lt 1 ]; then

  echo
  echo "Usage:	$0 myfile.mp3"
  echo "	$0 /directory/containing/mp3/files"
  echo "	$0 myfile.mp3 myfile2.mp3 myfile3.mp3"
  # You have to use quotations for the arguement below.
  # Failure to do so will result in only one file being
  # converted. Namely, the first one it comes across...
  echo '	$0 "*.mp3"'
  echo
  echo "For converting .mp3's that have spaces in the"
  echo 'name, use the directory option OR "*.mp3"'
  echo
  exit

fi

exit
make a file and name it to mp3-ogg.sh and paste the above code in it
then make the script executable by typing : chmod +x mp3-ogg.sh

and if you want , you could make a link for it (or put it) in /usr/bin so that you could execute it from anywhere

Last edited by heema; 09-25-2005 at 02:26 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MP3-OGG Converter Talyz Linux - Software 7 10-27-2005 12:18 PM
mp3-2-ogg JStew Linux - General 10 10-27-2005 08:55 AM
ogg to mp3 minm Linux - Software 4 08-19-2004 07:00 AM
mp3 to ogg gbj General 2 11-09-2003 03:48 PM
mp3 to ogg avadhootak Linux - Software 3 10-22-2003 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:06 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration