Local ffmpeg output to S3 Bucket

邮差的信 提交于 2020-07-05 03:32:29

问题


Heres my setup; - I have a local PC running ffmpeg with output configured to h.264 and aac - and S3 bucket created at AWS

what i need to do is, use ffmpeg [local] output to upload files directly to s3 bucket. PS: Planing to use that s3 bucket with cloudfront to allow 1 [one] user to stream a live event with about setup.

i could not find a way to specify output location as s3 bucket [with key]. any ideas as to how to do it? Thanks


回答1:


You can:

  1. Mount the S3 bucket using S3FS FUSE and then you output directly to it.

    How to Mount S3 Bucket on CentOS/RHEL and Ubuntu using S3FS

  2. Segment the media for HTTP streaming and upload each segment and playlists using the S3 API and a script of your choice.

I'd go with 1 for a live stream.




回答2:


It could be late to answer this question, but I think this may be useful for others.

You can use this method to write output file to your S3 server.

ffmpeg -re -i in.ts -f hls -method PUT http://example.com/live/out.m3u8

Read more in https://ffmpeg.org/ffmpeg-all.html#hls-2



来源:https://stackoverflow.com/questions/31530772/local-ffmpeg-output-to-s3-bucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!