• Welcome to OS2World OLD-STATIC-BACKUP Forum.
 

News:

This is an old OS2World backup forum for reference only. IT IS READ ONLY!!!

If you need help with OS/2 - eComStation visit http://www.os2world.com/forum

Main Menu

FLACs, OGGS and WAVs

Started by Ben, 2009.05.01, 02:12:07

Previous topic - Next topic

Ben

I'm wondering if anyone knows a way to convert FLACs and OGGs to WAV files.

I know MP3s can be done with several tools, but I haven't found any for the above.

Does anyone have any suggestions?

Thank-you.

David McKenna

  Navigate to the file you want to convert (using a WPS drives object), right click on it, then choose 'Convert', then choose the format you want. This requires the Flac and Ogg CoDecs are already installed (which they are if using eCS).

Dave McKenna

The Blue Warper

Hi, Ben!

FLACs:
Use flac-1.2.1 (which you can find on hobbes: http://hobbes2.nmsu.edu/download/pub/os2/dev/mm/flac-1.2.1.zip ).  In your case, you'd just need to run the following from the command line:
flac -d yourfile.flac
where -d means "decode" (You can also use --decode).  Default output is WAV, because FLAC is (basically) a lossless compressed Wave format.
The --ogg option specifies encoding or decoding of Ogg FLAC files (From the docs: «Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer»).

If you only needs to play FLAC files, then you can use this PM123 plugin:
http://hobbes2.nmsu.edu/download/pub/os2/apps/mmedia/sound/players/flacplay-1_2_1-10.zip




OGGs:
Ogg FLAC files: see above.

OGG files:
LAME.  Run:
lame --decode yourfile.ogg [--> output will default (at least as per documentation) to WAV].
Get LAME 3.98.2 from hobbes: http://hobbes2.nmsu.edu/download/pub/os2/dev/mm/lame-3.98.2.zip

Ogg Vorbis.
Use oggdec.exe from:
http://hobbes2.nmsu.edu/download/pub/os2/apps/mmedia/sound/convert/oggvorbis-1.0.1-os2.zip

SoX:
http://hobbes2.nmsu.edu/download/pub/os2/apps/mmedia/sound/convert/sox-12.18.2.zip

WAWE Editor ( http://hobbes.nmsu.edu/download/pub/os2/apps/mmedia/wawe_078.zip ):
Import your OGG file and export it to WAV (using WAWE's XWAV plugin).




You can also try MMAudio Pak and CW-Multimedia classes.  They install some Audio IO Procedures in MMOS2 (MP3, OGG Vorbis, FLAC) and you should be able to convert them to another OS/2 supported format.  From http://r6.ca/MMAudioPak/ :

Files can be converted to any audio format that OS/2 can write, by using "Convert to" in the context menu. CW-Multimedia classes enhance this feature.



Hopefully you'll find at least one utility suitable for your purposes...

Regards

Ben

Good lord.

I amazes me sometimes and despite constant years of use, that some aspects of OS/2 remain hidden in plain sight, their function never before needed and thus, obscured from view.

While these are add ons and not basic to the OS, they have been around a long time.

Thanks for wiping the speck off my glasses.


:D


Ben

Quote from: The Blue Warper on 2009.05.01, 04:06:56
Hi, Ben!

FLACs:
Use flac-1.2.1 (which you can find on hobbes: http://hobbes2.nmsu.edu/download/pub/os2/dev/mm/flac-1.2.1.zip ).  In your case, you'd just need to run the following from the command line:
flac -d yourfile.flac
where -d means "decode" (You can also use --decode).  Default output is WAV, because FLAC is (basically) a lossless compressed Wave format.
The --ogg option specifies encoding or decoding of Ogg FLAC files (From the docs: «Ogg FLAC streams are FLAC streams wrapped in an Ogg transport layer»).

If you only needs to play FLAC files, then you can use this PM123 plugin:
http://hobbes2.nmsu.edu/download/pub/os2/apps/mmedia/sound/players/flacplay-1_2_1-10.zip

Greetings, The Blue Warper

Thank you for the extensive reply.

However, the FLAC program wouldn't work for me, (I only tried it for decoding);

                  "SYS0002: The system cannot find the file specified. "FLAC""

Regardless of what parameter I added, it would always yield the same result.
It seems like there is a missing *.dll, but I can find no references to additional requirements in the
docs, readme or FAQ.

Perhaps I over looked it...

Some may be interested to know that the right click "Convert" does not work for all FLACs.



cyber

Hi Ben,

In  http://hobbes2.nmsu.edu/download/pub/os2/dev/mm/flac-1.2.1.zip You have in directory LIB files flac.dll and flac++.dll. Place `em where flac.exe reside, or somewhere in path.

Then should work.

From readme:
------------>8--------------------->8--------------------->8------------
FLAC is comprised of
  * `libFLAC', a library which implements reference encoders and
    decoders for native FLAC and Ogg FLAC, and a metadata interface
  * `libFLAC++', a C++ object wrapper library around libFLAC
  * `flac', a command-line program for encoding and decoding files
  * `metaflac', a command-line program for viewing and editing FLAC
    metadata
  * player plugins for XMMS and Winamp
  * user and API documentation
------------>8--------------------->8--------------------->8------------

David McKenna

Ben,

  >"Some may be interested to know that the right click "Convert" does not work for all FLACs."

  You should report that on the eCS bug tracker (give an example file).... maybe the flac decoder needs to be updated....

Dave McKenna

Ben

Quote from: cyber on 2009.05.13, 13:51:22
Hi Ben,

In  http://hobbes2.nmsu.edu/download/pub/os2/dev/mm/flac-1.2.1.zip You have in directory LIB files flac.dll and flac++.dll. Place `em where flac.exe reside, or somewhere in path.

Then should work.

From readme:
------------>8--------------------->8--------------------->8------------
FLAC is comprised of
  * `libFLAC', a library which implements reference encoders and
    decoders for native FLAC and Ogg FLAC, and a metadata interface
  * `libFLAC++', a C++ object wrapper library around libFLAC
  * `flac', a command-line program for encoding and decoding files
  * `metaflac', a command-line program for viewing and editing FLAC
    metadata
  * player plugins for XMMS and Winamp
  * user and API documentation
------------>8--------------------->8--------------------->8------------

Moving the *.dlls is far from clear in the readme...

I thank-you for clarifying it.

Ben

Quote from: David McKenna on 2009.05.13, 14:23:43
  You should report that on the eCS bug tracker (give an example file).... maybe the flac decoder needs to be updated....

Dave McKenna

I will if I can get the time, but since I'm in the middle of a major move, and life upheaval, that's unlikely.

But thanks for the suggestion.


Ben

Actually, the solution was a simple one...

The act of copying the new FLAC*.dlls into the path allowed for additional FLAC conversions.

No need of a bug report to Mensys... though I"ll send an E-mail if I can get the time.

cyber

Quote from: Ben on 2009.05.13, 17:03:19
Moving the *.dlls is far from clear in the readme...

Yes. You know, readme's should not be written by programers.

Quote from: Ben
I thank-you for clarifying it.

Cyber, superhero/2, always here to help.   8)

CDRWSel

You can use FFMPEG  (very easy)
It is ok for AC3, OGG, MP3 and wave   

RobertM

Indeed, as CDRWSel says, FFMPEG and mENCODER are both very easy to use... do not let the plethora of options discourage their use. Google'ing examples will lead to a bunch of easy to use examples for transcoding virtually anything to virtually anything.


|
|
Kirk's 5 Year Mission Continues at:
Star Trek New Voyages
|
|


Ben

Yes.

If I can ever get the time to do it, I will research this and whip up a bunch of *.cmd files for my more commonly used functions...

... however, due to time restrictions, I cannot see this happening soon... but it is on the list.

CDRWSel

#14
A few commans:
ffmpeg -i f:\ogg_tracks\track01.ogg -acodec libmp3lame -ac 2 -ar 22500 -ab 128k -vol 256 g:\var\temp\track01.mp3
-i is followed by the input file which can be ogg, mp3, wav...
in my sample g:\......track01.wav is the output audio track (ffmpeg uses correct coded according output track extension. Here it is MP3 but it could be OGG, WAV...
(as long it is a supported coded included during ffmpeg compilation) 
.
Now, a few optionnal parameters:
-ac 2 is for 2 channel audio (set to 1 for mono)
-ar resample to e.g. 44100 (44.1khz) which is CD-AUDIO required
-ab bitrate (higher is better quality by generaly, 192k for MP3 (is high quality and 128k is standard quality) while OGG can use less value for the same quality result. e.g. -ab 128k for OGG is near -ab 192k for MP3. This impacts final audio quality and of course track size.
-vol you can reduce or increase output volume level. e.g. -vol 200 ( note: 256 is 100% and don't use it if you don't know what to specify )
.
More samples:
ffmpeg -i f:\tracks\track01.ogg g:\var\temp\track01.wav
ffmpeg -i f:\tracks\track01.mp3 g:\var\temp\track01.wav
Better with respect of 44100 CD-Audio sampling:
ffmpeg -i f:\tracks\track01.ogg -ac 2 -ar 44100 -vol 256 g:\var\temp\track01.wav
and also other format like (just tested):
ffmpeg -i f:\tracks\track01.mp3 -acodec vorbis -ac 2 -ar 22500 -ab 128k g:\var\temp\track01.ogg
ffmpeg -i f:\tracks\track01.wav -acodec ac3 -ac 2 -ar 48000 -ab 192k g:\var\temp\track01.ac3
ffmpeg -i f:\tracks\track01.ogg -acodec libmp3lame -ac 2 -ar 44100 -ab 160k g:\var\temp\track01.mp3
ffmpeg -i f:\tracks\track01.ogg -acodec flac -ac 2 -ar 44100 -ab 256 g:\var\temp\track01.flac
ffmpeg -i f:\tracks\track01.flac -acodec libmp3lame -ac 2 -ar 44100 -ab 160k g:\var\temp\track01.mp3
ffmpeg -i f:\tracks\track01.wma -acodec libmp3lame -ac 2 -ar 44100 -ab 160k g:\var\temp\track01.mp3
ffmpeg -i f:\tracks\track01.ogg -acodec wmav2 -ac 2 -ar 44100 -ad 128k g:\var\temp\track01.wma
...
e.g. with free WMA:
  Duration: 00:04:18.11, start: 1.579000, bitrate: 126 kb/s
    Stream #0.0: Audio: wmav2, 44100 Hz, stereo, 128 kb/s
Output #0, mp3, to 'F:\TRACKS\TRACK99.MP3':
    Stream #0.0: Audio: libmp3lame, 44100 Hz, stereo, 160 kb/s
Stream mapping:
  Stream #0.0 -> #0.0
Press [q] to stop encoding
...
Cheers/2
RD