激活CORS后DASH Manifest合规检测报错,ABR功能异常求助
Let’s tackle this head-on—that moov-1:trak-1:mdia-1:minf-1:stbl-1:stsd-1 SampleDescription sdType must be... error is directly blocking your ABR functionality, and it’s rooted in how your MP4 media files are structured. Here’s how to diagnose and fix it:
Understand the Root Cause
The error means the sdType field in the MP4’s stsd (Sample Description Box) doesn’t comply with DASH standards. DASH requires specific, standardized sdType values for each codec:
- H.264 video must use
avc1 - AAC audio must use
mp4a - VP9 video uses
vp09 - Opus audio uses
Opus
If this value is missing, misspelled, or doesn’t match your codec, DASH players can’t recognize and switch between adaptive bitrate tracks—hence your broken ABR.
Step-by-Step Fixes
Inspect your MP4 files’
stsdboxes
Use tools likeMP4Boxorffprobeto check thesdTypefor each variant track:# With MP4Box MP4Box -info your-variant-file.mp4 # With ffprobe ffprobe -v quiet -print_format json -show_streams your-variant-file.mp4Look for the codec-related fields (e.g.,
codec_namein ffprobe output, orSampleDescriptionsection in MP4Box output) to confirm thesdTypematches your codec’s required value.Ensure all ABR variants use matching codecs and
sdTypevalues
ABR relies on all tracks being codec-compatible. If one variant usesavc1(H.264) and another uses a non-standardh264tag, the player won’t switch between them. Fix any mismatched codecs or tags across your adaptive tracks.Re-transcode media files with correct codec settings
If yoursdTypeis incorrect, re-transcode your files with standard codec parameters. For example, using FFmpeg:# H.264 video with correct avc1 sdType ffmpeg -i input.mp4 -c:v libx264 -profile:v baseline -level:v 3.0 -crf 23 -c:a aac -b:a 128k output-720p.mp4This ensures the MP4 container uses the proper
sdTypetag for DASH compliance.Regenerate your MPD with a DASH-compliant tool
Don’t manually edit the MPD—use tools likeMP4Boxor Shaka Packager to generate it from your fixed media files:# MP4Box example for live DASH MP4Box -dash 1000 -profile live output-480p.mp4 output-720p.mp4 output-1080p.mp4 -out manifest.mpdThis ensures the MPD’s track metadata aligns perfectly with your media files’
stsdboxes.Re-test with the DASH compliance tool
After fixing the media files and regenerating the MPD, re-upload it to the compliance tool. If thesdTypeerror is gone, test your ABR behavior in a DASH player (like Shaka Player or Dash.js) to confirm it works.
Quick Note on CORS
While you’ve already enabled CORS, keep in mind that even with correct CORS settings, media file structural errors will still block ABR. Focus on fixing the sdType issue first—it’s the primary blocker here.
内容的提问来源于stack exchange,提问作者Massimo Vantaggio

