Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Welcome to the Rockbox Technical Forums!

+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  How do I batch convert mp3 or wav files to OPUS?
« previous next »
  • Print
Pages: [1]

Author Topic: How do I batch convert mp3 or wav files to OPUS?  (Read 7605 times)

Offline IDK5

  • Member
  • *
  • Posts: 13
How do I batch convert mp3 or wav files to OPUS?
« on: October 14, 2012, 08:41:58 PM »
I have a bunch of audio books that I would like to convert over to OPUS from MP3 but right now i have to type in "opusenc --vbr --bitrate 8 input.wav output.opus" which works fine but I have over 50,000 of these cause they are split by the chapter and I have to type that in every time for every file, so I am asking how I could convert them all in one go or even per folder.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #1 on: October 14, 2012, 08:49:31 PM »
Use a program like foobar or dbpoweramp to convert them.
Logged

Offline IDK5

  • Member
  • *
  • Posts: 13
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #2 on: October 14, 2012, 08:51:01 PM »
I forgot to mention i am using openSUSE do they run on linux?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #3 on: October 15, 2012, 12:47:59 AM »
Check google.
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #4 on: October 15, 2012, 04:40:56 AM »
Code: [Select]
for i in *.wav; do opusenc --vbr --bitrate 8 "$i" "$(basename "$i".wav)".opus; done

Or use any other scripting language -- your question pretty much gives the answer. To batch convert files either use a tool that can do it or write a small batch script in any scripting language you like.

Edit: forgot the done part.
« Last Edit: October 15, 2012, 07:01:43 AM by bluebrother »
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline IDK5

  • Member
  • *
  • Posts: 13
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #5 on: October 15, 2012, 10:37:36 AM »
Quote
Code: [Select]
for i in *.wav; do opusenc --vbr --bitrate 8 "$i" "$(basename "$i".wav)".opus; done

Thanks, too bad it is only using one thread. Is there anyway to have use more then the one?
Logged

Offline bluebrother

  • Developer
  • Member
  • *
  • Posts: 3421
  • creature
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #6 on: October 15, 2012, 03:19:50 PM »
Start it multiple times on different set of files? Just use different wildcards for each invocation (or use different folders, or ...). With a bit of additional things you can make that line also do the mp3 decoding etc.
Logged
Rockbox Utility development binaries (updated infrequently) · How to ask questions the smart way · We do not estimate timeframes.

Offline IDK5

  • Member
  • *
  • Posts: 13
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #7 on: October 15, 2012, 06:37:38 PM »
Quote from: bluebrother on October 15, 2012, 03:19:50 PM
Start it multiple times on different set of files? Just use different wildcards for each invocation (or use different folders, or ...). With a bit of additional things you can make that line also do the mp3 decoding etc.

I started multiple ones, i am trying to figure out the mp3 decoding part so i don't have code them over to wav first that wast a lot of time. I am thinking about using ffmpeg.

EDIT: how would i have it go straight to encoding to opus from the mp3 to wav decode? or can i?

i have this right now but i don't know bash really well so it doesn't work but hopefully you know what i am trying to get done by reading it.

Code: [Select]
for m in *.mp3;do ffmpeg -i "$m" "$w"; opusenc --vbr --bitrate 15 "$w" "$(basename "$m")".opus;#rm -v *.mp3; done
« Last Edit: October 17, 2012, 01:42:05 PM by IDK5 »
Logged

Offline soap

  • Member
  • *
  • Posts: 1678
  • Creature of habit.
Re: How do I batch convert mp3 or wav files to OPUS?
« Reply #8 on: October 21, 2012, 11:44:26 AM »
You do realize that by converting from MP3 to OPUS you are decreasing audio quality? 
Logged
Rockbox Forum Guidelines
The Rockbox Manual
How to Ask Questions the Smart Way

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Rockbox General
| |-+  Rockbox General Discussion
| | |-+  How do I batch convert mp3 or wav files to OPUS?
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.086 seconds with 15 queries.