I'm working on a multimedia art project with openFrameworks 0.10.1 and libVLC 3.0.9 Vetinari, on macOS Mojave 10.14.6 / Xcode 10.1. After some trial and error everything now works fine and I'm able to play local video files in various formats and with great quality.
I have only a problem with network streams, which actually is the main required feature. When I try to play a network stream e.g. from youtube or world live webcams, I can see in the console that connection is correctly parsed and managed by the relevant Lua plugin. But some moments later I get an EOF and libvlc_media_player gets disconnected. Here is the console log: https://pastebin.com/HWCU8EJy
The VLC official app coming from the same libVLC build is opening and playing the same network streams with no problems at all. At first I supposed there might be some issues with the macOS security system since libVLC is accessing the network from my app bundle, so I changed all NSAppTransportSecurity keys in the Info.plist file to disable any macOs security filter.
Then I also copied all CFBundleURLTypes keys from the Info.plist file of the official VLC app. But still it doesn't work.
I tried installing an updated version of the Lua script "youtube.luac", but no luck.
I'm seriously hitting a wall. Do anyone have some advice? Even some clues?
Thank you in advance.
EDIT:
I think I have now some interesting clues from comparing the log file of VLC app with the one from libVLC. At first I focused on secure TLS handshaking part and following. They are quite the same both in VLC app and libVLC, so now I can see that the secure connection works fine in libVLC and also that both libVLC and VLC app work exactly the same way here.
Then I realized that the most interesting stuff is at the very beginning and at the exit of my app + libVLC.
In VLC app the URL is opened as a playlist and an input thread is created:
[00007fa0d051c2e0] main playlist debug: processing request item: watch?v=mRe-514tGMg, node: Scaletta, skip: 0
[00007fa0d051c2e0] main playlist debug: rebuilding array of current - root Scaletta
[00007fa0d051c2e0] main playlist debug: rebuild done - 1 items, index 0
[00007fa0d051c2e0] main playlist debug: starting playback of new item
[00007fa0d051c2e0] main playlist debug: resyncing on watch?v=mRe-514tGMg
[00007fa0d051c2e0] main playlist debug: watch?v=mRe-514tGMg is at 0
[00007fa0d051c2e0] main playlist debug: creating new input thread
[00007fa0d08996f0] main input debug: Creating an input for 'watch?v=mRe-514tGMg'
[00007fa0d051c2e0] main playlist debug: requesting art for new input thread
[00007fa0d08996f0] main input debug: using timeshift granularity of 50 MiB
[00007fa0d08996f0] main input debug: using default timeshift path
[00007fa0d08996f0] main input debug: `https://www.youtube.com/watch?v=mRe-514tGMg' gives access `https' demux `any' path `www.youtube.com/watch?v=mRe-514tGMg'
.....
Instead in libVLC the URL is opened as a "main input" without input thread:
[00007f812e8e20f0] main input debug: Creating an input for 'mRe-514tGMg'
[00007f812e8e20f0] main input debug: using timeshift granularity of 50 MiB
[00007f812e8e20f0] main input debug: using default timeshift path
[00007f812e8e20f0] main input debug: `http://youtu.be/mRe-514tGMg' gives access `http' demux `any' path `youtu.be/mRe-514tGMg'
....
Afterwards the logs are quite the same, even if events are reported in a different order, I suppose because of the threaded processes.
Then after failing the first attempt to communicate with the server, VLC app keeps on trying other connections with different parameters:
[00007fa0d08996f0] main input debug: EOF reached
.....
[00007fa0d5504fd0] securetransport tls client debug: shutdown TLS session
[00007fa0d5504fd0] securetransport tls client debug: close TLS session
[00007fa0d5504fd0] securetransport tls client debug: close secure transport client
[00007fa0d051c2e0] main playlist debug: dead input
[00007fa0d051c2e0] main playlist debug: processing request item: EarthCam Live: Times Square in 4K, node: Scaletta, skip: 0
[00007fa0d051c2e0] main playlist debug: rebuilding array of current - root Scaletta
[00007fa0d051c2e0] main playlist debug: rebuild done - 1 items, index 0
[00007fa0d051c2e0] main playlist debug: starting playback of new item
[00007fa0d051c2e0] main playlist debug: resyncing on EarthCam Live: Times Square in 4K
[00007fa0d051c2e0] main playlist debug: EarthCam Live: Times Square in 4K is at 0
[00007fa0d051c2e0] main playlist debug: creating new input thread
.....
Then it keeps on trying connections several times until it finds the right parameters, and finally it opens the YouTube live stream.
libVLC instead stops at first attempt and exits:
[00007f812e8e20f0] main input debug: EOF reached
...
[00007f812dee8eb0] securetransport tls client debug: shutdown TLS session
[00007f812dee8eb0] securetransport tls client debug: close TLS session
[00007f812dee8eb0] securetransport tls client debug: close secure transport client
EXIT
MacBooksMBP2243:~ macbookproretina$
Don't know really what to do now.
In libVLC the class more similar to a playlist is a libvlc_media_list, so I tried to use a libvlc_media_list_player, feeding it with a libvlc_media_list containing one only URL.
But that also doesn't work...