Closed vipulpurohit closed 6 years ago
I don't think the approach you describe will ever work, because S/PDIF can only carry two channels of uncompressed audio. To get AC-3 over S/PDIF I think you need it to still be compressed, in which case you don't need a decoder (and therefore you don't need FFmpeg) on the device.
It's unclear to me whether the device and/or Android supports compressed audio output over S/PDIF (it is supported via HDMI). You should probably try and answer this question more generally.
Thanks for this detailed response. Now I'm clear that we need to send compressed AC-3 over S/PDIF and need to remove ffmpeg extension. Inbuilt player and some other player like MX Player are able to play 5.1 channel on same device with same media, so does it mean the device support audio output over S/PDIF?
Is there any way I can find if my device support S/PDIF audio output using exoplayer or any other method?
@andrewlewis - Would we need to implement [Internal ref: 30828716] to support this type of output? And if so is there a corresponding GitHub issue?
I think so. #1741 tracks the same thing, so I'll mark this as a duplicate.
Issue description
Hello, I need to play video with AC-3 audio. My device does not have AC-3 decoder so I used FFMPEG extension with ExoPlayer to enable AC-3 audio. Device is connected with audio system via S/PDIF. Now the issue is I can hear the sound but instead of 5.1 channel it comes as stereo output. I tried other player such as Kodi, MXPlayer etc and they are able to play with 5.1 channel output. I've been gone through various other issues:
2700
2148
1741
722
2832
But no luck. Can you please help where is the issue and how can I enable 5.1 channel output.
Reproduction steps
Just play video provided below in exo player sample application with 5.1 channel speaker. Video will produce sound for specific channel with channel name and that speaker should only produce sound at that time.
Link to test content
Dolby Sound Test
Version of ExoPlayer being used
ExoPlayer r2.5.4
Device(s) and version(s) of Android being used
Device: HiMedia Q10 Pro Hi3798CV200
Android versions: 5.1 Lollipop API 22 7.0 Nougat API 24
A full bug report captured from the device
bugreport-HMD-2.0.4-2017-11-03-19-29-12.zip