Yes.
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
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:
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 :)
Edit:
(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)
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>
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".
To watch the stream use a player that can handle asf (I used VLC) and watch from URL:
ip-address:port/streamTest.asf
Summary:
It should say that I am also still learning the ways of ffserver, so there might be some mistakes :)
This is a short summary of the chapters from the ffserver-documentation to get started.
5.2 Global options
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.
5.3 Feed section
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
5.4 Stream section
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.
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 :)