[TVVLCKit] Help debugging unable to play MKV

This forum is about all development around libVLC.
yearly5356
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2023 13:32

[TVVLCKit] Help debugging unable to play MKV

Postby yearly5356 » 21 Aug 2023 13:40

Hello,

I'm playing around with TVVLCKit on tvOS and I have this odd issue where a certain source will get instantly stopped (VLCMediaPlayerStateStopped). I've tried different URLs and most of them work but this one won't. The URL is only valid for a very short time so I'm unable to share it unfortunately. I'm wondering what I can do to figure out what's going wrong. Playing it using VLC on Mac OS or iOS works great, it's just the tvOS SDK I'm having the problem with. Nothing in the console except that I set the VLCMediaPlayer delegate and print the state when it changes and for this file it's just immediately stopped.

How can I troubleshoot? Thanks.

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

Re: [TVVLCKit] Help debugging unable to play MKV

Postby mfkl » 22 Aug 2023 06:44

enable verbose debug libvlc logs and paste them here is a good first step.
https://mfkl.github.io

yearly5356
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2023 13:32

Re: [TVVLCKit] Help debugging unable to play MKV

Postby yearly5356 » 22 Aug 2023 18:34

enable verbose debug libvlc logs and paste them here is a good first step.
I can't find a place to do that in the tvOS side of things. Do I need to build edit the compileAndBuildVLCKit.sh script and build it myself? I get errors running that script (ERROR: Building contribs failed) that I can surely work on fixing but before I go down that rabbit hole I want to make sure there's not just some flag I set to do this. Grepping for verbose I mostly find non-source entries and the rest seem irrelevant.

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

Re: [TVVLCKit] Help debugging unable to play MKV

Postby mfkl » 23 Aug 2023 06:07

give "--verbose=2" to the VLCMediaPlayer constructor
https://mfkl.github.io

yearly5356
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2023 13:32

Re: [TVVLCKit] Help debugging unable to play MKV

Postby yearly5356 » 23 Aug 2023 10:35

Here's an example of output using a working video where it's a link to an MKV file. I print state changes in the media player.

Code: Select all

2023-08-23 10:27:51.595027+0200 Debris[8261:51453047] creating player instance using shared library VLCMediaPlayerStateBuffering VLCMediaPlayerStateESAdded VLCMediaPlayerStateBuffering VLCMediaPlayerStateStopped

When initializing the player with the verbose option (VLCMediaPlayer(options: ["--verbose=2"])) I instead get the following:

Code: Select all

2023-08-23 10:29:22.333846+0200 Debris[8800:51456981] creating player instance with private library as options were given VLCMediaPlayerStateBuffering VLCMediaPlayerStateESAdded [h264 @ 0x15e81f400] Reinit context to 1920x1088, pix_fmt: yuv420p VLCMediaPlayerStateBuffering VLCMediaPlayerStateStopped

This indicates to me that the verbose option is working as intended. With the problematic video that is also a link to an MKV I get the following output using no verbose option:

Code: Select all

2023-08-23 10:32:00.243931+0200 Debris[9763:51463573] creating player instance using shared library VLCMediaPlayerStateStopped

When I initialize the player with the verbose option I get no additional output, only the different initialization output.

Code: Select all

2023-08-23 10:30:48.187677+0200 Debris[9333:51460624] creating player instance with private library as options were given VLCMediaPlayerStateStopped

Again, the video works fine in the VLC app and other URLs to MKV files work fine when I use TVVLCKit. I just don't understand why this one won't work or what I can do to find out why it will not.

yearly5356
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2023 13:32

Re: [TVVLCKit] Help debugging unable to play MKV

Postby yearly5356 » 23 Aug 2023 21:44

Found something interesting. When I download the non-working MKV and load the asset locally into VLCMediaPlayer I hear the audio but see no video. Doing the same thing with a remote working MKV I get audio and video as expected. Now I get interesting output.

Code: Select all

2023-08-23 21:40:27.104233+0200 Debris[66851:52937569] creating player instance with private library as options were given 2023-08-23 21:40:27.168544+0200 Debris[66851:52937699] [plugin] AddInstanceForFactory: No factory registered for id <CFUUID 0x6000030bf5a0> F8BB1C28-BAE8-11D6-9C31-00039315CD46 [hevc @ 0x12201aa00] get_buffer() failed [hevc @ 0x12201aa00] thread_get_buffer() failed [hevc @ 0x12201aa00] Error parsing NAL unit #0. [hevc @ 0x12202a000] get_buffer() failed [hevc @ 0x12202a000] thread_get_buffer() failed [hevc @ 0x12202a000] Error parsing NAL unit #0. [hevc @ 0x12201b000] get_buffer() failed [hevc @ 0x12201b000] thread_get_buffer() failed [hevc @ 0x12201b000] Error parsing NAL unit #0. VLCMediaPlayerStateBuffering [hevc @ 0x12201b600] get_buffer() failed [hevc @ 0x12201b600] thread_get_buffer() failed [hevc @ 0x12201b600] Error parsing NAL unit #0. [hevc @ 0x12204a400] get_buffer() failed [hevc @ 0x12204a400] thread_get_buffer() failed [hevc @ 0x12204a400] Error parsing NAL unit #0. [hevc @ 0x122055400] get_buffer() failed [hevc @ 0x122055400] thread_get_buffer() failed [hevc @ 0x122055400] Error parsing NAL unit #0. [hevc @ 0x122060400] Could not find ref with POC 5 [hevc @ 0x122060400] Could not find ref with POC 3 [hevc @ 0x122060400] Could not find ref with POC 0


Not sure what it means though.

yearly5356
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2023 13:32

Re: [TVVLCKit] Help debugging unable to play MKV

Postby yearly5356 » 23 Aug 2023 21:50

I dug a bit deeper. I think this has to do with lack of hardware acceleration support (?) for this specific variation (?) of the codec (?) when played using a simulator (?) (?) . Or something like that. I got ahold of an Apple TV and it seems to work on device.

Thanks for the help!


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests