Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenMAX support? #15

Open
nmaas87 opened this issue Sep 9, 2021 · 8 comments
Open

OpenMAX support? #15

nmaas87 opened this issue Sep 9, 2021 · 8 comments
Labels
enhancement New feature or request

Comments

@nmaas87
Copy link

nmaas87 commented Sep 9, 2021

Hello,

one memeber of the OBS Forum showcased Gstreamer-encoder with OpenMAX Support for RPi GPU acceleration: https://obsproject.com/forum/threads/obs-raspberry-pi-build-instructions.115739/page-8
Any possibility to enable this as well for this build?

Thanks a lot!

@xbelanch
Copy link
Owner

xbelanch commented Sep 9, 2021

Impressive! I'll give a try and see if I can fit this onto the build script. At the moment I found this first starting-point: https://github.com/audiohacked/obs-studio-plugin-openmax/blob/master/openmax-encoder.c

PS: 7 years.... mmm maybe outdated?

@nmaas87
Copy link
Author

nmaas87 commented Sep 10, 2021

Hm, it seems like there could be OpenMAX already compiled into your ffmpeg version:

 --enable-omx \
 --enable-omx-rpi \

So maybe, it just needs the OpenMAX gstreamer plugin to be reachable from gstreamer?
https://github.com/GStreamer/gst-omx

@nmaas87
Copy link
Author

nmaas87 commented Sep 10, 2021

OK, I got the gstreamer-omx plugin compiled like this

git clone https://github.com/GStreamer/gst-omx.git
cd gst-omx
git checkout tags/1.18.4
meson --buildtype=release -Dheader_path=/opt/vc/include/IL -Dtarget=rpi build 
ninja -C build 
sudo ninja -C build install

With that, OpenMAX (Raspberry Pi) becomes available like in the screenshot.
However, it does not work.
As soon as you start streaming or recording, you get an output error within OBS, about NVENC etc, and the log shows:

info: ==== Startup complete ===============================================
info: All scene data cleared
info: ------------------------------------------------
info: pulse-input: Server name: 'pulseaudio 14.2'
info: pulse-input: Audio format: s16le, 44100 Hz, 2 channels
info: pulse-input: Started recording from 'alsa_output.platform-bcm2835_audio.digital-stereo.monitor'
info: [Loaded global audio device]: 'Desktop Audio'
info: xshm-input: Geometry 1920x1080 @ 0,0
info: Switched to scene 'Scene'
info: ------------------------------------------------
info: Loaded scenes:
info: - scene 'Scene':
info:     - source: 'Screen Capture (XSHM)' (xshm_input)
info: ------------------------------------------------
Attempted path: share/obs/obs-studio/images/overflow.png
Attempted path: /usr/share/obs/obs-studio/images/overflow.png
0:00:03.371424096  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:851:priv_gst_parse_yyparse: no element "appsrc"
0:00:03.371989273  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:851:priv_gst_parse_yyparse: no element "videoconvert"
0:00:03.372218770  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:939:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
0:00:03.390092324  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:939:priv_gst_parse_yyparse: link has no source [sink=@0x28ca178]
0:00:03.390171193  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:851:priv_gst_parse_yyparse: no element "h264parse"
0:00:03.390206785  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:939:priv_gst_parse_yyparse: link has no sink [source=@0x28ca178]
0:00:03.390267488  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:851:priv_gst_parse_yyparse: no element "appsink"
0:00:03.390303987  2920 0xabe03ec0 ERROR           GST_PIPELINE gst/parse/grammar.y:939:priv_gst_parse_yyparse: link has no source [sink=@(nil)]
error: no element "appsrc"
warning: Stream output type 'rtmp_output' failed to start!
info: ==== Shutting down ==================================================
info: pulse-input: Stopped recording from 'alsa_output.platform-bcm2835_audio.digital-stereo.monitor'
info: pulse-input: Got 899 packets with 264563 frames
info: All scene data cleared

Any ideas?

@xbelanch xbelanch added the enhancement New feature or request label Nov 1, 2021
@FilipStadler
Copy link


Any ideas?

Is this on 32 or the 64bit Rasbian ?

@xbelanch
Copy link
Owner

32

@FilipStadler
Copy link

32

Ok i don't have a clue if this is a reason but sad I am also forced to stay on the 32 bit version because of the missing omx on the 64 bit os.

@xbelanch
Copy link
Owner

xbelanch commented Oct 10, 2022

uname -m to check if you're under 32 or 64 bits. If output is armv7l then is 32 bits.

@FilipStadler
Copy link

uname -m to check if you're under 32 or 64 bits. If output is armv7l then is 32 bits.

I know and I run 32 because the need of GPU running https://github.com/datarhei/restreamer and owncast both uses omx but passtru is done mustly because of the limited GPU power.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants