kiall / android-tvheadend

Android + TV Headend + TV Input Framework
Apache License 2.0
194 stars 62 forks source link

AAC-LATM audio support #118

Closed kiall closed 7 years ago

kiall commented 7 years ago

I've had a report via email about Philips + Shield TVs failing to handle AAC-LATM audio tracks correctly.

When these tracks are present, the video will freeze / pixelate etc, once filtered from TVHeadend, the video will play fine - without audio.

kiall commented 7 years ago

So - Looking at ExoPlayer's ffmpeg extension, which we currently use, AAC-LATM audio is already supported:

  /**
   * Returns the name of the FFmpeg decoder that could be used to decode {@code mimeType}.
   */
  /* package */ static String getCodecName(String mimeType) {
    switch (mimeType) {
      case MimeTypes.AUDIO_AAC:
        return "aac";

where MimeTypes.AUDIO_AAC is:

public static final String AUDIO_AAC = BASE_TYPE_AUDIO + "/mp4a-latm";

and a sample LATM stream I have shows:

EventLogger:   Renderer:1 [
EventLogger:     Group:0, adaptive_supported=N/A [
EventLogger:       [X] Track:0, id=2, mimeType=audio/mp4a-latm, containerMimeType=null, channels=1, sample_rate=11025, language=eng, supported=YES
EventLogger:     ]
EventLogger:   ]
EventLogger: ]
kiall commented 7 years ago

Will need a sample stream that shows the issue, or even logs from the EventLogger to see what if anything is happening + needs to be done..

kiall commented 7 years ago

I've been informed this now works, closing it out.