djfun / audio-visualizer-python

a little GUI tool to render visualization videos of audio files
Other
242 stars 58 forks source link

Encoding settings compatibility updates #4

Closed rikai closed 8 years ago

rikai commented 8 years ago

This patch is meant to improve compatibility with hardware players as well as YouTube by using AAC, yuv420p & an mp4 container.

With these settings, output works on every device i've been able to test it on, and also fixes compatibility with Quicktime for macs(which only supports YUV planar color space with 4:2:0 chroma subsampling).

Note: This does add the requirement of ffmpeg to be built with --enable-libfdk-aac (as well as --enable-nonfree if using --enable-gpl). The reason for this is that the libfdk_aac encoder produces much better quality audio than the other AAC encoders included in ffmpeg by default and is the recommended encoder as per documentation here and here.

djfun commented 8 years ago

If we want to use libfdk_aac we need to either provide a fallback or let the user decide in the GUI which encoder to use, because the precompiled ffmpeg in Ubuntu (and presumably other linux distributions as well) doesn't have libfdk support.

rikai commented 8 years ago

I imagine exposing a lot more in the GUI is actually probably a good idea.

Being able to specify the frame size, fps, audio and video codecs and bitrates, format & more makes sense and honestly probably shouldn't be hardcoded at all and I've opened issue #7 for that.

In the context of this PR though, I think falling back to the bundled aac when libfdk_aac is not available should suffice for the moment until such changes are implemented. (libfaac should be avoided, as it is significantly worse than the other two.

I'm honestly not very experienced with Python and PyQt, so I'm not quite sure how such a fallback would be implemented, though.

djfun commented 8 years ago

5fd95ee242722b3bcf5d78b7755cb10aa9dca512 should help to fall back to aac if libfdk_aac is not present.