blackshard83
Posts: 67
Joined: Fri Jan 10, 2014 8:31 am

Shared state bug in audio_render when output is HDMI

Fri Jan 27, 2017 12:49 pm

Hello,

I'm trying to run multiple omxplayer instances but I noticed a problem that only happens when output is set to "omx:hdmi" that probably relates to some shared state in omx components or firmware.

The following commands starts two omxplayer instances with two video side by side, you should run each command in a separate shell:

Code: Select all

omxplayer --video_fifo 8.0 --video_queue 1.0 --audio_fifo 1.0 --audio_queue 0.2 --stats -o hdmi --win 0,0,640,360 video_test1.mp4

Code: Select all

omxplayer --video_fifo 8.0 --video_queue 1.0 --audio_fifo 1.0 --audio_queue 0.2 --stats -o hdmi --win 640,0,1280,360 video_test2.mp4
once both video_test1 and video_test2 are running, press space to pause video_test1: you will see that the audio buffer of video_test2 will start depleting and become negative, then also the video buffer will soon become negative and eventually video_test2 stops.

Don't mind about video and audio buffer values I put in the omxplayer command line, they are just there to let the issue appear sooner. Also you can use any video you like, also the same video for both instances.

This doesn't happen if you force analog output changing -o hdmi with -o local

My test setup is a raspberry pi 2, just updated to latest firmware and kernel:

Code: Select all

pi@raspberrypi2 ~ $ uname -a
Linux raspberrypi2 4.4.44-v7+ #950 SMP Sun Jan 22 16:20:42 GMT 2017 armv7l GNU/Linux
pi@raspberrypi2 ~ $ vcgencmd version
Jan 25 2017 17:47:56 
Copyright (c) 2012 Broadcom
version 11c16e89c0310830518e3d64cce7e9c2c3804e3a (clean) (release)
But also happens exactly the same on older raspberry pi 1:

Code: Select all

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 4.1.6+ #812 PREEMPT Thu Sep 10 11:27:23 BST 2015 armv6l GNU/Linux
pi@raspberrypi ~ $ vcgencmd version
Sep  9 2015 22:58:39 
Copyright (c) 2012 Broadcom
version de72f07669414925f3fde745fb860bc5d4d193d8 (clean) (release)

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4604
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Shared state bug in audio_render when output is HDMI

Fri Jan 27, 2017 1:09 pm

Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
Please don't send PMs asking for support - use the forum.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

blackshard83
Posts: 67
Joined: Fri Jan 10, 2014 8:31 am

Re: Shared state bug in audio_render when output is HDMI

Fri Jan 27, 2017 1:22 pm

Ok fine, thanks a lot. So now I'm in the people asking for a fix :(

Return to “OpenMAX”

Who is online

Users browsing this forum: No registered users and 2 guests