Closed tysonite closed 3 months ago
livesim2 needs contentType or mimeType to know what type of content it is. If contentType is not present, there is a function fillContentTypes that derives the contentType from the mimeType. Does your content lack both contentType and mimeType?
I think it is reasonable that livesim2 needs one of these, but I think it should present a better error message if it does neither find contentType nor mimeType. There is also a codecs parameter, but that is often better to set on the Representation level, since it may be different between different representations.
All said, I just checked and there seems that the fillContentTypes
is only called in generating the MPD so its warning message is not coming when loading the assets. I'll try to fix that.
Fair enough. Thank you. My content has mimeType on Representation layer only, but lacks it on AdaptationSet layer too (as well as contentType). The MPD looks like that:
<AdaptationSet segmentAlignment="true" maxWidth="1280" maxHeight="720" maxFrameRate="11988/400" par="16:9" startWithSAP="1">
...
<Representation id="1" mimeType="video/mp4" codecs="avc1.64001F" width="1280" height="720" frameRate="11988/400" sar="1:1" bandwidth="249110">
</Representation>
OK. I think this is unfortunately allowed by the spec, so I'll try to add some deeper scanning of mimeType into Representations and not only on the AdaptationSet layer. I will then just look at one representation at a time until I find a mimeType and not check if all representations have the same type.
Thanks. Seems like a good option.
Thank you @tobbee !!! Much appreciate this fix.
According to https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/74, contentType shall be optional. However, livesim2 considers it mandatory and fails loading assets if it does not present in MPD.
Seems like such restriction is enforced here: https://github.com/Dash-Industry-Forum/livesim2/blob/36761736ff2079e7e9fc9b363ff752fa217d9d55/cmd/livesim2/app/asset.go#L571
This leads to an error during loading of the asset: "no video or audio representation found".