This project has moved. For the latest updates, please go here.

Problem with opening .m3u8 file and start stream

May 18, 2014 at 4:30 PM
Hello!
I'm trying to open an VLC playlist .m3u from http://web.tvbox.tv/tvbox_v4.m3u
I'm using VS 2013 Ultimate Update 2, Application: HlsPlayer.VS2013 -> HlsView.WP8
I'm testing on Lumia 520
When I press Play button on media element is displayed:
3108 Unable to play media.

Debuger:
TsMediaStreamSource.OpenMediaAsync()
Media OpenMediaAsyncCalled: Idle -> Opening at 18.05.2014 19:31:18 +03:00
TsMediaManager.OpenMedia()
TsMediaManager.OpenMedia() handler
MediaElement State: Opening
MediaStreamFacadeBase.MediaManagerOnStateChange() to OpenMedia:
TsMediaManager.OpenMediaAsync() state OpenMedia
MediaElement State: Opening
MediaStreamFacadeBase.MediaManagerOnStateChange() to Opening:
MediaElement State: Opening
HttpClientWebReaderManager.DetectContentTypeAsync() url ext "http://web.tvbox.tv/tvbox_v4.m3u" type M3U (application/x-mpegURL)
'TaskHost.exe' (CoreCLR: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Net.Requests.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in System.Net.Http.DLL
A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in SM.Media.DLL
A first chance exception of type 'System.Net.Http.HttpRequestException' occurred in mscorlib.ni.dll
HlsProgramManager.LoadAsync: Response status code does not indicate success: 404 ().
PlaylistSegmentManagerFactory.SetMediaSource(): program not found
A first chance exception of type 'System.IO.FileNotFoundException' occurred in SM.Media.DLL
PlaylistSegmentManagerFactory.SetMediaSource(): unable to load playlist: Unable to load program
A first chance exception of type 'System.IO.FileNotFoundException' occurred in SM.Media.DLL
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll
TsMediaManager.OpenMediaAsync failed: Unable to load program
MediaStreamFacadeBase.MediaManagerOnStateChange() to Error: Unable to play media
MediaElement State: Opening
A first chance exception of type 'System.AggregateException' occurred in SM.Media.DLL
A first chance exception of type 'System.AggregateException' occurred in mscorlib.ni.dll
TsMediaStreamSource.CloseMedia()
Media CloseMediaCalled: Opening -> Closing at 18.05.2014 19:31:33 +03:00
TsMediaStreamSource.CloseMediaHandler()
AsyncFifoWorker.WorkHandle.RunAsync() work should not throw exceptions: System.AggregateException: Unable to load program
System.IO.FileNotFoundException: Unable to load program
System.IO.FileNotFoundException: Unable to load program

TsMediaManager.CloseMedia()
MediaStreamFacadeBase.Dispose(True)
MediaElement State: Closed
TsMediaManager.CloseAsync()
TsMediaManager.CloseAsync() calling _mediaStreamSource.CloseAsync()
MediaStreamFacadeBase.CleanupMediaManager()
TsMediaStreamSource.CloseAsync(): open 0 close RanToCompletion
TsMediaManager.CloseAsync() completed
TsMediaManager.Dispose()
TsMediaManager.CloseAsync()
TsMediaManager.CloseAsync() completed by other caller
TsMediaManager.Dispose()
TsMediaStreamSource.Dispose()
Media DisposeCalled: Closing -> Idle at 18.05.2014 19:31:33 +03:00
The thread 0x81c has exited with code 259 (0x103).
MediaStreamFacadeBase.CleanupMediaManager() completed
Coordinator
May 18, 2014 at 5:27 PM
From your log, the site is not reachable:
HlsProgramManager.LoadAsync: Response status code does not indicate success: 404 (). 
A "curl http://web.tvbox.tv/tvbox_v4.m3u" shows:
curl: (6) Could not resolve host: web.tvbox.tv
You either have the URL wrong or something is wrong with the host name.
May 18, 2014 at 6:42 PM
Edited May 18, 2014 at 6:43 PM
but when simply open in browser it open's up and display the .m3u content.
or this line read's successfully:
HttpClientWebReaderManager.DetectContentTypeAsync() url ext "http://web.tvbox.tv/tvbox_v4.m3u" type M3U (application/x-mpegURL)
Coordinator
May 18, 2014 at 8:24 PM
The "url ext" bit means that it just used the path's file extension (".m3u8") to determine the content type. If it had gone out to the network, it would have said "url HEAD", "url range GET", or "url GET".

Even Google's DNS doesn't know about that host:
C:\>nslookup.exe web.tvbox.tv 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

*** google-public-dns-a.google.com can't find web.tvbox.tv: Non-existent domain
Make sure that you can resolve the host name, otherwise there is no way the address will work.

If you are seeing it with a web browser, I would suggest you run Fiddler with both your web browser and with SimulatedPlayer (you can use it with the phone as well, but you might want to check with IE on the phone because sometimes the phone doesn't seem to want to go through Fiddler). There should be something different between the web browser's request and your app's request.

The usual symptom of a missing cookie, geo restrictions, or such is a 403, not a 404, but the phone sometimes returns 404s for other reasons (e.g., an untrusted SSL certificate). Regardless, a Fiddler trace should let you know what is actually happening on the network (if not, there is always Wireshark).