AWS MediaConvert转码MPEG-Dash在Firefox播放跳帧问题求助
AWS MediaConvert转码VP9+AAC DASH文件在Firefox中播放异常问题
问题现象
工作流为:媒体文件上传至S3存储桶→通过Lambda脚本提交给MediaConvert→转码为VP9编码视频+AAC编码音频的MPEG-Dash格式→输出至目标S3存储桶。将成品Dash文件通过AWS CLI本地下载后,在Firefox浏览器(Mac/Linux版本121.0)中使用Shaka Player或Dash.js播放时,JavaScript控制台持续出现类似以下的跳帧提示:
Jumping forward 3.0016669999999976 seconds because of gap starting at 84.118 and ending at 87.087
视频全程呈现快进效果,但在Chrome和Safari浏览器中播放完全正常。
测试用Shaka Player代码
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/4.7.1/shaka-player.compiled.debug.min.js"></script> <title>VP9Test</title> </head> <body> <h1>VP9 Test</h1> <video id="video" width="720" controls></video> <script> const manifestUri = 'http://host/video/master.mpd'; function initApp() { // Install built-in polyfills to patch browser incompatibilities. shaka.polyfill.installAll(); // Check to see if the browser supports the basic APIs Shaka needs. if (shaka.Player.isBrowserSupported()) { // Everything looks good! initPlayer(); } else { // This browser does not have the minimum set of APIs we need. console.error('Browser not supported!'); } } async function initPlayer() { // Create a Player instance. const video = document.getElementById('video'); const player = new shaka.Player(); await player.attach(video); // Attach player to the window to make it easy to access in the JS console. window.player = player; // Listen for error events. player.addEventListener('error', onErrorEvent); // Try to load a manifest. // This is an asynchronous process. try { await player.load(manifestUri); // This runs if the asynchronous load is successful. console.log('The video has now been loaded!'); } catch (e) { // onError is executed if the asynchronous load fails. onError(e); } } function onErrorEvent(event) { // Extract the shaka.util.Error object from the event. onError(event.detail); } function onError(error) { // Log the error. console.error('Error code', error.code, 'object', error); } document.addEventListener('DOMContentLoaded', initApp); </script> </body> </html>
测试资产结果
- abr-dash-amv-vp9:Youtube下载的H.264文件,无法正常播放
- abr-dash-jjk-vp9:Torrent获取的HEVC文件,无法正常播放
- abr-dash-unity-vp9:Youtube下载的H.264文件,可正常播放
MediaConvert转码配置
{ "Queue": "arn:aws:mediaconvert:us-east-1:694531566426:queues/Default", "UserMetadata": { "assetID": "ffb4b4a5-6746-42e3-bccb-e57a04bc4832" }, "Role": "arn:aws:iam::694531566426:role/MediaConvertRole", "Settings": { "TimecodeConfig": { "Source": "ZEROBASED" }, "OutputGroups": [ { "Name": "DASH ISO", "Outputs": [ { "ContainerSettings": { "Container": "MPD" }, "VideoDescription": { "Width": 1920, "Height": 1080, "CodecSettings": { "Codec": "VP9", "Vp9Settings": { "RateControlMode": "VBR", "Bitrate": 4000000 } } }, "NameModifier": "_v1" }, { "ContainerSettings": { "Container": "MPD" }, "VideoDescription": { "Width": 1600, "Height": 900, "CodecSettings": { "Codec": "VP9", "Vp9Settings": { "RateControlMode": "VBR", "Bitrate": 2600000 } } }, "NameModifier": "_v2" }, { "ContainerSettings": { "Container": "MPD" }, "VideoDescription": { "Width": 1280, "Height": 720, "CodecSettings": { "Codec": "VP9", "Vp9Settings": { "RateControlMode": "VBR", "Bitrate": 1800000 } } }, "NameModifier": "_v3" }, { "ContainerSettings": { "Container": "MPD" }, "VideoDescription": { "Width": 960, "Height": 540, "CodecSettings": { "Codec": "VP9", "Vp9Settings": { "RateControlMode": "VBR", "Bitrate": 1200000 } } }, "NameModifier": "_v4" }, { "ContainerSettings": { "Container": "MPD" }, "AudioDescriptions": [ { "AudioSourceName": "Audio Selector 1", "CodecSettings": { "Codec": "AAC", "AacSettings": { "Bitrate": 192000, "CodingMode": "CODING_MODE_2_0", "SampleRate": 48000 } } } ], "NameModifier": "_a1" } ], "OutputGroupSettings": { "Type": "DASH_ISO_GROUP_SETTINGS", "DashIsoGroupSettings": { "SegmentLength": 30, "Destination": "s3://bucket-dest/assets/ffb4b4a5-6746-42e3-bccb-e57a04bc4832/dash/amv", "FragmentLength": 2, "SegmentControl": "SEGMENTED_FILES" } } } ], "Inputs": [ { "AudioSelectors": { "Audio Selector 1": { "DefaultSelection": "DEFAULT" } }, "VideoSelector": {}, "TimecodeSource": "ZEROBASED", "FileInput": "s3://bucket-src/amv.mp4" } ] }, "BillingTagsSource": "JOB", "AccelerationSettings": { "Mode": "DISABLED" }, "StatusUpdateInterval": "SECONDS_60", "Priority": 0 }
目前对该问题毫无头绪,希望得到解决思路或方案。
内容的提问来源于stack exchange,提问作者complex1984
相关产品推荐
相关产品推荐

