Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

View Poll Results: Is this how-to useful to you ?
yes 38 88.37%
no 5 11.63%
Voters: 43. You may not vote on this poll

 
Thread Tools Display Modes
Old May 21st, 2006   #1
Sir_Yaro
A Carafe of Ubuntu
 
Sir_Yaro's Avatar
 
Join Date: Nov 2005
Location: Poland (Gdańsk)
Beans: 135
Kubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to Sir_Yaro
Lightbulb HOWTO create iPod Audiobook (m4b) from mp3

THIS SCRIPT IS IN BETA STAGE AND IS NOT SUPPORTED ANY MORE

Some of us have audiobooks splited to many files. Ex.:
chapter01.mp3, chapter02.mp3, chapter03.mp3[...]chapter61.mp3
This script will split them into a few batches, then join every batch into one big file and finally will create m4b files.

To do it just run script in directory with files. Make sure that files are properly named and only sound files are located in working directory...

Please try to remove all non-latin (including spaces) characters from file names.
I suggest names as simple as possible with subsequent number include
For example like that:
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3
but NEVER, EVER like that:
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3 [...] chapter131.mp3

If there is more than 99 files you MUST use 3 (or more) figures in a number otherwise script will join them in a wrong order!


## Changes:
## 1.0.2
## + Files split function added
##
## 1.0.3
## e mpg123 was changed to madplay due some errors
##
## 1.0.4
## + other types support
## r wavmerge required
## r mplayer required
## + automatic batches execution
## + output files are numbered
## + input files type detection
##
## 1.0.5
## + remove merged files
## + sort files
## f decode no-mp3 files
##
## 1.0.6
## + encode to mp3
## d lame
## d normalize-audio
## d imagemagick
## + waves normalization
## f minor bug fixes
## + apt-get deps instalation
## + cover arts generation for an iPod and roxbox
## + hints

Code:
Code was removed because it was too long
Check attachment
Just d/l archive and execute:
Code:
unzip encode-mp3-m4b-1.x.x.zip
chmod a+x encode
cp encode ~/bin
Attached Files
File Type: zip encode-mp3-m4b-1.0.5.zip (3.5 KB, 97 views)
File Type: zip encode-mp3-m4b-1.0.6.zip (4.6 KB, 1161 views)
__________________

Last edited by Sir_Yaro; October 19th, 2007 at 07:03 PM..
Sir_Yaro is offline   Reply With Quote
Old May 21st, 2006   #2
adamkane
100% Pure Ubuntu
 
adamkane's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Beans: 859
Send a message via MSN to adamkane Send a message via Yahoo to adamkane Send a message via Skype™ to adamkane
Re: HOWTO create ipod Audiobook (m4b) from mp3

Why choose m4b over mp3 or ogg?

Nice conversion script though.
adamkane is offline   Reply With Quote
Old May 21st, 2006   #3
Sir_Yaro
A Carafe of Ubuntu
 
Sir_Yaro's Avatar
 
Join Date: Nov 2005
Location: Poland (Gdańsk)
Beans: 135
Kubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to Sir_Yaro
Re: HOWTO create ipod Audiobook (m4b) from mp3

Quote:
Originally Posted by adamkane
Why choose m4b over mp3 or ogg?
Because m4b is ipod audiobook format?
Quote:
Nice conversion script though.
thx
__________________
Sir_Yaro is offline   Reply With Quote
Old May 21st, 2006   #4
adamkane
100% Pure Ubuntu
 
adamkane's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Beans: 859
Send a message via MSN to adamkane Send a message via Yahoo to adamkane Send a message via Skype™ to adamkane
Re: HOWTO create ipod Audiobook (m4b) from mp3

Does the ipod automatically put m4b files into the Audiobook directory?
adamkane is offline   Reply With Quote
Old May 21st, 2006   #5
Sir_Yaro
A Carafe of Ubuntu
 
Sir_Yaro's Avatar
 
Join Date: Nov 2005
Location: Poland (Gdańsk)
Beans: 135
Kubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to Sir_Yaro
Re: HOWTO create ipod Audiobook (m4b) from mp3

yes, it does.
and you can use speed settings with them
__________________
Sir_Yaro is offline   Reply With Quote
Old May 21st, 2006   #6
adamkane
100% Pure Ubuntu
 
adamkane's Avatar
 
Join Date: Mar 2006
Location: Toronto, Canada
Beans: 859
Send a message via MSN to adamkane Send a message via Yahoo to adamkane Send a message via Skype™ to adamkane
Re: HOWTO create ipod Audiobook (m4b) from mp3

Firefox -> Bookmarks -> Bookmark This Page...
adamkane is offline   Reply With Quote
Old May 22nd, 2006   #7
sinaen
Gee! These Aren't Roasted!
 
sinaen's Avatar
 
Join Date: Jun 2005
Location: in jokkmokk sweden
Beans: 157
Send a message via ICQ to sinaen Send a message via MSN to sinaen Send a message via Skype™ to sinaen
Re: HOWTO create ipod Audiobook (m4b) from mp3

Yeah Baby Yeah man ive searched for this **** thanks man

but how must the files be named so that it can convert them?

sinaen@Neko:/media/space/audiobooks/Terry Pratchett$ ./kodowanie-mp3-m4b DW09\ -\ Eric/
bash: ./kodowanie-mp3-m4b: /bin/bash: bad interpreter: Permission denied
sinaen@Neko:/media/space/audiobooks/Terry Pratchett$ sudo ./kodowanie-mp3-m4b DW09\ -\ Eric/
Password:
sudo: unable to execute ./kodowanie-mp3-m4b: Permission denied

ive tried to execute the script in the folder too

Later:
Ive tried a little more now. and it seems i must write /bin/bash <scriptname>
and then i get a error-message that i am missing faac. but i have the latest libfaac-codec installed 1.24 cleanubuntu is that correct?

Last edited by sinaen; May 22nd, 2006 at 05:41 AM..
sinaen is offline   Reply With Quote
Old May 22nd, 2006   #8
Sir_Yaro
A Carafe of Ubuntu
 
Sir_Yaro's Avatar
 
Join Date: Nov 2005
Location: Poland (Gdańsk)
Beans: 135
Kubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to Sir_Yaro
Re: HOWTO create ipod Audiobook (m4b) from mp3

To run any script you must chmod it.
chmod +x file_name
or run:
bash file_name

Quote:
but how must the files be named so that it can convert them?
Please try to remove all non-latin (including spaces) characters from file names.
I suggest name as simple as possible with subsequent number included
For example like that:
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3
but NEVER like that
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3 [...] chapter131.mp3

If there is more than 99 files you MUST use 3 (or more) figures in a number because otherwise script will join them in a wrong order!

faac might be found in faac*.deb package (faac_1.24clean-0ubuntu3_i386.deb)
http://packages.ubuntu.com/breezy/sound/faac

I've updated script to most recent version
__________________

Last edited by Sir_Yaro; May 24th, 2006 at 02:16 PM..
Sir_Yaro is offline   Reply With Quote
Old May 25th, 2006   #9
sinaen
Gee! These Aren't Roasted!
 
sinaen's Avatar
 
Join Date: Jun 2005
Location: in jokkmokk sweden
Beans: 157
Send a message via ICQ to sinaen Send a message via MSN to sinaen Send a message via Skype™ to sinaen
Re: HOWTO create ipod Audiobook (m4b) from mp3

Quote:
Originally Posted by Sir_Yaro
To run any script you must chmod it.
chmod +x file_name
or run:
bash file_name
yup its chmodded
Quote:
Originally Posted by Sir_Yaro

Please try to remove all non-latin (including spaces) characters from file names.
I suggest name as simple as possible with subsequent number included
For example like that:
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3
but NEVER like that
chapter01.mp3, chapter02.mp3 [...] chapter71.mp3 [...] chapter131.mp3

If there is more than 99 files you MUST use 3 (or more) figures in a number because otherwise script will join them in a wrong order!
then i got a lot to do. it is not fun. cause its multiple files for every cd. and not named chapters

Quote:
Originally Posted by Sir_Yaro
faac might be found in faac*.deb package (faac_1.24clean-0ubuntu3_i386.deb)
http://packages.ubuntu.com/breezy/sound/faac
well now i have faac but not

* wavmerge is missing....
Check on http://huli.org/wavbreaker/

Missing dependencies...
Can't continue.

going to check on huli.org/wavbreaker

Edit: now the script works as it should i am testing it how it does as i write this
Edit: ok another program thats missing madplay. but after i installed that. i dont know how to correct the error that the scrip made :/

as i can se it when i ls the dir its made the mp3s merge into 4 great mp3 in batch 1 2 3 4 5 folders
should i just move the files out to the original folder and try the script again?
Did so now it works, i really love that you made this script

Last edited by sinaen; May 25th, 2006 at 08:53 AM..
sinaen is offline   Reply With Quote
Old May 29th, 2006   #10
Sir_Yaro
A Carafe of Ubuntu
 
Sir_Yaro's Avatar
 
Join Date: Nov 2005
Location: Poland (Gdańsk)
Beans: 135
Kubuntu 9.04 Jaunty Jackalope
Send a message via ICQ to Sir_Yaro
Re: HOWTO create ipod Audiobook (m4b) from mp3

Quote:
Originally Posted by sinaen
then i got a lot to do. it is not fun. cause its multiple files for every cd. and not named chapters
i was only an example
i just know from an experience that simple names are usually better. It should work fine fine with almost any file file name but i can't guarantee that...

mostly is all about good files numbering ex:
if you have files:
1.mp3, 2.mp3, 10.mp3
look what ls returns:
Code:
[yaro][~/tmp/1]$ ls
razem 0
-rw-r--r--  1 yaro yaro 0 2006-05-29 20:25 10.mp3
-rw-r--r--  1 yaro yaro 0 2006-05-29 20:25 1.mp3
-rw-r--r--  1 yaro yaro 0 2006-05-29 20:25 2.mp3
[yaro][~/tmp/1]$
"10" is before "1". Story with files merge will be the same. Chapter "10" will be in a wrong place. thats why I draw attention on this.

btw I'm posting new version right now.
__________________

Last edited by Sir_Yaro; May 30th, 2006 at 12:46 PM..
Sir_Yaro is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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

Forum Jump


All times are GMT -4. The time now is 06:43 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry