Thread: MPEG 4 decoder

  1. #1
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195

    MPEG 4 decoder

    anyone know of a good stable mpeg4 decoder, preferably one thats open source and will work with Win32?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    mplayer decodes most MPEG4 codecs, is open-source and only ever crashes on incomplete movie files for me.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  3. #3
    Math wizard
    Join Date
    Dec 2006
    Location
    USA
    Posts
    582
    XviD - I use it for processing my videos and it's very good quality. This 2 1/2-minute video of a stunt I did in a game is compressed using the XviD codec (using a quality setting of 10). It's 428x300 resolution, 29.97 fps, and just under 7 MB in size. This is the codec and it's also open source.

  4. #4
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Thanks, looks like Xvid might fit the bill. I gotta decode a raw mpeg4 stream in my app, cuz taking snapshots is just too low of a frame rate.

  5. #5
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Xvid is a specific codec. It can't decode all MPEG4 streams.

    libavifile is your best bet, I think.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  6. #6
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    well, I really just need to decode MJPEG to a series of jpg or bitmap images. Nothing fancy and Id prefer not having to fix someone elses code, like libavifile and Xvid both require.

  7. #7
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Neither library requires that you "fix" anything. Where'd you get that idea?
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  8. #8
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Got that idea from the Xvid sources, which failed to compile with 6 errors and 11 warnings. Looks like they are doign some funny business trying to recast __int64's as doubles. I put in a workaroud for a few of them, ill get to the others later. The big issue is that since the errors are in a loop, my workaround ( which involves CopyMemory) will probably slow it down some. Not entirely sure why VC++ wont recast -

    Code:
    unsigned __int64 blah;
    double foo;
    
    foo = (double)blah;
    generates an error saying there is no type conversion from unsigned __int64 to double, try using signed

  9. #9
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Maybe
    foo = (double) ( (signed __int64)blah );
    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.

  10. #10
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    yeah it still complains about that

  11. #11
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by abachler View Post
    yeah it still complains about that
    This is because the Visual compiler is dumb and broken. I've seen it before. Just force it to signed. You say it still complains? Post the exact code.

  12. #12
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    And exact error messages.
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Splitting MPEG Videos - API
    By ginoitalo in forum Tech Board
    Replies: 1
    Last Post: 03-13-2006, 05:05 PM
  2. MP3 Decoder
    By Pete in forum Projects and Job Recruitment
    Replies: 4
    Last Post: 05-02-2005, 08:35 AM
  3. ASCII Art Decoder and Encoder
    By jessweetd in forum C Programming
    Replies: 7
    Last Post: 09-05-2004, 07:12 PM
  4. Need RSA encoder / decoder / keygen
    By Rak'kar in forum Networking/Device Communication
    Replies: 4
    Last Post: 07-20-2004, 09:40 PM
  5. MPEG - Issues (Codec, Copyright etc.)
    By Davros in forum A Brief History of Cprogramming.com
    Replies: 9
    Last Post: 12-18-2002, 07:22 AM