-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Hi
I'm trying to save 30 seconds of live stream to file, but i keep getting exceptions on bad XML schema. With code:
private static async Task MainAsync()
{
var url = "http://ncplusgo.s43-po.live.e56-po.insyscd.net/out/u/eskatvsd.mpd";
var dir = @"stream";
var downloader = new MpdDownloader(new Uri(url), dir);
var trackRepresentation = downloader.GetTracksFor(TrackContentType.Video).First().TrackRepresentations.OrderByDescending(r => r.Bandwidth).First();
var path = await downloader.Download(trackRepresentation, TimeSpan.Zero, TimeSpan.FromSeconds(30));
Console.WriteLine(path);
}
I get this exception:
'<' is an unexpected token. The expected token is '='. Line 60, position 25.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowUnexpectedToken(String expectedToken1, String expectedToken2)
at System.Xml.XmlTextReaderImpl.ParseAttributes()
at System.Xml.XmlTextReaderImpl.ParseElement()
at System.Xml.XmlTextReaderImpl.ParseElementContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XElement.ReadElementFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XNode.ReadFrom(XmlReader reader)
at Qoollo.MpegDash.MediaPresentationDescription.ReadMpdTag()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Qoollo.MpegDash.MediaPresentationDescription.ParsePeriods()
at System.Lazy`1.CreateValue()
at System.Lazy`1.LazyInitValue()
at System.Lazy`1.get_Value()
at Qoollo.MpegDash.MpdWalker.GetTracksFor(TrackContentType type)
at Qoollo.MpegDash.MpdDownloader.GetTracksFor(TrackContentType type)
at MpdStream.Program.<MainAsync>d__1.MoveNext() in c:\users\jsyty\documents\visual studio 2015\Projects\MpdStream\MpdStream\Program.cs:line 24
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at MpdStream.Program.<>c.<<Main>b__0_0>d.MoveNext() in c:\users\jsyty\documents\visual studio 2015\Projects\MpdStream\MpdStream\Program.cs:line 14
The expected token IS = in downloaded xml.
When i checked my stream mpd on http://www.validome.org/xml/validate/ it says it's valid xml.
Can you help me here?
Metadata
Metadata
Assignees
Labels
No labels