libVLC libvlc_media_player can't open network streams

This forum is about all development around libVLC.
gsibaldi
New Cone
New Cone
Posts: 5
Joined: 06 Apr 2020 18:26
VLC version: 3.0.9 Vetinari
Operating System: Mac OS
Location: Florence, Italy
Contact:

libVLC libvlc_media_player can't open network streams

Postby gsibaldi » 08 Apr 2020 10:19

Hello, it's my first post here.
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.

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: libVLC libvlc_media_player can't open network streams

Postby mfkl » 08 Apr 2020 10:47

Code: Select all

dlopen(../Frameworks/plugins/libosx_notifications_plugin.dylib, 1): Library not loaded: @executable_path/../Frameworks/Growl.framework/Versions/A/Growl Referenced from: /Users/macbookproretina/Documents/of_v0.10.1_osx_release/apps/myApps/VLCTEST_028/bin/VLCTEST_028Debug.app/Contents/Frameworks/plugins/libosx_notifications_plugin.dylib Reason: image not found) [00007f9de18065c0] main libvlc warning: cannot load module `../Frameworks/plugins/libmacosx_plugin.dylib' (dlopen(../Frameworks/plugins/libmacosx_plugin.dylib, 1): Library not loaded: @executable_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle Referenced from: /Users/macbookproretina/Documents/of_v0.10.1_osx_release/apps/myApps/VLCTEST_028/bin/VLCTEST_028Debug.app/Contents/Frameworks/plugins/libmacosx_plugin.dylib Reason: image not found)
Have you looked into this? Might not be the cause of your issue but still doesn't look correct.

Have you compared your logs with the VLC macOS logs? Have you tried a 3.0.8 build?
https://mfkl.github.io

gsibaldi
New Cone
New Cone
Posts: 5
Joined: 06 Apr 2020 18:26
VLC version: 3.0.9 Vetinari
Operating System: Mac OS
Location: Florence, Italy
Contact:

Re: libVLC libvlc_media_player can't open network streams

Postby gsibaldi » 08 Apr 2020 11:40

Right, I didn't care too much to Sparkle and Growl missing libraries, because it seems that VLC use them for application updates and message popups.
But actually maybe Growl is involved in some streaming event pipelining, I'm going to have a deeper look on that.
Beyond missing libraries error, logs from VLC macOS application are basically the same, until the point where it seems to be no more responses coming from server and libVLC closes the connection. Anyway I'll do some further investigation. And sure, I'll try 3.0.8 build.
I'll let you know, thank you for now!

gsibaldi
New Cone
New Cone
Posts: 5
Joined: 06 Apr 2020 18:26
VLC version: 3.0.9 Vetinari
Operating System: Mac OS
Location: Florence, Italy
Contact:

Re: libVLC libvlc_media_player can't open network streams

Postby gsibaldi » 08 Apr 2020 22:59

I think I have now some interesting clues.
At first I focused on secure TLS handshaking part and following logs, that are quite the same both in VLC app and libVLC.
But then I realized that the most interesting parts seems to be at the very beginning and at the exit of libVLC.

In VLC app the URL is opened as a playlist and an input thread is created:

Code: Select all

[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:

Code: Select all

[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' ....

After that 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:

Code: Select all

[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:

Code: Select all

[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.
The item more similar to a playlist is a libvlc_media_list, so I tried to use a libvlc_media_list_player, attaching to it a libvlc_media_list containing one only URL.
But that also doesn't work...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 18 guests