Converting from wma to mp3

This is a discussion on Converting from wma to mp3 within the C Programming forums, part of the General Programming Boards category; Hello all, i would like to write a program that converts from wma to mp3 in C. I know it ...

  1. #1
    Registered User
    Join Date
    Jun 2012
    Posts
    4

    Converting from wma to mp3

    Hello all,

    i would like to write a program that converts from wma to mp3 in C. I know it is easy to do it with a script but i would like to do it with C. I would like to know which libs i might need(if any), and what man pages i should read. I have a little experience with C(some exercises from the K&R book) but any kind of info is appreciated.

    I would like to make it work under OpenBSD and Arch Linux.

    Any suggestions from where to start?
    Last edited by yaku; 06-24-2012 at 06:23 PM.

  2. #2
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,500
    > I know it is easy to do it with a script but i would like to do it with C
    You mean like this?
    Henry's Blog: Converting wma to mp3

    What do you think programs like 'mplayer' and 'lame' are written in?
    Almost certainly, you can get the source code if they're available on Linux.
    Almost certainly, they're written in either C or C++.

    The rest is just a study exercise on your part to extract the relevant parts of the source code to just accomplish a single task.

    And is this you distributing your assignments on different forums?
    Retrieve info from wav files - Dev Shed
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  3. #3
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,669
    wow... I'm surprised you have wmas on purpose. I think the last time I saw wma files was when I had a really cheap mp3 player that synched using media player. Media player converted my nice mp3s to wmas before transfers, despite that the device could of course use mp3. And that is the reason I don't use media player anymore. I turned the "feature" off but in principle it was ridiculous.

    If that is the problem just do it again with the feature off.

  4. #4
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by Salem View Post
    > I know it is easy to do it with a script but i would like to do it with C
    You mean like this?
    Henry's Blog: Converting wma to mp3

    What do you think programs like 'mplayer' and 'lame' are written in?
    Almost certainly, you can get the source code if they're available on Linux.
    Almost certainly, they're written in either C or C++.

    The rest is just a study exercise on your part to extract the relevant parts of the source code to just accomplish a single task.

    And is this you distributing your assignments on different forums?
    Retrieve info from wav files - Dev Shed

    If you must know then yes that's me. After posting to this forum, i joined a C related irc channel and was adviced not to start with wma and that i would just stick with reading info from wav files because it would be easier. Since there was no answer yet on this thread , i also posted on dev shed to increase the possibilities to earn a helpful answer but this time posting a thread according to th e advice.

  5. #5
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by whiteflags View Post
    wow... I'm surprised you have wmas on purpose. I think the last time I saw wma files was when I had a really cheap mp3 player that synched using media player. Media player converted my nice mp3s to wmas before transfers, despite that the device could of course use mp3. And that is the reason I don't use media player anymore. I turned the "feature" off but in principle it was ridiculous.

    If that is the problem just do it again with the feature off.
    I don't have wmas on purpose but that doesn't change the fact that it would be interesting/helpful for learning how to do it even if don't use them. I'll make it just in case i need it.

    I don't see how this could be surprising.
    Last edited by yaku; 06-25-2012 at 11:21 AM.

  6. #6
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,500
    "Hey, I've just made a paper airplane, tell me all about jet engines".
    Somehow, I get the feeling you're just a few weeks past the "hello world" stage and you're looking for something to do.

    > Any suggestions from where to start?
    How about a plan of learning involving some steps to your goal.

    For example, begin with a much less ambitious project which does "interesting things" to a mp3 file, to get you really familiar with it.
    Say
    - swap left and right channels
    - extract a segment
    - clip the volume
    etc etc

    Sure, we could just post a bunch of links to "xxx file format" (where xxx is wav,mp3 or whatever else floats your boat).
    But where would your effort be in all of this?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  7. #7
    Master Apprentice phantomotap's Avatar
    Join Date
    Jan 2008
    Posts
    4,231
    But where would your effort be in all of this?
    >_<

    Well these posts for help don't write themselves!

    Soma

  8. #8
    Registered User
    Join Date
    Jun 2012
    Posts
    4
    Quote Originally Posted by Salem View Post
    "Hey, I've just made a paper airplane, tell me all about jet engines".
    Somehow, I get the feeling you're just a few weeks past the "hello world" stage and you're looking for something to do.

    > Any suggestions from where to start?
    How about a plan of learning involving some steps to your goal.

    For example, begin with a much less ambitious project which does "interesting things" to a mp3 file, to get you really familiar with it.
    Say
    - swap left and right channels
    - extract a segment
    - clip the volume
    etc etc

    Sure, we could just post a bunch of links to "xxx file format" (where xxx is wav,mp3 or whatever else floats your boat).
    But where would your effort be in all of this?
    Yes, i'm looking for something interesting than just solving exercises. It's not bad solving exercises but i would like to do certain things like what i mentioned before.(which is an exrecise after all :P)

    You are making some suggestions, though can you tell me where i can find info about what you mentioned?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Help converting!!!
    By giggleboo in forum C++ Programming
    Replies: 2
    Last Post: 12-15-2010, 06:35 AM
  2. Converting from YUV 420 P to 24-bit RGB
    By chris24300 in forum C Programming
    Replies: 6
    Last Post: 08-14-2008, 09:03 AM
  3. Converting C to C++
    By cdn_bacon in forum C++ Programming
    Replies: 20
    Last Post: 03-24-2007, 01:53 PM
  4. Converting exe to DLL
    By jamez05 in forum Windows Programming
    Replies: 0
    Last Post: 10-11-2005, 12:17 PM
  5. Converting .exe to .cpp or .c
    By OmnipotentCow in forum C Programming
    Replies: 10
    Last Post: 06-19-2003, 12:52 PM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21