无法在视频中播放用亚马逊弹性转码器创建的mpegdash视频

问题描述 投票:0回答:1

我使用亚马逊弹性转码器对一些视频进行了转码,我正在使用视频和wowza进行一些直播视频。当我使用wowza和mpegdash时,玩家工作正常。但是,当我尝试使用我的转码文件与cloudfront无关。我也使用了视频页面中的示例,我得到了同样的错误。我想我在转码文件上做错了。这是我的转码文件的样本https://d19cwas8lp55sz.cloudfront.net/archivos/1048/mpegDash/playlist.mpd我在视频中使用了这个例子

Videogular Dash Plugin Example

我只是改变了源码,我遇到了同样的问题,我无法播放文件。在我将ssl添加到我的cloudfront发行版并添加了$ sce.trustAsResourceUrl()之后,我得到了一些问题得到了解决,但我仍然遇到了同样的问题

Cannot play media. No decoders for requested formats: application/dash+xml

HTTP “Content-Type” of “application/dash+xml” is not supported. Load of media resource https://xxxxxxxxx/archivos/1053/mpegDash/playlist.mpd failed.

我用curl检查了我的cloudfront发行版的标题,目前看起来还不错

我像这样使用curl

curl -H "origin: http://ramonaclient2.localdomain/" -v "https://xxxxxxxxxxx/archivos/1046/mpegDash/mpegDash0600k/2f79632dd95a45519d1ec09bc230aad3b824384d09edebd0e214aa07b9c0fc8b" 

我在标题上做这个

access-control-allow-origin: *
access-control-allow-methods: GET, HEAD

这就是我在java应用程序中为弹性转码器创建作业的方法

CreateJobOutput mpegDashAudio = new CreateJobOutput()
                .withKey("mpegDashAudio/" + outputKey)
                .withPresetId(MPEG_DASH_128K_AUDIO_PRESET_ID)
                .withSegmentDuration(SEGMENT_DURATION);
        CreateJobOutput mpegDash0600k = new CreateJobOutput()
                .withKey("mpegDash0600k/" + outputKey)
                .withPresetId(MPEG_DASH_600K_PRESET_ID)
                .withSegmentDuration(SEGMENT_DURATION);
        CreateJobOutput mpegDash1200k = new CreateJobOutput()
                .withKey("mpegDash1200k/" + outputKey)
                .withPresetId(MPEG_DASH_1200K_PRESET_ID)
                .withSegmentDuration(SEGMENT_DURATION);
        CreateJobOutput mpegDash2400k = new CreateJobOutput()
                .withKey("mpegDash2400k/" + outputKey)
                .withPresetId(MPEG_DASH_2400K_PRESET_ID)
                .withSegmentDuration(SEGMENT_DURATION);
        CreateJobOutput mpegDash4800k = new CreateJobOutput()
                .withKey("mpegDash4800k/" + outputKey)
                .withPresetId(MPEG_DASH_4800K_PRESET_ID)
                .withSegmentDuration(SEGMENT_DURATION).withThumbnailPattern("thumbs/img-{resolution}-{count}");
java mpeg-dash amazon-elastic-transcoder videogular
1个回答
0
投票

这更像是一个云端问题

我只需要添加

<AllowedHeader>range</AllowedHeader> 
© www.soinside.com 2019 - 2024. All rights reserved.