-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Lloyd Wallis edited this page Jul 11, 2016
·
21 revisions
Encoding/transcoding is a pretty complex topic. The FFmpeg/x264/mp4box workflow is generally fine and it is what we use in the Axinom reference encoder. My general suggestions regarding the most critical points in this regard:
- Always use DASH live profile (
mp4box -profile "dashavc264:live"
) - Ensure that your encoder uses a fixed keyframe distance that is equal to your segment size (or a multiple of which is equal to it); FFmpeg has some defects here leading to bad output; with x264 the following works:
--keyint 59 --min-keyint 59 --no-scenecut
- Use dash-strict mode with mp4box if you use fixed keyframe distances (
mp4box -dash-strict 4000
) - the default dash mode produced unexpected deviations last I tried it - To avoid FFmpeg being clever with frame drop/duplication, use
-vsync passthrough
- Watch out for aspect ratio issues! Not all input content has SAR 1:1!
- Do not use bitstream switching (
mp4box -bs-switching no
) - If using encryption, put PSSH box information only in the manifest; (no PSSH data in crypt.xml for mp4box); also
mp4box -sample-groups-traf
made encrypted video work better in more players but I forget why
- Safari <=9 does not support AVC3
- Safari 10 and Internet Explorer 11 can play AVC3, but only if you signal to the browser it is AVC1
- MEDIA_ERR_DECODE indicates an issue with your stream, not dash.js.
- Understanding supported codecs
- In Chrome, the chrome://media-internals page may help you identify the problem
- Firefox < 49 may sometimes fail to start playback on dynamic streams, or streams with a #t= URL fragment