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.
- 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.
- 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).
- Audio Problem
Transocding a video on Linux works perfectly.
For Windows or OS X the audio is distorted.
- 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:
- 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.
- 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.
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
git clone git://git.videolan.org/x264.git
./configure --enable-static --enable-shared
./configure --prefix=/c/mingw --without-mp4v2
make clean && make && make install-strip
Compile with the following (amongst other things has libx264 and faac enabled).
./configure --enable-static --enable-libx264 --enable-pthreads --enable-gpl --disable-doc --enable-libfaac --enable-nonfree