如何在Amazon S3上读取远程视频使用的ffmpeg [英] How to read remote video on Amazon S3 using ffmpeg

查看:696
本文介绍了如何在Amazon S3上读取远程视频使用的ffmpeg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从视频通过FFmpeg的托管在亚马逊S3创建海报架。

I need to create poster frames from videos hosted on Amazon S3 via ffmpeg.

那么,有没有办法在这样的ffmpeg的命令行直接使用远程视频文件:
的ffmpeg -ihttp://bucket.s3.amazonaws.com/video.mp4-ss 00:00:10 -vframes 1 -f IMAGE2形象%03d.jpg

So is there a way to use the remote video file directly in ffmpeg command line like this:
ffmpeg -i "http://bucket.s3.amazonaws.com/video.mp4" -ss 00:00:10 -vframes 1 -f image2 "image%03d.jpg"

ffmpeg的只是返回:
http://bucket.s3.amazonaws.com/video.mp4:发生I / O错误
通常,这意味着输入文件被截断和/或损坏。

ffmpeg just returns:
http://bucket.s3.amazonaws.com/video.mp4: I/O error occurred
Usually that means that input file is truncated and/or corrupted.

我还试图迫使ffmpeg的使用视频MP4容器阅读:
的ffmpeg -f MP4 -ihttp://bucket.s3.amazonaws.com/video.mp4......
但没有运气。

I also tried forcing ffmpeg to use the videos mp4 container for reading:
ffmpeg -f mp4 -i "http://bucket.s3.amazonaws.com/video.mp4" ...
But no luck.

Wget的从S3这段视频并在本地处理它工作得很好,当然,
以及其他标准的HTTP服务器远程读取文件。<​​BR> 所以,我知道的ffmpeg支持远程文件读取,但为什么不能在S3?

Wget this video from S3 and processing it locally works fine of course,
as well as reading the file remotely from other 'standard' http servers.
So I know that ffmpeg supports remote file reading, but why not on S3?

推荐答案

没关系,我发现了一个简单的方法来解决我的问题。

Nevermind, I found an easy way to solve my problem.

我成立了一个Amazon CloudFront的下载分发指着我的S3存储。
通过CloudFront的文件都可以访问与ffmpeg的通过http:

I set up an amazon cloudfront download distribution pointing to my S3 bucket.
Via cloudfront the files are accessible with ffmpeg over http:

的ffmpeg -ihttp://subdomain.cloudfront.net/video.mp4-ss 00:00:10 -vframes 1 -f IMAGE2形象%03d.jpg

和数据传输更便宜! 但是,仍然不知道为什么这个不能与S3直接工作...

And the data transfer is even cheaper! But still wondering why this won't work with S3 directly...

这篇关于如何在Amazon S3上读取远程视频使用的ffmpeg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆