【发布时间】:2015-03-24 20:12:15
【问题描述】:
我已对 mp4 文件的音频进行了如下转码和剥离:
$ ffmpeg -codec:a libvo_aacenc -ar 44100 -ac 1 -codec:v libx264 -profile:v baseline -level 13 -b:v 2000k dir/out.mp4 -i dir/original.mp4
$ ffmpeg -i dir/out.mp4 -an dir/out_an.mp4
我使用下面的 MP4Box 命令来生成一个 mpd:
$ MP4Box -dash 30000 -dash-profile on-demand -segment-name out-seg -out dir/out_dash dir/out.mp4
这会产生以下 mpd 文件:
<?xml version="1.0"?>
<!-- MPD file Generated with GPAC version 0.5.1-DEV-rev4065 -->
<MPD xmlns="urn:mpeg:dash:schema:mpd:2011" minBufferTime="PT1.500000S" type="static" mediaPresentationDuration="PT0H2M11.77S" profiles="urn:mpeg:dash:profile:full:2011">
<ProgramInformation moreInformationURL="http://gpac.sourceforge.net">
<Title>dashtest/output_dash.mpd generated by GPAC</Title>
</ProgramInformation>
<Period id="" duration="PT0H2M11.77S">
<AdaptationSet segmentAlignment="true" maxWidth="640" maxHeight="360" maxFrameRate="30000/1001" par="16:9">
<ContentComponent id="1" contentType="video" lang="und"/>
<ContentComponent id="2" contentType="audio" lang="und"/>
<Representation id="1" mimeType="video/mp4" codecs="avc1.42c00d,mp4a.40.02" width="640" height="360" frameRate="30000/1001" sar="1:1" audioSamplingRate="44100" startWithSAP="0" bandwidth="2097272">
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2"/>
<SegmentList timescale="1000" duration="30046">
<Initialization sourceURL="out-seginit.mp4"/>
<SegmentURL media="out-seg1.m4s"/>
<SegmentURL media="out-seg2.m4s"/>
<SegmentURL media="out-seg3.m4s"/>
<SegmentURL media="out-seg4.m4s"/>
<SegmentURL media="out-seg5.m4s"/>
</SegmentList>
</Representation>
</AdaptationSet>
</Period>
</MPD>
【问题讨论】:
-
个人资料应该是
-dash-profile onDemand -
感谢回复,将 -dash-profile 从 on-demand 更改为 onDemand 不会创建 m4s 文件,是否需要包含其他字段?