我正在尝试将破折号流推送到youtube,而不是使用rtmp。我使用API来创建带有摄取类型dash的流,并将其绑定到直播。
然后,我使用FFmpeg创建了一个实时破折号流,并尝试将其放入dash_upload API,但我总是得到400并返回以下消息:“您的客户端发出了格式错误或非法的请求。MPD无法解析。仅此而已。知道。”我什至尝试了其他在网上找到的mpd文件(都通过了MPEG-DASH MPD验证程序)。
是否可以查看更详细的日志或任何显示出问题的内容,或者有人可以使用示例mpd进行工作?
基本上是我尝试过的:
输入 https://upload.youtube.com/dash_upload?cid=jsjb-sb9q-4wqj-XXXX©=0&file=dash.mpd
<?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:xlink="http://www.w3.org/1999/xlink"
xsi:schemaLocation="urn:mpeg:DASH:schema:MPD:2011 http://standards.iso.org/ittf/PubliclyAvailableStandards/MPEG-DASH_schema_files/DASH-MPD.xsd"
profiles="urn:mpeg:dash:profile:isoff-live:2011"
type="dynamic"
minimumUpdatePeriod="PT6S"
suggestedPresentationDelay="PT6S"
availabilityStartTime="2018-10-10T20:02:08Z"
publishTime="2018-10-10T20:02:33Z"
minBufferTime="PT12.7S">
<ProgramInformation>
</ProgramInformation>
<Period id="0" start="PT0.0S">
<AdaptationSet id="0" contentType="video" segmentAlignment="true" bitstreamSwitching="true">
<Representation id="0" mimeType="video/mp4" codecs="avc1.42c028" bandwidth="3002151" width="1920" height="1080" frameRate="10000000/333333">
<SegmentTemplate timescale="10000000" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="63999936" r="3" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
<AdaptationSet id="1" contentType="audio" segmentAlignment="true" bitstreamSwitching="true">
<Representation id="1" mimeType="audio/mp4" codecs="mp4a.40.2" bandwidth="130979" audioSamplingRate="44100">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
<SegmentTemplate timescale="44100" initialization="init-stream$RepresentationID$.m4s" media="chunk-stream$RepresentationID$-$Number%05d$.m4s" startNumber="1">
<SegmentTimeline>
<S t="0" d="283153" />
<S d="281556" />
<S d="282668" />
<S d="281600" />
</SegmentTimeline>
</SegmentTemplate>
</Representation>
</AdaptationSet>
</Period>
</MPD>