This project has moved and is read-only. For the latest updates, please go here.

No Video or Audio During playback on HlsView.WP8 on Nokia Lumia 1320

Feb 26, 2015 at 9:25 PM
Hi,

I wonder if you can help, I am trying to get the HlsView.WP8 player working on the above device, the source I am using is from the github repo @ https://phonesm.codeplex.com/SourceControl/list/changesets @ 7386ce926b9a

I have the code compiling, and seemingly running on the phone, with some minor modifications to the HttpClientWebReaderManager.cs, where I have commented out the "head" and "get range" calls from "DetectContentTypeAsync" and am just using the get call now, also I have hacked the GetContentType therein so I can test with a few content types per...

was
//contentType = _contentTypeDetector.GetContentType(request.RequestUri, response.Content.Headers, response.Content.FileName()).SingleOrDefaultSafe();
now
contentType = _contentTypeDetector.GetContentType(request.RequestUri, null, ".ts").SingleOrDefaultSafe();

allowing me to change and test other stream type as well as ".ts", I have tried ".mpg", "mp4", "bin" etc.., all with different degreems of success, but never with content [audio OR video] being rendered to the phone...

bipbob works fine tho!

here is a snippet of my output from within VS 2013
HlsPlaylistSegmentManager.UpdatePlaylist: playlist dynamic False segments 379 url http://10.100.107.204:55555/httpChannels.m3u8 loaded with 379 entries. index: -1 dynamic: False expires: 00:00:00 (26/02/2015 21:16:36 +00:00)
HttpClientWebReaderManager.DetectContentTypeAsync() al23pd url GET "http://10.100.107.204:55555/TV3" type MPEG-2 Transport Stream (video/MP2T)
BufferingManager.Initialize()
BufferingManager.Flush()
TsMediaStreamSource.OpenMediaAsync()
++++ Starting http://10.100.107.204:55555/TV3 at 26/02/2015 21:16:37 +00:00.  Total memory: 0.82 MiB
Media OpenMediaAsyncCalled: Idle -> Opening at 26/02/2015 21:16:37 +00:00
MediaElement State: Opening
Create PES Audio stream (ISO/IEC 11172-3 Audio) with PID 1203
Create PES Video stream (AVC video stream conforming to one or more profiles defined in Annex A of ITU-T Rec. H.264 | ISO/IEC 14496-10 or AVC video sub-bitstream as defined in 2.1.78) with PID 1103
H264Configurator.ComputeFrameRate() 50/1 -> 50.0000 fps
Configuration H.264 "Main" profile, level 3 544x576
Configuration MP3 Frame: MPEG Version 1 (ISO/IEC 11172-3), Layer II sample 48kHz bitrate 192kHz channel mode 0
TsTimestamp.ProcessPackets() syncing pts 21:15:02.2993444 dts 21:15:04.5393444 target 00:00:00 => offset 21:15:02.2993444
BufferingManager.UpdateBuffering: 7.68% duration 00:00:00.1920000 size 109758 starting True memory 1.99 MiB
TsMediaStreamSource.ConfigureAudioStream(): CodecPrivateData: 5500020080BB0000C05D0000000000000C00010000000000400201000000
MediaStreamConfigurator.ConfigureVideoStream(): CodecPrivateData: 00000001274D401E9A62811048B0CF5050505F00000300010000030032940000000128EE3C80
TsMediaStreamSource: ReportOpenMediaCompleted (2 streams)
TsMediaStreamSource: ReportOpenMediaCompleted CanSeek = False
SmMediaManager.SetMediaState() Opening -> Playing
SmMediaManager.ReportState() state Playing message 
MediaStreamFacadeBase.MediaManagerOnStateChange() to Playing: 
Media CallingReportOpenMediaCompletedLive: Opening -> Playing at 26/02/2015 21:16:42 +00:00
MediaElement State: Opening
BufferingManager.UpdateBuffering: 7.68% duration 00:00:00.1920000 size 180487 starting True memory 2.31 MiB
TsTimestamp.ProcessPackets() resyncing expected pts 00:00:01.6688334 actual pts 00:00:01.6928334 target 00:00:00 => offset 21:15:02.3233444 (was 21:15:02.2993444)
BufferingManager.UpdateBuffering: 27.84% duration 00:00:00.6960000 size 284840 starting True memory 2.73 MiB
MediaElement State: Playing
Sample Video buffering 27.84%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering: 37.44% duration 00:00:00.9360000 size 367454 starting True memory 3.38 MiB
Sample Video buffering 37.44%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering: 47.04% duration 00:00:01.1760000 size 454321 starting True memory 2.34 MiB
Sample Video buffering 47.04%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering: 67.20% duration 00:00:01.6800000 size 601367 starting True memory 2.97 MiB
Sample Video buffering 67.20%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering: 76.80% duration 00:00:01.9200000 size 725764 starting True memory 3.83 MiB
Sample Video buffering 76.80%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering: 96.00% duration 00:00:02.4000000 size 814816 starting True memory 4.18 MiB
Sample Video buffering 96.00%
TsMediaStreamSource.SignalHandler() re-requesting Audio, Video
BufferingManager.UpdateBuffering done buffering: duration 00:00:02.6400000 size 894081 starting True memory 2.62 MiB
  Audio count 111 size 63936 newest 00:00:04.0928334 oldest 00:00:01.4528334
  Video count 143 size 830145 newest 00:00:05.0560000 oldest 00:00:00
BufferingManager.UpdateState start buffering: duration 00:00:00 size 941297 starting False memory 3.84 MiB
BufferingManager.ReportExhaustion()
  Audio count 0 size 0 newest 00:00:05.5808334 oldest 00:00:05.5808334
  Video count 160 size 941297 newest 00:00:06.4560000 oldest 00:00:03.1760000
TsMediaStreamSource.SignalHandler() re-requesting Audio
BufferingManager.UpdateBuffering: 12.66% duration 00:00:00.4800000 size 1062044 starting False memory 4.65 MiB
TsMediaStreamSource.SignalHandler() re-requesting Audio
BufferingManager.UpdateBuffering: 14.29% duration 00:00:00.7200000 size 1198985 starting False memory 3.79 MiB
TsMediaStreamSource.SignalHandler() re-requesting Audio
BufferingManager.UpdateBuffering: 15.76% duration 00:00:00.9600000 size 1321952 starting False memory 3.57 MiB
TsMediaStreamSource.SignalHandler() re-requesting Audio
--------- etc.... snipped here for clarity ----------------------------
I have multiple streams available from the device @ url "http://10.100.107.204:55555/httpChannels.m3u8 loaded with 379 entries", and have changed to some of them too, but with no success.

I was wondering if you can spot anything that might be preventing the video / audio from being rendered to the phone, OR point me at some other avenues to experiment with?

many thanks in advance
Regards
Tony
Coordinator
Feb 27, 2015 at 12:42 AM
Edited Feb 27, 2015 at 11:32 AM
Most likely, there is something about the .TS segments that it is choking on. I would suggest you download one of those TS segments to a local server and try to play it directly. I often use Fiddler to capture the traffic, right-click the request I'm interested in, then "Save" -> "Response" -> "Response Body..."

Inside the Transport stream, it is finding a H.264 stream for video and an MP3 stream for audio:
H264Configurator.ComputeFrameRate() 50/1 -> 50.0000 fps
Configuration H.264 "Main" profile, level 3 544x576
Configuration MP3 Frame: MPEG Version 1 (ISO/IEC 11172-3), Layer II sample 48kHz bitrate 192kHz channel mode 0
Does that look reasonable? Do you see something similar stream properties if you use "ffprobe" or play the stream in something like VLC?

You could also try playing only the audio stream or only the video stream to try to narrow down what is causing the problem. Look for "ProgramStreamsHandler" in the "id3 Tag Support" thread.

You might also try playing the stream with HlsView.Win81 to see if that provides an additional clues. The OS is different and some of the processing pipeline is different since it is WinRT instead of Silverlight.

If you know what the content types are supposed to be, then you can override the default implementation of IContentTypeDetector. The simplest thing to do is probably to derive a new class from the existing ContentTypeDetector and override GetContentTypeByUrl() so that if it recognized the URL it will return ContentTypes.TransportStream or ContentTypes.M3U8; if not, it can keep using the existing code. You can get at the Autofac container like so (make sure to register the type before calling "_mediaStreamFacade.CreateMediaStreamSourceAsync(...)"):
    ...
    _mediaStreamFacade = MediaStreamFacadeSettings.Parameters.Create();

    _mediaStreamFacade.Builder.RegisterSingleton<IContentTypeDetector, YourCustomContentTypeDetector>();
    ...
If IContentTypeDetector knows what is at a URL without needing a Content-Type or such (just from the URL itself), then the extra HEAD or GET calls will not happen (they really shouldn't need to happen at all, but the way the code is currently organized, the stream type is needed before a stream is opened for playback).
Feb 27, 2015 at 9:40 AM
Many thanks for the prompt reply,

I'll have a look your suggestions later today and revert.

Thanks Again!