澳门银河网上官方赌场_老品牌值得信赖

ITKeyword,专注技术干货聚合推荐

注册 | 登录

FFmpeg video conversion wont play in my browser

itPublisher 分享于

2021腾讯云限时秒杀,爆款1核2G云服务器298元/3年!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1062

2021阿里云最低价产品入口+领取代金券(老用户3折起),
入口地址https://www.aliyun.com/minisite/goods

I am trying no matter what format of video my clients upload to convert them into three different formats:

 var videoExtensions = ['mp4', 'webm', 'ogg'];

    var ffmpeg = require('fluent-ffmpeg');
videoExtensions.forEach(function (extension) {
    var proc = new ffmpeg({source: media.file.path, nolog: false})
        .withVideoCodec('libx264')
        .withVideoBitrate(800)
        .withAudioCodec('libvo_aacenc')
        .withAudioBitrate('128k')
        .withAudioChannels(2)
        .toFormat(extension)
        .saveToFile(media.targetDir + media.getName() + '.' + extension,
        function (retcode, error) {
            console.log('file has been converted succesfully');
        });
});

On my local machine I am able to open and play the videos no problem

However as soon as I load them as resources into my browser it simply will not play.

If I however instead of converting just move the file I have no problem opening the file in my browser however then I will not be able to get the file in all three formats.

My question is am I doing something wrong in the above code or why is my browser "rejecting" the files so to speak?

video ffmpeg video-conversion
edited Jun 3 '15 at 15:23 shammelburg 1,332 2 6 19 asked Jun 3 '15 at 14:58 Marc Rasmussen 3,959 30 87 167      There are too many factors here to provide an answer. What ffmpeg commands were used to create the videos? What does the complete ffmpeg console output show for each encoding command? How are you trying to get the browsers to play the videos? Can you provide samples of the videos that do not play? –  LordNeckbeard Jun 3 '15 at 16:16      Hmm there is no real console output –  Marc Rasmussen Jun 3 '15 at 16:19

 | 

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。

澳门银河网上官方赌场