H264 Encoding with Audio

From BATC Wiki
Jump to navigation Jump to search

Introduction

Software version 201810270 (not yet released) introduces the capability to add audio to H264 encoded video. This is achieved using a new version of avc2ts (written by F5OEO). This version has some limitations, but achieves much better picture quality at low SRs than the previous version.

Audio

The audio is encoded using an AAC encoder and takes up very little of the available bandwidth. In some modes there is an occasional (once every 10 minutes or so) 5 second burst of noise on the audio. The cause of this is as yet unknown.

Pi Camera Mode

This mode works well from 250 KS 7/8 FEC up to 4 MS. For lower symbol rates, the Audio should be switched off, which will switch in the older avc2ts encoder without audio.

Composite Video Input Mode

Animated Test card (TCAnim) Mode

The animated test card mode now transmits a smooth (not jerky) picture with bouncing balls. However, this is not displayed on the touchscreen (a static test card is displayed). It is not possible to encode H264 video with audio whilst also refreshing the picture on the Waveshare 3.5 inch display. If audio is switched off, the old H264 encoder is used and the animated test card is displayed.

There are some video drop-outs if TCAnim with audio is used above 2MS 7/8 FEC, or below 250 KS 7/8 FEC. At the lower SRs it is best to turn off the audio, which switches to the old H264 encoder.