Opened 5 years ago
Last modified 15 months ago
#9281 new defect
wrong $Number$ value while reading mpd
| Reported by: | Kostik | Owned by: | |
|---|---|---|---|
| Priority: | normal | Component: | avformat |
| Version: | unspecified | Keywords: | dash |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description (last modified by )
Hello,
using the latest static build ffmpeg version N-57631-gebedd26eef-static
I want to read mpd and convert to mpegts - this part works ok,
except one manifest
looks like ffmpeg make wrong calculation for $Number$
In my case I have
availabilityStartTime="2021-05-27T11:59:16Z"
media="$RepresentationID$-$Number$.m4s"
duration="180180"
startNumber="487925"
presentationTimeOffset="89360526151"
I expect $Number$ to be converted to 488430 (and other players do so), but ffmpeg try retrieve 397033568
here is full manifest
<?xml version="1.0" encoding="UTF-8"?>
<MPD xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:mpeg:dash:schema:mpd:2011" xmlns:cenc="urn:mpeg:cenc:2013" xmlns:mspr="urn:microsoft:playready" xsi:schemaLocation="urn:mpeg:dash:schema:mpd:2011 DASH-MPD.xsd" type="dynamic" minimumUpdatePeriod="PT6S" minBufferTime="PT1.000S" maxSegmentDuration="PT3.003S" availabilityStartTime="2021-05-27T11:59:16Z" timeShiftBufferDepth="PT36.036S" publishTime="2021-06-07T19:25:48Z" profiles="urn:mpeg:dash:profile:isoff-live:2011">
<Period id="487925" start="PT976813.47S">
<AdaptationSet mimeType="video/mp4" segmentAlignment="true" startWithSAP="1" maxWidth="1280" maxHeight="720" maxFrameRate="60000/1001" par="16:9">
<InbandEventStream schemeIdUri="urn:mpeg:dash:event:2012" value="1"/>
<Accessibility schemeIdUri="urn:scte:dash:cc:cea-608:2015" value="CC1:und;CC2:und"/>
<SegmentTemplate timescale="90000" media="$RepresentationID$-$Number$.m4s" startNumber="487925"/>
<Representation id="video1" width="1280" height="720" frameRate="60000/1001" sar="1:1" scanType="progressive" bandwidth="6562944" codecs="avc1.640029"/>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" lang="en" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<SegmentTemplate timescale="90000" media="$RepresentationID$-$Number$.m4s" startNumber="487925"/>
<Representation id="audio1" audioSamplingRate="44100" bandwidth="96000" codecs="mp4a.40.2">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
<AdaptationSet mimeType="audio/mp4" lang="es" segmentAlignment="true" startWithSAP="1">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="dub"/>
<SegmentTemplate timescale="90000" media="$RepresentationID$-$Number$.m4s" startNumber="487925"/>
<Representation id="audio2" audioSamplingRate="44100" bandwidth="96000" codecs="mp4a.40.2">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
</Representation>
</AdaptationSet>
</Period>
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:direct:2014" value="2021-06-07T19:25:48Z"/>
</MPD>
Change History (2)
comment:1 by , 5 years ago
| Component: | ffmpeg → avformat |
|---|---|
| Description: | modified (diff) |
| Keywords: | dash added; mpd manifest removed |
comment:2 by , 15 months ago
Note:
See TracTickets
for help on using tickets.



This is still an issue in latest ffmpeg builds. Some DASH manifests seem to cause ffmpeg to incorrectly calculate the segment numbers. This behaviour is being noticed in various programs which depend on ffmpeg for DASH playback.
A working example, using mpv
An example of an incorrect playback attempt
An example of the same stream/manifest, correctly parsed and played using dash.js
etc.