HLS streaming : 0 tracks, no resolution, no playback
Posted: 08 Jan 2016 20:13
Hi all,
I am part way through writing a plug-in based around the excellent libvlc. The plugin renders video frames to an off-screen openGL buffer for use externally. I have managed to get local video files working as desired (for a first pass at least), but have hit trouble streaming in videos. I am using the apple HLS test video: http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
Here are brief snippets of my approach:
- Calling 'libvlc_new' with: --ignore-config --no-video-title-show --http-caching=5000
- Using 'libvlc_media_new_location' passing in the URL to the stream
- Using 'libvlc_media_event_manager' to catch 'libvlc_MediaParsedChanged'
- Parsing the media with 'libvlc_media_parse_with_options' and the flag 'libvlc_media_parse_network'
- When 'libvlc_MediaParsedChanged' has calledback I am using 'libvlc_media_tracks_get' to get the resolution of the video...in order to create my openGL buffers.
The last point, number of tracks is always zero. If I keep polling I eventually get 8 subitems back in the media object.
My hunch is I am not enabling the adaptative module or similar...or maybe none of this is possible currently?!
Any help greatly appreciated! Apologies if I have not provided enough info...
Thanks,
Ste
I am part way through writing a plug-in based around the excellent libvlc. The plugin renders video frames to an off-screen openGL buffer for use externally. I have managed to get local video files working as desired (for a first pass at least), but have hit trouble streaming in videos. I am using the apple HLS test video: http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8
Here are brief snippets of my approach:
- Calling 'libvlc_new' with: --ignore-config --no-video-title-show --http-caching=5000
- Using 'libvlc_media_new_location' passing in the URL to the stream
- Using 'libvlc_media_event_manager' to catch 'libvlc_MediaParsedChanged'
- Parsing the media with 'libvlc_media_parse_with_options' and the flag 'libvlc_media_parse_network'
- When 'libvlc_MediaParsedChanged' has calledback I am using 'libvlc_media_tracks_get' to get the resolution of the video...in order to create my openGL buffers.
The last point, number of tracks is always zero. If I keep polling I eventually get 8 subitems back in the media object.
My hunch is I am not enabling the adaptative module or similar...or maybe none of this is possible currently?!
Any help greatly appreciated! Apologies if I have not provided enough info...
Thanks,
Ste