Results 1 to 11 of 11
  1. #1
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Opening, playing, and extracting information from Mpeg4 Files. Please help!

    So I'm writing a visualizer program for music and have done most of the graphics/etc work, now I just need, well, the main component haha. I need to know how to open an mpeg4 file in java, play it through the speakers (default audio output), and extract information from the file. The first two parts I don't think sound too difficult, the last part however might. The information I need to get from the mpeg4 file is the frequency of the audio (preferably taking it as an array or something similar). For that I need someone well versed with mpeg4 files, so if anyone knows someone who can help with that, please let me know! As for the first two, any help I can get would be fantastic!!

  2. #2
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Quote Originally Posted by Dale View Post
    I need to know how to open an mpeg4 file in java, play it through the speakers (default audio output)...
    I think that this link might be helpful:

    JavaFX Media

    Pay attention to this part of that link: Playing audio with MediaPlayer

  3. #3
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Quote Originally Posted by cselic View Post
    I think that this link might be helpful:

    JavaFX Media

    Pay attention to this part of that link: Playing audio with MediaPlayer
    Thank you, but I don't have JavaFX and from what I'm reading about it isn't it a web application developer for java?

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,086
    Rep Power
    20

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Nope, it's Swings successor.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Quote Originally Posted by Tolls View Post
    Nope, it's Swings successor.
    Ok, so I'm attempting to instal JavaFX (though the plugin for eclipse is giving me trouble). Anyone have a lead on how to get information from mpeg4 files?

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,086
    Rep Power
    20

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Googling around and you want the AAC part, which I believe is defined here:
    ISO/IEC 14496-3:2001(E) part-3 subpart 1

    It should all be in the header somewhere.

    Now there might be a Java package that'll do this, indeed the JavaFX media player might provide access to that data. I'd have a look through the API and see what you can do with it.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  7. #7
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Quote Originally Posted by Tolls View Post
    Googling around and you want the AAC part, which I believe is defined here:
    ISO/IEC 14496-3:2001(E) part-3 subpart 1

    It should all be in the header somewhere.

    Now there might be a Java package that'll do this, indeed the JavaFX media player might provide access to that data. I'd have a look through the API and see what you can do with it.
    Would you be willing to search for that package for me? If not could you tell me how to go about doing so? Thank you so much btw for all the help!!

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,086
    Rep Power
    20

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    The 2.0 API is here.
    You'll probably want the javafx.scene.media package.

    Looking at it, though, there doesn't seem to be an obvious way to get at header information for the source.

    I'm afraid I can't do more than that,
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Alright, I'll see what I can do from there. Thank you again for the help!

  10. #10
    cselic is offline Senior Member
    Join Date
    Apr 2010
    Location
    Belgrade, Serbia
    Posts
    278
    Rep Power
    5

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Quote Originally Posted by Dale View Post
    Ok, so I'm attempting to instal JavaFX (though the plugin for eclipse is giving me trouble). Anyone have a lead on how to get information from mpeg4 files?
    Watch this 10min long video and you'll get it how to install JavaFX etc.
    Getting started JavaFX2.1 with Eclipse IDE on Windows

  11. #11
    Dale is offline Member
    Join Date
    Jul 2012
    Posts
    6
    Rep Power
    0

    Default Re: Opening, playing, and extracting information from Mpeg4 Files. Please help!

    Thank you, that walkthrough was far better than the other one I was following. Installed without a kink! Wonderfully helpful site this is :D

Similar Threads

  1. playing wav files
    By treeface99 in forum New To Java
    Replies: 12
    Last Post: 02-07-2012, 12:12 PM
  2. Help please, Playing with folders and files.
    By paulio2 in forum New To Java
    Replies: 38
    Last Post: 11-17-2011, 02:16 PM
  3. Playing mp3 files in Ubuntu
    By granadajose in forum Advanced Java
    Replies: 2
    Last Post: 09-07-2011, 08:26 PM
  4. Replies: 4
    Last Post: 02-26-2010, 03:18 AM
  5. Extracting embedded files
    By kasturi in forum New To Java
    Replies: 0
    Last Post: 02-07-2008, 12:25 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •