Page 1 of 1

libvlc bluray subtitles

Posted: 09 May 2014 12:44
by Adriana
Hello,

I am developing a video player in .NET arround libvlc.
The version used is: libvlc 2.1.3 and VLC same version.

I encountered the problem of subtitle / audio tracks / video tracks retrieval from the media. For this purpose, I use the functions:

libvlc_video_get_spu_description and
libvlc_video_get_spu_count

I use them after the video started playing, when a chapter or a title is changed, but they always return the same result:
subs count = 1
subs list = "Disabled".

I see that VLC (main application) returns these values correctly over the same video.
Also, for DVD these functions work as expected.

My questions are:
Am I using the correct functions ?
If I should use other ones, which ones ?
Am I using them improperly ?

Re: libvlc bluray subtitles

Posted: 15 May 2014 11:47
by Adriana
Update:

Found that:
libvlc_audio_get_track_description
libvlc_video_get_track_description
libvlc_video_get_spu_description

don't return the same list of elements as vlc does, over the same media. They only return "Disabled". The count of the tracks is also 0.

These elements are needed to be able to later change these properties using:
libvlc_audio_set_track
libvlc_video_set_track
libvlc_video_set_spu

I was able to get hold of the list of media tracks using
libvlc_media_tracks_get
But the _set_ functions above don't work when passing them items from the list obtained with libvlc_media_tracks_get.

Re: libvlc bluray subtitles

Posted: 15 May 2014 15:06
by mangokm40
Just trying to understand...
You're saying that VLC shows multiple subtitles.
However, the linked-list returned by 'libvlc_video_get_spu_description()' has only one item whose 'psz_name' is 'Disabled' and whose
'p_next' is null ?

Re: libvlc bluray subtitles

Posted: 16 May 2014 09:31
by Adriana
yes, correct. That is what is happening.

Update: after reading about similar issues, I've found the cause of my problem and its solution.
The subtitles/audio/video were not loaded at the moment I was querying them (when media duration changed event is launched, media parsed = true).

The solution I adopted is reading them and loading them into the menu where I display them only when the menu is shown.

More info at:
https://trac.videolan.org/vlc/ticket/5035