Hi,
I wrote an object based on gemframbuffer that uses libmpv (https://mpv.io/) to decode a video file and output it directly to a texture. This circumvent the bottleneck of uploading the pixes to the GPU and provides a wide range of codecs to Gem (if MPV can play your video, then gem-mpv can too). This have been successfully tested with 4K HAP video on Linux. It also supports video with alpha channel.
The source code is here : https://github.com/avilleret/gem-mpv The build system is CMake, there is no binary release. Follow the Readme to build it. It has been only tested on Linux for now.
Inside, it's more or less a wrapper around libmpv, that means every properties and commands should be supported but only few have been tested yet. Some are documented in the help file, for the others, please refer to libmpv help : https://mpv.io/manual/stable/
Best regards
Antoine
Thanks, I'll test it and let you know. Popesz
On Sat, 17 Aug 2019 at 15:51, Antoine Villeret antoine.villeret@gmail.com wrote:
Hi,
I wrote an object based on gemframbuffer that uses libmpv (https://mpv.io/) to decode a video file and output it directly to a texture. This circumvent the bottleneck of uploading the pixes to the GPU and provides a wide range of codecs to Gem (if MPV can play your video, then gem-mpv can too). This have been successfully tested with 4K HAP video on Linux. It also supports video with alpha channel.
The source code is here : https://github.com/avilleret/gem-mpv The build system is CMake, there is no binary release. Follow the Readme to build it. It has been only tested on Linux for now.
Inside, it's more or less a wrapper around libmpv, that means every properties and commands should be supported but only few have been tested yet. Some are documented in the help file, for the others, please refer to libmpv help : https://mpv.io/manual/stable/
Best regards
Antoine _______________________________________________ GEM-dev mailing list GEM-dev@lists.iem.at https://lists.puredata.info/listinfo/gem-dev
Hi Antoine,
I just tested this new object and thanks for it.
Here my comments : - play and pause messages return mpv: no method for ... - i was expecting less usage of CPU than the couple gemframebuffer/pix_film. On my computer the CPU usage is the same. - the sound of the video is audible, it will be nice to have x signal outlets (with x channels of sounds) from the mpv object.
Hope, these comments can help. ++
Jack
Le 17/08/2019 à 14:50, Antoine Villeret a écrit :
Hi,
I wrote an object based on gemframbuffer that uses libmpv (https://mpv.io/) to decode a video file and output it directly to a texture. This circumvent the bottleneck of uploading the pixes to the GPU and provides a wide range of codecs to Gem (if MPV can play your video, then gem-mpv can too). This have been successfully tested with 4K HAP video on Linux. It also supports video with alpha channel.
The source code is here : https://github.com/avilleret/gem-mpv The build system is CMake, there is no binary release. Follow the Readme to build it. It has been only tested on Linux for now.
Inside, it's more or less a wrapper around libmpv, that means every properties and commands should be supported but only few have been tested yet. Some are documented in the help file, for the others, please refer to libmpv help : https://mpv.io/manual/stable/
Best regards Antoine
GEM-dev mailing list GEM-dev@lists.iem.at https://lists.puredata.info/listinfo/gem-dev
hi
Le dim. 18 août 2019 à 16:41, Jack jack@rybn.org a écrit :
Hi Antoine,
I just tested this new object and thanks for it.
Here my comments :
- play and pause messages return mpv: no method for ...
This is a mistake, they should have been removed from help patcher.
- i was expecting less usage of CPU than the couple
gemframebuffer/pix_film. On my computer the CPU usage is the same.
it depends on the codec and hardware you're using. If your codec can't be decoded on your hardware then it should be the same as pix_film/gemframebuffer. But I made this external when I need to display 2048x2048 video at 30 fps. I tried several solution, including decoding the video with FFMPEG directly and passing it through v4l2loopback to Gem. But the only thing that works at 30fps was to use libmpv.
- the sound of the video is audible, it will be nice to have x signal
outlets (with x channels of sounds) from the mpv object.
indeed, that could be an improvement PR are welcome :-)
+ a
Hope, these comments can help. ++
Jack
Le 17/08/2019 à 14:50, Antoine Villeret a écrit :
Hi,
I wrote an object based on gemframbuffer that uses libmpv (https://mpv.io/) to decode a video file and output it directly to a texture. This circumvent the bottleneck of uploading the pixes to the GPU and provides a wide range of codecs to Gem (if MPV can play your video, then gem-mpv can too). This have been successfully tested with 4K HAP video on Linux. It also supports video with alpha channel.
The source code is here : https://github.com/avilleret/gem-mpv The build system is CMake, there is no binary release. Follow the Readme to build it. It has been only tested on Linux for now.
Inside, it's more or less a wrapper around libmpv, that means every properties and commands should be supported but only few have been tested yet. Some are documented in the help file, for the others, please refer to libmpv help : https://mpv.io/manual/stable/
Best regards
Antoine
GEM-dev mailing list GEM-dev@lists.iem.at https://lists.puredata.info/listinfo/gem-dev
GEM-dev mailing list GEM-dev@lists.iem.at https://lists.puredata.info/listinfo/gem-dev
Hi !
Le 18/08/2019 à 17:44, Antoine Villeret a écrit :
hi
Le dim. 18 août 2019 à 16:41, Jack <jack@rybn.org mailto:jack@rybn.org> a écrit :
Hi Antoine, I just tested this new object and thanks for it. Here my comments : - play and pause messages return mpv: no method for ...
This is a mistake, they should have been removed from help patcher.
OK, I got the last version and it is OK now.
- i was expecting less usage of CPU than the couple gemframebuffer/pix_film. On my computer the CPU usage is the same.
it depends on the codec and hardware you're using. If your codec can't be decoded on your hardware then it should be the same as pix_film/gemframebuffer. But I made this external when I need to display 2048x2048 video at 30 fps. I tried several solution, including decoding the video with FFMPEG directly and passing it through v4l2loopback to Gem. But the only thing that works at 30fps was to use libmpv.
OK.
- the sound of the video is audible, it will be nice to have x signal outlets (with x channels of sounds) from the mpv object.
indeed, that could be an improvement PR are welcome :-)
Done ! ++
Jack
a
Hope, these comments can help. ++ Jack Le 17/08/2019 à 14:50, Antoine Villeret a écrit : > Hi, > > I wrote an object based on gemframbuffer that uses libmpv > (https://mpv.io/) to decode a video file and output it directly to a > texture. > This circumvent the bottleneck of uploading the pixes to the GPU and > provides a wide range of codecs to Gem (if MPV can play your video, then > gem-mpv can too). > This have been successfully tested with 4K HAP video on Linux. > It also supports video with alpha channel. > > The source code is here : https://github.com/avilleret/gem-mpv > The build system is CMake, there is no binary release. > Follow the Readme to build it. > It has been only tested on Linux for now. > > Inside, it's more or less a wrapper around libmpv, that means every > properties and commands should be supported but only few have been > tested yet. > Some are documented in the help file, for the others, please refer to > libmpv help : https://mpv.io/manual/stable/ > > Best regards > > Antoine > > _______________________________________________ > GEM-dev mailing list > GEM-dev@lists.iem.at <mailto:GEM-dev@lists.iem.at> > https://lists.puredata.info/listinfo/gem-dev > _______________________________________________ GEM-dev mailing list GEM-dev@lists.iem.at <mailto:GEM-dev@lists.iem.at> https://lists.puredata.info/listinfo/gem-dev
Hi,
Le dim. 18 août 2019 à 16:41, Jack <jack@rybn.org mailto:jack@rybn.org> a écrit :
Hi Antoine, I just tested this new object and thanks for it.
Yeaah ! this object is just THE thing I was missing, it will help me a lot, many thanks Antoine for this !
I'll test further to compare performance in my A/V patches (which for now are made with gemframebuffers, readanysf~, pix_film), but for the firsts tests I've made, it seems that [mpv] is doing a very good job !
- the sound of the video is audible, it will be nice to have x
signal outlets (with x channels of sounds) from the mpv object.
indeed, that could be an improvement PR are welcome :-)
Done ! ++
Jack
yes audio output is a very good improvment ! it could solve the old and recurrent problem of audio clics & drop out in audio/video patches !
++ Pierre