即时串流并使用Django对视频进行转码 [英] On the fly Stream and transcode video with Django

查看:255
本文介绍了即时串流并使用Django对视频进行转码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 models.FileField()的模型,然后我将其显示给用户,以便他们可以单击链接并在其浏览器中呈现文件。用户可以上传各种类型的文件。



问题是,我想以不同的方式处理大型avi,并向用户提供文件流。



我的要求是简单地将视频文件从media_root目录流式传输/转码到最终用户的浏览器,最好采用Mac友好格式。



我已经搜索并偶然发现了一些项目:



https://github.com/andrewebdev/django-video



https://github.com/rugginoso/django-transcodeandstream



由于我是django的新手,所以我不确定如何将其代码整合到我的项目中。



有什么想法和建议吗?

解决方案

您可以检查 Amazon Elastic Transcoder 。它是云中的媒体转码。它旨在为开发人员和企业提供一种高度可扩展,易于使用且具有成本效益的方式,以将媒体文件从其源格式转换(或转码)为可在智能手机,平板电脑和PC等设备上播放的版本。 / p>

否则,您可以检查 Webfaction ,他们在服务器上具有视频和图像处理功能,您可以使用。



如果您要使用以下任何一种这些,您可以向他们询问安装过程以及如何将其集成到项目中。



还有另外一件事,如果您想在浏览器中播放视频,您将需要一个 jwplayer 这样的视频播放器。



希望这将帮助您入门!最好的祝福!


I have a model that uses "models.FileField()", which I then display back to the user so they may click the link and have a file rendered in their browser. The user can upload various types of files.

Problem is, I'd like to handle large avi's differently, and have the file stream to the user.

The requirement I have is to simply stream/transcode video files from the media_root dir to an end user's browser, preferably in a mac friendly format. It would be for a couple users at most.

I've search and stumbled upon a few projects:

https://github.com/andrewebdev/django-video

https://github.com/rugginoso/django-transcodeandstream

As I am I a relatively newbie when it comes to django, I'm not sure how to incorporate their code into my proj.

Any thoughts, suggestions?

解决方案

You can check Amazon Elastic Transcoder. It is a media transcoding in the cloud. It is designed to be a highly scalable, easy to use and a cost effective way for developers and businesses to convert (or "transcode") media files from their source format into versions that will playback on devices like smartphones, tablets and PCs.

Or else you can check Webfaction, they have Video and image processing on their servers which you can use.

If you will use any of those, you can ask them about the installing process and how to integrate it in your project.

And one more thing, if you want to play the video on the browser, you will need a video player like jwplayer.

Hope this will help you get started! Best wishes!

这篇关于即时串流并使用Django对视频进行转码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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