How to fix video export failing with “Failed: Video/audio codec”?

This error message is caused by failure to initialise the hardware codecs for video export. Usually the problem is that the source video files, or combination of main and picture-in-picture video files, are not supported by your device.

Examples of situations where you might get this error:

– You have recorded high resolution videos with your action camera, and try to export them using a low end or mid-tier phone. Even some high end phones may fail, if you try to export a video with picture-in-picture with very high resolution sources.

– Samsung S6 using 2.7K or 4.0K main video with 1080p PIP video. It will work if both main and PIP videos are only 1080p.

– Samsung Tab 3 10.1 using 1080p video source. The device has only 720p camera so the export will fail for anything more than that. You’ll need to use 720p video source.

-Source video files that have been re-encoded on PC. The current phone hardware support h.264 for video (also h.265 on high end phones), and AAC for audio. Make sure your re-encoding software produces video files with these codecs. The container format needs to be .mp4 (also .mov works on iOS).

To fix the issue you should try the following:

– Record future videos with lower resolution

– Only on Android: Uncheck the “Use hardware acceleration” checkbox from the export screen. This will make the export slower, and you’ll loose the picture-in-picture option, but it will work regardless of the source video resolution.

– Downscale your high-resolution source videos to lower resolution. You can do this with ffmpeg command line tool for example:
ffmpeg -i SOURCE.MP4 -vf scale=1920:1080 -c:v libx264 -crf 14 -preset veryslow -c:a copy DOWNSCALED.MP4
This will downscale your video to 1080p. Edit the line for any other resolution you need. The DOWNSCALED.MP4 is filename of the downscaled video. Use original filenames and copy them to your phone, and always keep the original video for future use.