Previous topicNext topic

Advanced Export Settings for Audio

Suggestions for new features for Magic.
Post Reply
TEHK
Posts: 56
Joined: Mon Mar 12, 2018 9:04 pm

Advanced Export Settings for Audio

Post by TEHK »

I can see from ffprobe that the audio in an exported Magic video comes out in this format:

Stream #0:0(und): Audio: aac (LC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 189 kb/s (default)

But, I record a lot of my stuff in 48khz or 96khz and either 16 or 24 bit. What this means is that Magic is downsampling and dithering the audio using some algorithm: triangle, rectangular, shaped noise, other, or none.

So, I'd like to see more advanced options for the audio encoder in the export dialog. Would be nice to be able to choosing some ffmpeg parameters like "-c:a libfdk_aac -vbr 4" and even set bit depth and sampling frequency too! :)
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Advanced Export Settings for Audio

Post by Magic »

48k is supported; your sound card has to be set to 48k for it to work.

The built-in mp4 encoders in Windows and OS X don't support audio above 48k.

Eventually we will have better export options, but we have to be careful with utilities like ffmpeg because encoder licensing is an issue. A lot of ffmpeg's supported encoders aren't technically legal.
TEHK
Posts: 56
Joined: Mon Mar 12, 2018 9:04 pm

Re: Advanced Export Settings for Audio

Post by TEHK »

Actually, I let Magic do the export on a remote desktop Mac Pro (in my closet) that has no audio gear (or monitor) hooked up. I'll look into whether I can up the sampling frequency on that machine for now. Thanks for the info.

Also, as far as ffmpeg is concerned... you could just let macOS users do something like this from the command line to pull in all the good ffmpeg stuff so you don't have to package codecs like fdk-aac in Magic itself:

brew install ffmpeg --with-fdk-aac --with-tools --with-freetype --with-libass --with-libvorbis --with-libvpx --with-opus --with-webp

/usr/local/bin/ffmpeg with all the bells and whistles and Magic could sidestep the licensing demons :)

Of course, another alternative is to overwrite the audio stream in the exported video with my raw wav file into the codec of my choice.... hmmm! Got me thinking! ffmpeg is awesome!
Magic
Site Admin
Posts: 3440
Joined: Wed Apr 09, 2014 9:28 pm

Re: Advanced Export Settings for Audio

Post by Magic »

Unfortunately a custom ffmpeg build wouldn't work, because the one that ships with Magic is modified slightly. Overwriting it would remove some functionality. Don't worry though, we will still try to come up with some improved export options. ;)

But yes, you could definitely use ffmpeg to remove the audio from the video file and add/encode your own audio back into the file.
Post Reply