jvcleave / ofxOMXPlayer

OpenMax accelerated video player for openFrameworks on the Raspberry Pi 0-3. Does not work with RPI4

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

5.1 audio passthrough support

YohannLYD opened this issue · comments

Hi,

Is there a trick to have the surround (5.1) audio working with ofxOMXPlayer ? It seems that the addon doesn't handle the loop file correctly when the audio track is not mono or stereo.

On the other hand, omxplayer can play 5.1 audio with no issue through hdmi by using the passthrough option: omxplayer -o hdmi -p video_loop_with_51_audio.mp4

When I use the "0.9.0-compatible" version of ofxOMXPlayer (5cdd03c), the audio is being downmixed and get laggy but the video is correctly played.
I basically get this error message :
[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length

When I use the latest commit (a295e72), the video and audio don't start at all and the error log is heavier (full log) :

[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length
[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 319.069
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): Opened video PASS
[ error ] Component::~Component(): 80 OMX_ErrorBadParameter
[ error ] OMX_ERRORTYPE Component::waitForCommand(OMX_COMMANDTYPE, OMX_U32, long int): OMX.broadcom.audio_render TIMEOUT
OMX_EventCmdComplete
OMX_CommandStateSet
2

[ error ] OMX_ERRORTYPE Component::setState(OMX_STATETYPE): 864 
[notice ] bool ofxOMXPlayerEngine::didReadFile(bool): didOpenMovie TOOK 10 MS
[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length
[ error ] Unexpected OMX_CONFIG_BRCMAUDIODOWNMIXCOEFFICIENTS::coeff length
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): duration SET: 319.069
[notice ] bool ofxOMXPlayerEngine::openPlayer(int): Opened video PASS
[ error ] OMX_ERRORTYPE Component::waitForCommand(OMX_COMMANDTYPE, OMX_U32, long int): OMX.broadcom.audio_render TIMEOUT
OMX_EventCmdComplete
OMX_CommandStateSet
2

[ error ] OMX_ERRORTYPE Component::setState(OMX_STATETYPE): 864 
[ error ] bool OMXAudioPlayer::decode(OMXPacket*): AUDIO ERROR 214 omxStreamInfo: width: 0
height: 0
profile: -99
numFrames: 0
duration: 0
channels: 6
samplerate: 48000
blockalign: 0
bitrate: 317375
bitspersample: 16
framesize: 0
fpsscale: 0
fpsrate: 0
aspect: 0
level: 0
ptsinvalid: 0
identifier: 0
extrasize: 2
gop_size: 12
fps: 0

[ error ] virtual void ofxOMXPlayerEngine::process(): audio player error.
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT
[ error ] bool BaseVideoDecoder::decode(uint8_t*, int, double): Decode timeout
[ error ] OMX_BUFFERHEADERTYPE* Component::getInputBuffer(long int): OMX.broadcom.video_decode TIMEOUT

I think the solution would be to do an audio passthrough so the audio signal is sent so the decoder (ie. home cinema amplifier) manages the decoding by itself.
Has anyone got a suggestion/tweak for this issue ?

Thanks