VLCKit not playing local files.

This forum is about all development around libVLC.
dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

VLCKit not playing local files.

Postby dantryte » 23 Jun 2019 16:04

I have been experimenting with the VLCKit library for macOS. I was able to display the video in a simple Cocoa app using the following code.

Code: Select all

import Cocoa class ViewController: NSViewController { var player: VLCMediaPlayer = { return VLCMediaPlayer() }() @IBOutlet weak var playerView: NSView! override func viewDidLoad() { super.viewDidLoad() setupPlayer() } private func setupPlayer() { let url = URL(string: "https://download.blender.org/peach/bigbuckbunny_movies/BigBuckBunny_320x180.mp4")! let media = VLCMedia(url: url) player.media = media player.drawable = playerView player.play() } }
As you can see it is as simple as it can get. It displays a video from a web URL.
The problem occurs now if I try to display a local file. I tried creating a local url using:

Code: Select all

fileURL(withPath:)
and passing the local absolute path. That didn't work.
I then tried passing the absolute path string directly to the VLCMedia constructor with the path argument.

Code: Select all

VLCMedia(path <absolute path>)
Which also didn't work.

By "didn't work" I mean that the view was just transparent nothing happened, no log in the console, it seemed like the setupPlayer never got executed, which it however did.

I am asking hence why I am not able to play local files

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

Re: VLCKit not playing local files.

Postby mfkl » 24 Jun 2019 03:42

Try again with debug logs
_mediaplayer.libraryInstance.debugLogging = YES;
https://mfkl.github.io

dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

Re: VLCKit not playing local files.

Postby dantryte » 24 Jun 2019 16:22

Thanks for the reply, I did execute the code with the debugLogging enabled as you suggested. And got the following output:

Code: Select all

creating player instance using shared library VLC media player - 3.0.7 Vetinari Copyright © 1996-2019 the VideoLAN team revision 3.0.6-291-g2d1a309528 configured with /Users/jenkins/workspace/vlc-release/macosx/vlc-release-VLCKit/libvlc/vlc/configure '--prefix=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-VLCKit/libvlc/vlc/install-MacOSX/x86_64' '--host=x86_64-apple-darwin14' '--with-contrib=/Users/jenkins/workspace/vlc-release/macosx/vlc-release-VLCKit/libvlc/vlc/contrib/MacOSX-x86_64-apple-darwin14-x86_64' '--enable-static' '--enable-dvbpsi' '--enable-avcodec' '--disable-macosx' '--disable-macosx-qtkit' '--disable-macosx-avfoundation' '--disable-shared' '--enable-opus' '--disable-faad' '--disable-lua' '--disable-a52' '--enable-fribidi' '--disable-qt' '--disable-skins2' '--disable-vcd' '--disable-vlc' '--disable-vlm' '--disable-nls' '--disable-sse' '--disable-notify' '--enable-live555' '--enable-realrtsp' '--enable-swscale' '--disable-projectm' '--enable-libass' '--enable-libxml2' '--disable-goom' '--disable-dvdread' '--disable-dvdnav' '--disable-bluray' '--disable-linsys' '--disable-libva' '--disable-gme' '--disable-tremor' '--enable-vorbis' '--disable-fluidsynth' '--disable-jack' '--disable-pulse' '--disable-mtp' '--enable-ogg' '--enable-speex' '--enable-theora' '--enable-flac' '--disable-screen' '--enable-freetype' '--enable-taglib' '--disable-mmx' '--disable-sparkle' '--disable-addonmanagermodules' '--disable-mad' 'host_alias=x86_64-apple-darwin14' 'CC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'CFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -arch x86_64 -O3 -g -mmacosx-version-min=10.9 -DNDEBUG' 'LDFLAGS=-arch x86_64' 'CPPFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -arch x86_64 -O3 -g -mmacosx-version-min=10.9' 'CXX=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++' 'CXXFLAGS=-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -arch x86_64 -O3 -g -mmacosx-version-min=10.9' 'OBJC=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang' 'OBJCFLAGS=-O3 -g' 'PKG_CONFIG_PATH=' Creating an input for '[HorribleSubs] Nande Koko ni Sensei ga - 12 [1080p].mkv' using timeshift granularity of 50 MiB using default timeshift path `file:///Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/%5BHorribleSubs%5D%20Nande%20Koko%20ni%20Sensei%20ga%20-%2012%20%5B1080p%5D.mkv' gives access `file' demux `any' path `/Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/%5BHorribleSubs%5D%20Nande%20Koko%20ni%20Sensei%20ga%20-%2012%20%5B1080p%5D.mkv' creating demux: access='file' demux='any' location='/Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/%5BHorribleSubs%5D%20Nande%20Koko%20ni%20Sensei%20ga%20-%2012%20%5B1080p%5D.mkv' file='/Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/[HorribleSubs] Nande Koko ni Sensei ga - 12 [1080p].mkv' looking for access_demux module matching "file": 4 candidates no access_demux modules matched creating access: file:///Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/%5BHorribleSubs%5D%20Nande%20Koko%20ni%20Sensei%20ga%20-%2012%20%5B1080p%5D.mkv (path: /Users/jmparavicini/GDrive/Documents/Development/CLion/AnimeBaseCore/cmake-build-debug/executable/[HorribleSubs] Nande Koko ni Sensei ga - 12 [1080p].mkv) looking for access module matching "file": 19 candidates no access modules matched
Searching on the internet hasn't brought me far, what does it mean:
no access modules matched

mangup
Blank Cone
Blank Cone
Posts: 71
Joined: 12 Apr 2019 20:23

Re: VLCKit not playing local files.

Postby mangup » 24 Jun 2019 18:06

It mean - no one from vlc/modules/access folder.

dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

Re: VLCKit not playing local files.

Postby dantryte » 27 Jun 2019 14:18

I am not sure what you mean by that sorry

dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

Re: VLCKit not playing local files.

Postby dantryte » 04 Jul 2019 10:54

Still haven't been able to fix this problem.

mangup
Blank Cone
Blank Cone
Posts: 71
Joined: 12 Apr 2019 20:23

Re: VLCKit not playing local files.

Postby mangup » 04 Jul 2019 13:52

try another sample mkv file. (with simple name )

dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

Re: VLCKit not playing local files.

Postby dantryte » 05 Jul 2019 10:42

Thanks for the reply, I tried multiple different .mkv files and some with very simple names (mov.mkv) yet I'm still having the same exact error message.

mangup
Blank Cone
Blank Cone
Posts: 71
Joined: 12 Apr 2019 20:23

Re: VLCKit not playing local files.

Postby mangup » 05 Jul 2019 12:47

yep, latest origin/master version does not play mkv.
But ubuntu system 3.0.4 play well.

dantryte
New Cone
New Cone
Posts: 6
Joined: 23 Jun 2019 14:28

Re: VLCKit not playing local files.

Postby dantryte » 05 Jul 2019 13:02

I have tried multiple different formats on my mac now, including .mp4 and .mov and i get the same error messages.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests