Hello there, I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC Thanks to the binding you can play easily sounds and videos from Pharo. The next steps are: * Documentation and examples (in the Image, GitHub, and a blog post/tutorial) * Full Travis testing * SDL support * A #Spec2 <https://twitter.com/hashtag/Spec2?src=hashtag_click>UI * A SeasideUI (https://github.com/pharo-media-center <https://t.co/Zzlb01Ncw8?amp=1>) Feel free to use the binding and tell me if you need help with it. Benoît Verhaeghe -- Benoît Verhaeghe badetitou.github.io benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
Hi Benoit, Thank you for publishing this one! This is how I installed: Iceberg remoteTypeSelector: #scpUrl. Metacello new baseline: 'VLC'; repository: 'github://badetitou/Pharo-LibVLC'; load. However I got this warning on Mac: This package depends on the following classes: VLCLibrary VLCLibraryCore You must resolve these dependencies before you will be able to load these definitions: VLCLibrary>>#macModuleName VLCLibraryCore>>#macModuleName And consequently all test method fails. Is there something I've missing? Cheers, Hernán El dom., 12 ene. 2020 a las 12:42, Benoit Verhaeghe (<badetitou@gmail.com>) escribió:
Hello there,
I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC
Thanks to the binding you can play easily sounds and videos from Pharo.
The next steps are:
- Documentation and examples (in the Image, GitHub, and a blog post/tutorial) - Full Travis testing - SDL support - A #Spec2 <https://twitter.com/hashtag/Spec2?src=hashtag_click> UI - A Seaside UI (https://github.com/pharo-media-center <https://t.co/Zzlb01Ncw8?amp=1>)
Feel free to use the binding and tell me if you need help with it.
Benoît Verhaeghe
-- Benoît Verhaeghebadetitou.github.io benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levraultbenoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
Le 12/01/2020 à 18:02, Hernán Morales Durand a écrit :
Hi Benoit,
Thank you for publishing this one! This is how I installed:
Iceberg remoteTypeSelector: #scpUrl. Metacello new baseline: 'VLC'; repository: 'github://badetitou/Pharo-LibVLC'; load.
However I got this warning on Mac:
This package depends on the following classes:  VLCLibrary  VLCLibraryCore You must resolve these dependencies before you will be able to load these definitions:  VLCLibrary>>#macModuleName  VLCLibraryCore>>#macModuleName
Oupsi, The bug is fixed now. It was a dependency problem in Pharo7 (in the baseline). I've forgot to check that before the release.
And consequently all test method fails. Is there something I've missing?
Cheers,
Hernán
El dom., 12 ene. 2020 a las 12:42, Benoit Verhaeghe (<badetitou@gmail.com <mailto:badetitou@gmail.com>>) escribió:
Hello there,
I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC
Thanks to the binding you can play easily sounds and videos from Pharo.
The next steps are:
* Documentation and examples (in the Image, GitHub, and a blog post/tutorial) * Full Travis testing * SDL support * A #Spec2 <https://twitter.com/hashtag/Spec2?src=hashtag_click>UI * A SeasideUI (https://github.com/pharo-media-center <https://t.co/Zzlb01Ncw8?amp=1>)
Feel free to use the binding and tell me if you need help with it.
Benoît Verhaeghe
-- Benoît Verhaeghe badetitou.github.io <http://badetitou.github.io>
benoit.verhaeghe@berger-levrault.com <mailto:benoit.verhaeghe@berger-levrault.com> R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr <mailto:benoit.verhaeghe@inria.fr> PHD student at Inria-Lille--Nord-Europe
-- Benoît Verhaeghe badetitou.github.io benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
Hi Benoit, That's cool. Thanks! Hilaire Le 12/01/2020 à 16:41, Benoit Verhaeghe a écrit :
I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC
Thanks to the binding you can play easily sounds and videos from Pharo.
-- Dr. Geo http://drgeo.eu
Got an issue on Linux too (Ubuntu 18.04.03 LTS) See attached screenshot. Does the final .9 in the installed library matter? Hilaire Le 12/01/2020 à 16:41, Benoit Verhaeghe a écrit :
I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC
-- Dr. Geo http://drgeo.eu
Hello, Yes, the final .9 matter... I have tested the binding on ArchLinux. And we have
$ whereis libvlccore libvlccore: /usr/lib/libvlccore.so
and
$ whereis libvlc libvlc: /usr/lib/libvlc.so
So two options, 1. I can add the version with ".9" in VLCLibrary>>#unix64LibraryName 2. Or you can create a link in ubuntu
ln -s /usr/lib/x86_64-linux-gnu/libvlccore.so.9 /usr/lib/x86_64-linux-gnu/libvlccore.so (please verity the command)
In travis I'm doing ||dist: bionic |before_install ||- sudo apt install libvlc-dev libvlccore-dev| || || |And I have no problem.| | | | | |If you use a symbolic link and it works please let me know so I can add this step in the installation.| | | |Thanks for testing!| |Benoît | || Le 14/01/2020 à 19:05, Hilaire a écrit :
Got an issue on Linux too (Ubuntu 18.04.03 LTS)
See attached screenshot. Does the final .9 in the installed library matter?
Hilaire
Le 12/01/2020 à 16:41, Benoit Verhaeghe a écrit :
I just want to let you know that I've developed an FFI binding to VLC. Since, version 2.1.1 you can use it on Windows, Linux, and OSX. https://github.com/badetitou/Pharo-LibVLC
-- Benoît Verhaeghe badetitou.github.io
benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
Le 14/01/2020 à 19:21, Benoit Verhaeghe a écrit :
|If you use a symbolic link and it works please let me know so I can add this step in the installation.|
|Did so, so no more error but then executing the code snippet from github, nothing happen.| || vlc mediaPlayer media | "VLCLibrary reset" vlc := VLCLibrary uniqueInstance createVLCInstance. media := vlc createMediaFromPath: '/home/hilaire/Vidéos/Lea2019.webm'. mediaPlayer := VLCLibrary uniqueInstance mediaPlayerNewFromMedia: media. mediaPlayer play | |I reset the unique instannce of VLCLibrary| |Hilaire | -- Dr. Geo http://drgeo.eu
Le 14/01/2020 à 21:10, Hilaire a écrit :
Le 14/01/2020 à 19:21, Benoit Verhaeghe a écrit :
|If you use a symbolic link and it works please let me know so I can add this step in the installation.|
|Did so, so no more error but then executing the code snippet from github, nothing happen.| Ok, In my point of view, the configuration works. If you execute |VLCLibrary uniqueInstance getVersion |you should get "3.x.x ..."
|| vlc mediaPlayer media | "VLCLibrary reset" vlc := VLCLibrary uniqueInstance createVLCInstance. media := vlc createMediaFromPath: '/home/hilaire/Vidéos/Lea2019.webm'. mediaPlayer := VLCLibrary uniqueInstance mediaPlayerNewFromMedia: media. mediaPlayer play |
One possibility is that VLC does not achieve to create the media (but still return one instead of nil). Could you try to use a path without the 'é'? | vlc mediaPlayer media | "VLCLibrary reset" vlc := VLCLibrary uniqueInstance createVLCInstance. media := vlc createMediaFromPath: '/home/hilaire/Lea2019.webm'. mediaPlayer := VLCLibrary uniqueInstance mediaPlayerNewFromMedia: media. mediaPlayer play If this is the error, I suppose I can configure vlc to use utf-8 string. Thanks for testing! Benoît
|I reset the unique instannce of VLCLibrary|
|Hilaire |
-- Benoît Verhaeghe badetitou.github.io benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
It worked. However when closing the windows, there is an error: Processor yield. false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess in Block: [ [ WorldMorph doOneCycle.... [ self value. Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self value.... [00007f8b8c03b6e0] xcb_window window error: X server failure Then quitting Pharo, there is VM crash Segmentation fault Thu Jan 16 11:40:20 2020 /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo Pharo VM version: 5.0-201902062351 Wed Feb 6 23:59:26 UTC 2019 gcc 4.8 [Production Spur 64-bit VM] Built from: CoInterpreter VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 Feb 6 2019 With: StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 Feb 6 2019 Revision: VM: 201902062351 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Wed Feb 6 15:51:18 2019 CommitHash: a838346b Plugins: 201902062351 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Build host: Linux travis-job-f2b22483-7f84-414f-b833-69f69518c685 4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux plugin path: /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351 [default: /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/] C stack backtrace & registers: rax 0x00000001 rbx 0x7f8ba8026340 rcx 0x7f8ba562d5f0 rdx 0x00000000 rdi 0x00000000 rsi 0x00000000 rbp 0x7f8bc682fd90 rsp 0x7f8bc682fb70 r8 0x7f8ba8034a30 r9 0x00000001 r10 0x000000a3 r11 0x7f8bc682fdc8 r12 0x7f8bc682fdc0 r13 0x7f8bc682fdbe r14 0x7f8bc682fdbf r15 0x7f8ba80264b8 rip 0x7f8ba586c861 */usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x19861)[0x7f8ba586c861] /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo[0x41b0b3] /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo[0x41cb0e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f8bd441e890] /usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x19861)[0x7f8ba586c861] /usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x5c653)[0x7f8ba58af653] /usr/lib/x86_64-linux-gnu/libvlccore.so(+0x67ecb)[0x7f8bca8abecb] /usr/lib/x86_64-linux-gnu/libvlccore.so(+0x6b09f)[0x7f8bca8af09f] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f8bd44136db] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f8bd413c88f] [0x0] Can't dump Smalltalk stack(s). Not in VM thread Most recent primitives compress:toByteArray: compress:toByteArray: compress:toByteArray: compress:toByteArray: compress:toByteArray: ../.. ----- http://drgeo.eu -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Me again, I've tried vlc := VLCLibrary uniqueInstance createVLCInstance. "do not use accentuated characters for the path" media := vlc createMediaFromPath: ('/home/badetitou/Vidéos/bla.mkv' encodeWith: #utf8). mediaPlayer := VLCLibrary uniqueInstance mediaPlayerNewFromMedia: media. mediaPlayer pause (so I add `encodeWith: #utf8`) and it works on my laptop. Is there any way to force Pharo to use utf8 encoding when I want to send String to VLC. I don't know, I will investigate. Benoît Le 14/01/2020 à 21:10, Hilaire a écrit :
Le 14/01/2020 à 19:21, Benoit Verhaeghe a écrit :
|If you use a symbolic link and it works please let me know so I can add this step in the installation.|
|Did so, so no more error but then executing the code snippet from github, nothing happen.|
|| vlc mediaPlayer media | "VLCLibrary reset" vlc := VLCLibrary uniqueInstance createVLCInstance. media := vlc createMediaFromPath: '/home/hilaire/Vidéos/Lea2019.webm'. mediaPlayer := VLCLibrary uniqueInstance mediaPlayerNewFromMedia: media. mediaPlayer play |
|I reset the unique instannce of VLCLibrary|
|Hilaire |
-- Benoît Verhaeghe badetitou.github.io benoit.verhaeghe@berger-levrault.com R&D Engineer at Berger-Levrault benoit.verhaeghe@inria.fr PHD student at Inria-Lille--Nord-Europe
It worked. However when closing the windows, there is an error: Processor yield. false ] whileFalse: [ ] ] in MorphicUIManager>>spawnNewProcess in Block: [ [ WorldMorph doOneCycle.... [ self value. Processor terminateActive ] in BlockClosure>>newProcess in Block: [ self value.... [00007f8b8c03b6e0] xcb_window window error: X server failure Then quitting Pharo, there is VM crash Segmentation fault Thu Jan 16 11:40:20 2020 /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo Pharo VM version: 5.0-201902062351 Wed Feb 6 23:59:26 UTC 2019 gcc 4.8 [Production Spur 64-bit VM] Built from: CoInterpreter VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 Feb 6 2019 With: StackToRegisterMappingCogit VMMaker.oscog-eem.2509 uuid: 91e81f64-95de-4914-a960-8f842be3a194 Feb 6 2019 Revision: VM: 201902062351 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Date: Wed Feb 6 15:51:18 2019 CommitHash: a838346b Plugins: 201902062351 https://github.com/OpenSmalltalk/opensmalltalk-vm.git Build host: Linux travis-job-f2b22483-7f84-414f-b833-69f69518c685 4.4.0-101-generic #124~14.04.1-Ubuntu SMP Fri Nov 10 19:05:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux plugin path: /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351 [default: /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/] C stack backtrace & registers: rax 0x00000001 rbx 0x7f8ba8026340 rcx 0x7f8ba562d5f0 rdx 0x00000000 rdi 0x00000000 rsi 0x00000000 rbp 0x7f8bc682fd90 rsp 0x7f8bc682fb70 r8 0x7f8ba8034a30 r9 0x00000001 r10 0x000000a3 r11 0x7f8bc682fdc8 r12 0x7f8bc682fdc0 r13 0x7f8bc682fdbe r14 0x7f8bc682fdbf r15 0x7f8ba80264b8 rip 0x7f8ba586c861 */usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x19861)[0x7f8ba586c861] /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo[0x41b0b3] /home/hilaire/Travaux/Developpement/Pharo/pharo-vm/lib/pharo/5.0-201902062351/pharo[0x41cb0e] /lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f8bd441e890] /usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x19861)[0x7f8ba586c861] /usr/lib/x86_64-linux-gnu/vlc/plugins/demux/libmkv_plugin.so(+0x5c653)[0x7f8ba58af653] /usr/lib/x86_64-linux-gnu/libvlccore.so(+0x67ecb)[0x7f8bca8abecb] /usr/lib/x86_64-linux-gnu/libvlccore.so(+0x6b09f)[0x7f8bca8af09f] /lib/x86_64-linux-gnu/libpthread.so.0(+0x76db)[0x7f8bd44136db] /lib/x86_64-linux-gnu/libc.so.6(clone+0x3f)[0x7f8bd413c88f] [0x0] Can't dump Smalltalk stack(s). Not in VM thread Most recent primitives compress:toByteArray: compress:toByteArray: compress:toByteArray: compress:toByteArray: compress:toByteArray: ../.. ----- http://drgeo.eu -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
participants (4)
-
Benoit Verhaeghe -
Hernán Morales Durand -
Hilaire -
HilaireFernandes