Hi,
On Tue, 9 Apr 2019 at 15:03, Pavel Šorejs <
sor...@gmail.com> wrote:
> First i would like to say Praxis Live is awesome.
Thanks!
> I have used it for a multimedia part of an escape game - 4 different video screens playing video loops and rendering text and still images, 6 audio channels for main music and sound effects. All running in headless mode controlled using OSC protocol. All running great.
Would love to see some documentation of this project. Even better if
it's somewhere it can be shared! :-)
> First - i am now running version 3.5 but this also happens on 4.1 - there is memory corruption problem when using video:still in OpenGL. I have multiple Video patches - all of them OpenGL..
First question - how are you running the headless project(s)? Are the
video patches all running in one JVM or across multiple processes /
machines? Unfortunately, Processing has some serious issues running
multiple outputs in one VM which might explain what you're seeing, in
particular with resource (texture) cleanup affecting other outputs.
> Second - in version 4.0 and beyond, there is some optimizations regarding video:player and not processing video output when it is not rendered.
video:player was completely rewritten in 4.0 to be recodeable,
although the behaviour of not processing video when not rendering
hasn't changed. However, I noticed a bug the other day whereby
position and playback state are updated inside draw() so the component
state doesn't correctly update, although the video is playing fine.
Are you sure it's not this? Are you sure playback isn't actually
working? If so, please share a simple patch that replicates the issue
and I'll have a look.
> Thirs - this is not a bug, rather maybe some points for discussion. I am playing couple of 1080p videos in the patches. It works, but the frame rate is not the best. Acceptable, but not the best. I was trying various things and found out this. If i modify praxis live to use some kind of direct renderer in the gstreamer pipeline - for example xvimagesink - it runs super smooth. So looks like the pixel copying in java is the problem here. So i tried to look into it and found the OpenGL context sharing thing in gstreamer. As i understand, the support for this is missing in gst1-java-core -
https://github.com/gstreamer-java/gst1-java-core/issues/82 - i can volunteer to make it happen probably, but i will need at least some hints on where to start as i am not very familiar with gst1-java-core codebase. These guys sort of did that
https://github.com/gohai/processing-glvideo for processing - but they completely evaded the Java <-> C interop by writing the whole player in C so it is probably of no use.
There isn't any pixel copying in Java, or at least there shouldn't be
(just check with setting the renderer to OpenGL:GL3). However, the
pixel data is potentially pulled down to the CPU and passed back to
the GPU outside of the JVM. The support for OpenGL context sharing is
coming soon, although you're welcome to hop on that issue and help out
if you can. I'm aware of Gohai's work with gl-video for this (and
helped him with updating the Processing Video library for
gst1-java-core too). There is potentially work going into the
Processing Video library as part of GSoC which may also touch on this,
so hopefully all the projects can work together to make this happen.
The gl-video library is somewhat more limited than the support we
require. It should actually be possible to use the gl-video library
within a custom PraxisLIVE component if it works on your setup and you
need it now.
Best wishes,
Neil
--
Neil C Smith
Artist & Technologist
www.neilcsmith.net
PraxisLIVE - hybrid visual live programming
for creatives, for programmers, for students, for tinkerers
www.praxislive.org