Flash MedaData判断视频是否有声音

2013-02-17 15:58:33

<p> </p> <p>官方说:<span style="color: rgb(0, 0, 0); font-family: Verdana,Arial,Helvetica,sans-serif,SimSun-18030; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; display: inline ! important; float: none;">If your video does not have audio, the audio-related metadata information (such as<span class="Apple-converted-space"> </span></span><samp style="font-size: 12px; line-height: 18px; color: rgb(0, 0, 0); font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="codeph">audiodatarate</samp><span style="color: rgb(0, 0, 0); font-family: Verdana,Arial,Helvetica,sans-serif,SimSun-18030; font-size: 12px; font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; display: inline ! important; float: none;">) returns<span class="Apple-converted-space"> </span></span><samp style="font-size: 12px; line-height: 18px; color: rgb(0, 0, 0); font-style: italic; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" class="codeph">undefined</samp><i style="font-size: 12px; line-height: 18px; color: rgb(0, 0, 0); font-family: Verdana,Arial,Helvetica,sans-serif,SimSun-18030; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;"><span class="Apple-converted-space"> </span>because no audio information is added to the metadata during encoding.</i></p> <p>如果视频没声音, audiodatarate为undefined, 可以我本地随便选个片子测试, 有声音的视频, audiodatarate也为undefined</p> <p>目前我以audiocodecid来处理,如果为undefined,则是无音轨视频. ( flash 的flv格式真够奇葩的...)</p>