Compiling Cross Platform. Windows/OS X issues

Since my last post couple of posts, I have been working on a few things at the same time.

  1. GTK+ (not a priority)
    As a GUI is not high on the list of requirements, I have decided to strip this out for simplicity. The UI I had built thus far was simplistic but also didn't look right on OS X.
  2. Cross Platform
    This is one of my requirements (again not as important), but I think it is something I should be working on throughout development. So far I have been able to get his working on Windows, Linux and OS X (with one slight audio glitch).
  3. Audio Problem
    Transocding a video on Linux works perfectly.
    For Windows or OS X the audio is distorted.
  4. Modifying motion vectors.
    I am currently working on the basis of embedding information in motion vectors.

So, whilst I research exactly how to go about embedding data in motion vectors I am tackling other issues.

GTK+ (now removed) and cross platform compilation are now sorted.

My most interesting issue is the audio, there appears to be a heavy amount of distortion or interference. I have two theories:

  1. This could be similar to my video frames issue where the direct result from the decoder contains some kind of "noise" which causes problems when directly re-encoding. I solved this issue for the picture by copying the frame data only to a new frame and encoding the new frame. I might have to do something like this with the audio frame, or run it through a filter.
  2. Alternatively, a library might be missing that the Linux version has. I have noticed that the Linux setup has fdk-aac (another audio encoded - it has libfaac-dev and fdk-aac).

I am hoping the solution to my audio issue is a simple solution so I can focus on data embedding. I will commit some time to this problem, but if it seems like this is going to take too long I will cut my losses and stick with Linux for now.

Final Remarks

I had some problems setting up FFmpeg to work on Windows. Most notable was that codecs were not found. Here is how I solved the issue

  1. Install libx264

  2. git clone git://git.videolan.org/x264.git

  3. cd x264

  4. ./configure --enable-static --enable-shared

  5. make

  6. make install

  7. Install faac

  8. ./configure --prefix=/c/mingw --without-mp4v2

  9. make clean && make && make install-strip

  10. Compile with the following (amongst other things has libx264 and faac enabled).

  11. ./configure --enable-static --enable-libx264 --enable-pthreads --enable-gpl --disable-doc --enable-libfaac --enable-nonfree