mp4流能否使用ffserver? [英] Is mp4 stream able with ffserver?

查看:1212
本文介绍了mp4流能否使用ffserver?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用ffserver流式传输mp4文件的日期。

我读了很多这样的问题:



开始流简单的mp4与ffserver


http://ffmpeg.gusari.org/viewtopic.php?f=12&t=1190

http://ffmpeg.org/pipermail/ffserver-user /2012-July/000204.html

HTML5 - 如何流式传输大的.mp4文件?

Days I trying to stream mp4 file with ffserver.
I read many questions like these:
https://superuser.com/questions/563591/streaming-mp4-with-ffmpeg
Begin stream simple mp4 with ffserver
http://ffmpeg.gusari.org/viewtopic.php?f=12&t=1190
http://ffmpeg.org/pipermail/ffserver-user/2012-July/000204.html
HTML5 - How to stream large .mp4 files?

最后我不明白是mp4流是否可以?

是吗一种使用ffserver的方法?

有没有任何样本?我阅读帮助,但他们最关于直播流,但我
只是想流式传输一个简单的mp4文件。

Finally I cant understand is mp4 stream able or not?
Is it a way to do this with ffserver?
Is there any sample?I read helps but they most about live stream but I just want to stream a simple mp4 file.

推荐答案

是的

流式传输mp4文件非常多可能与 ffserver 。但是,可能需要阅读文档:

Streaming an mp4-file is very much possible with ffserver. However it might require some reading of the documentation:

https: //ffmpeg.org/ffmpeg.html

https://ffmpeg.org/ffserver.html

关键部分是编写ffserver的配置文件( ffserver.conf )。据我所知,ffmpeg提供了一个示例配置列表:

The crucial part is the writing of the configuration file for ffserver (ffserver.conf). As far as I know, ffmpeg provides a list of sample-configurations:

尽管他们可能有点过时,但如果您尝试运行它们, ffserver 会告诉你是不是应该是这样的:)

Although they might be a bit outdated but if you try to run them, ffserver will tell you if something isn't as it should be :)

修改

(由于我只有1的代表,我不能发布超过2个链接我删除了样本,并在下面显示了一个相当简单的一个)

(Since I only have a rep of 1, I can't post more than 2 links I removed the samples and displayed a rather simple one below)

要流式传输mp4文件,您可能必须考虑到 ffserver 可能会以mp4格式流式传输。仍然可以流式传输mp4文件,但格式不同。

To stream an mp4-file you may have to consider that ffserver might have problems to stream in the mp4-format. Still you can stream a mp4-file but in a different Format.

非常简单的方式就是这样:

A very simple way would be like this:

<Stream streamTest.asf>    #ASF as the streaming Format
File "/tmp/video1.mp4"     #or wherever you store your Videos
</Stream>

服务器将文件转换为自己的文件,但如果您真的想在mp4中流式传输,您可能会仔细看看碎片mp4。

The server converts the file on it's own, but if you really want to stream in mp4 you may have to take a closer look at "fragmented mp4".

要观看流,可以使用可以处理asf(我使用VLC)并从URL观看的播放器:

To watch the stream use a player that can handle asf (I used VLC) and watch from URL:

ip-address:port / streamTest.asf

总结

应该说我还在学习ffserver的方式,所以可能会有一些错误:)

It should say that I am also still learning the ways of ffserver, so there might be some mistakes :)

这是从ffserver文档开始的章节的简要摘要。

This is a short summary of the chapters from the ffserver-documentation to get started.

本章中的选项指定您的服务器设置。例如,应该处理多少个并发请求。在你想要流式传输的端口上...对于全新的 ffserver 的人来说,绝大多数的默认值都应该是足够的。

The options in this chapter specify your server settings. For example how many simultaneous requests should be handled. On what port do you want to stream etc... For people who are completely new to ffserver, most of the default-values should be sufficient.

Feed部分是 ffserver 。由于Feed可以服务多个流,因此可能首先构建它。

注意:如果您要
a)直播流
b)未存储在服务器上的流文件
< c)在流媒体之前弄乱文件

The feed section is one of the core parts of ffserver. Since a feed can serve multiple streams it might be useful to build that first.
Note: Feed is only necessary if you want to
a) live stream
b) stream files that are not stored on your server
c) mess around with the file before streaming

这里你可以建立你的自己的流。有很多变量可以更改,我建议您通过添加/自定义选项来缓慢启动。
从这一点上来看,这个文件做得不错。所以现在你知道,你需要什么(再次,我觉得可能性是无数的,但我仍然是一个初学者^^)以及在哪里找到基础。

Here you can actually build your own stream. There are a lot of variables that can be changed and I recommend to start slowly with adding/customizing options. From this point on the documentation does a decent job. So now you know, what you need (again, I feel like the possibilities are countless but I'm still a beginner^^) and where to find the basics.

您的 ffserver.conf 的结构可能(但不一定要这样):

The structure of your ffserver.conf might (but doesn't have to) look like this:

#Options from 5.2
HTTPPort 8090
#...
#Feed (Options from 5.3)
<Feed feed1.ffm>
#...
</Feed>
#
#Stream (Options from 5.4)
<Stream stream1.asf>
Feed feed1.ffm
Format asf
NoAudio
#...
</Stream>

由于这是我的第一篇文章,我希望它不是太混乱:)

Since this is my first post, I hope it is not too chaotic :)

这篇关于mp4流能否使用ffserver?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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