LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Convert wma to ogg (https://www.linuxquestions.org/questions/linux-software-2/convert-wma-to-ogg-226230/)

lixy 09-03-2004 01:21 PM

Convert wma to ogg
 
Hey,

Does anyone know some program that converts wma file into ogg format? I've been recently converted to linux and don't like the idea of keeping proprietary files on my HDD;

Thanks,

fsbooks 09-03-2004 01:49 PM

I use a two step process:

mplayer -ao pcm -o fileout.wav filein.wma
oggenc -o freeatlast.ogg fileout.wav

rwc_zippy 07-05-2006 01:24 PM

Quote:

Originally Posted by fsbooks
I use a two step process:

mplayer -ao pcm -o fileout.wav filein.wma
oggenc -o freeatlast.ogg fileout.wav

YAY! This helped out a ton!:)

but one addition, I recieved this when I ran that command

Code:

> MPlayer 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8 (C) 2000-2006 MPlayer Team
> CPU: Advanced Micro Devices Sempron/Athlon MP/XP/XP-M Barton,Thorton (Family: 6, Stepping: 0)
> CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
> Compiled with runtime CPU detection.
>
>
> Option -o has been renamed to -vo (video-out), use -vo.
> 91 audio & 204 video codecs

so simple change the command to:

Code:

mplayer -ao pcm -vo fileout.wav filein.wma
happy converting!

elsabio 03-03-2007 07:07 PM

Unfortunateley, life is not always so simple ...

mplayer -ao pcm -vo 1\ -\ Vespers\ Introit\ Hymn.wav 1\ -\ Vespers\ Introit\ Hymn.wma
MPlayer 1.0rc1-rpm.livna.org-4.1.1 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+ (Family: 15, Model: 35, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 1 - Vespers Introit Hymn.wma.
ASF file format detected.
Clip info:
name: Vespers (Introit & Hymn)
author: Philip Pickett
copyright: Linn Records
==========================================================================
Requested audio codec family [wma9dmo] (afm=dmo) not available.
Enable it at compilation.
Requested audio codec family [wmadmo] (afm=dmo) not available.
Enable it at compilation.
Cannot find codec for audio format 0x163.
Read DOCS/HTML/en/codecs.html!
Audio: no sound
Video: no video


Exiting... (End of file)

hobbes1069 12-11-2007 10:12 PM

Quote:

Originally Posted by rwc_zippy (Post 2321733)
YAY! This helped out a ton!:)

but one addition, I recieved this when I ran that command

Code:

> MPlayer 2:0.99+1.0pre7try2+cvs20060117-0ubuntu8 (C) 2000-2006 MPlayer Team
> CPU: Advanced Micro Devices Sempron/Athlon MP/XP/XP-M Barton,Thorton (Family: 6, Stepping: 0)
> CPUflags:  MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 0
> Compiled with runtime CPU detection.
>
>
> Option -o has been renamed to -vo (video-out), use -vo.
> 91 audio & 204 video codecs

so simple change the command to:

Code:

mplayer -ao pcm -vo fileout.wav filein.wma
happy converting!

I found this worked find for me (after reading the man page for mplayer):

Code:

mplayer -ao pcm:file=filename.wav filename.wma
It's probably possible to have it go to stdout and pipe it to stdin for oggenc and do it in one step but I only had 5 files to convert...

Richard

andrew.46 02-25-2008 10:22 PM

Hi,

I am a huge fan of mplayer but it is perhaps not the best tool for this job. Try:

Code:

$ ffmpeg -i sample.wma -acodec vorbis -aq 100 sample.ogg
I have just run a few samples through and it is blindingly fast and great sound quality.

Andrew

svante 03-29-2008 10:03 AM

I want to automate this for doing multiple files.
first I convert all spaces to _ in all subdirectories and files
Code:

find -depth -print0 | xargs -0 rename '1 while s: ([^/]*)$:_$1:'
then I run
Code:

for i in *.wma; do ffmpeg -i $i -acodec vorbis -aq 100 ${i%.wma}.ogg; done
to convert wma to ogg. but this does the job only for the current directory.
How do I modify it to run in all subdirectories?

hobbes1069 03-30-2008 07:47 AM

Quote:

Originally Posted by svante (Post 3104128)
I want to automate this for doing multiple files.
first I convert all spaces to _ in all subdirectories and files
Code:

find -depth -print0 | xargs -0 rename '1 while s: ([^/]*)$:_$1:'
then I run
Code:

for i in *.wma; do ffmpeg -i $i -acodec vorbis -aq 100 ${i%.wma}.ogg; done
to convert wma to ogg. but this does the job only for the current directory.
How do I modify it to run in all subdirectories?

I'm not a shell expert so I can't give you specifics, but I bet you could replace your "for i in *.wma" to use find instead of a standard *.wma glob.

Richard

freephile 06-25-2008 10:47 PM

one step, all files
 
From the current working directory, this finds all .wma files (including sub-directories) and converts them (without removing or overwriting the originals) to Ogg-Vorbis at 128KB bitrate
Code:

find -name '*wma' -exec ffmpeg -i {} -acodec vorbis -ab 128k {}.ogg \;

Mechfly 07-16-2008 03:48 PM

I just have to say that this was sweet. I was just wondering how to batch-op a whole bunch of wma's. thanks soo much.

btw, the file name when all is finished is xxx.wma.ogg , any hints on how to remove the 'wma' out of the final file name ?

:)

freephile 07-16-2008 05:52 PM

cut the .wma. from the file name
 
I could have eliminated the .wma with sed in the one-liner (sorry). But now that you have all these files with .wma. in it, you could use a convenient tool like the GUI krename [1] or the command-line 'rename' [2] to rename all files.

to test
Code:

rename --no-act --verbose 's/\.wma//' *\.wma\.ogg
to do
Code:

rename 's/\.wma//' *\.wma\.ogg

[1] http://www.krename.net/
[2] $ man rename

Mechfly 07-18-2008 12:10 AM

its like music to my ears.....
again thank you.
:)

freephile 07-18-2008 11:39 PM

Preserve ID3 tags in conversion from wma to ogg
 
I found that ffmpeg will not preserve your ID3 tags, which is a big problem for me since the orginal wma files were completely tagged.

Using Synaptic, I innstalled Sound Converter (soundconverter)[1]. This will give you a GUI to do conversions, with the added benefit that it uses a tag reader to preserve all tags -- except that it didn't preserve the tags. Sound Converter (and Amarok) read the tags from the .wma files just fine.

Check for more tools at http://linuxappfinder.com/multimedia/audiotageditors


install soundconverter using the command line
Code:

# update your local repository info
sudo apt-get update
# see if your repositories know about it
apt-cache search soundconverter
# install the app
sudo install soundconverter

[1] http://soundconverter.berlios.de/

1kyle 07-19-2008 12:45 AM

Why not convert to FLAC (free lossless codec). You can convert WMA to FLAC directly --even on Windows and if you are in Windows Winamp (free) can play FLAC files directly.

I Don't recommend converting to PCM first as a WAV file has a maximimum size of 4GB -- might seem large but if say you make a high quality recording this could be as little as 70 mins. Editing large WAV files is also a pain however FLAC editors do this much more easily.

Flac compresses nicely and is LOSSLESS. There are loads of converters around once you've got your file into FLAC so you can convert to whatever format you need.

FLAC is good for archiving your music and you can share the disk with Windows / other computers etc etc.

I agree that you don't want to store your music in ANY Proprietary form -- and under no circumstances do you want to add any DRM crud to your own music.

BTW most FLAC converters preserve ID3 tags etc etc so you won't lose titling or whatever even if you convert some files later again to mp3 for playing on a portable music device.

cheers

-K

tonya00henson 05-24-2010 02:28 AM

invitation
 
you can also visit this site to convert OGG file to any of the following MP3, AAC, FLAC, OGG, WMA, M4A and WAV.


All times are GMT -5. The time now is 07:27 AM.