Answer the question
In order to leave comments, you need to log in
How to setup ffserver for mp4 streaming?
It is necessary to broadcast video from ip-cameras to a web page. Of the available options, it seemed to me the simplest option with a bunch of ffserver and ffmpeg. Perhaps erroneously.
First set up to receive video via html stream in mjpeg format:
File "ffserver.conf"
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 200M
</Feed>
<Stream feed1.mjpg>
Feed feed1.ffm
Format mpjpeg
NoAudio
</Stream>
ffserver -d -f /etc/ffserver.conf
ffmpeg -f mjpeg -i "http://10.1.1.60:80/axis-cgi/mjpg/video.cgi?resolution=640x480" -c copy http://127.0.0.1:8090/feed1.ffm"
<Feed feed1.ffm>
File /tmp/feed1.ffm
FileMaxSize 200M
</Feed>
<Stream feed1.mp4>
Feed feed1.ffm
Format mp4
NoAudio
</Stream>
ffserver -d -f /etc/ffserver.conf
ffmpeg -i "rtsp://10.1.1.60:554/axis-media/media.amp?videocodec=h264&resolution=640x480" -acodec copy -vcodec copy "http://127.0.0.1:8090/feed1.ffm"
Fri Jun 24 02:32:36 2016 10.1.1.41 - - New connection: GET /feed1.mp4
Fri Jun 24 02:32:36 2016 Codec for stream 0 does not use global headers but container format requires global headers
Fri Jun 24 02:32:36 2016 muxer does not support non seekable output
Fri Jun 24 02:32:36 2016 Error writing output header
Fri Jun 24 02:32:36 2016 10.1.1.41 - - [GET] "/feed1.mp4 HTTP/1.1" 200 68
ffmpeg -i "rtsp://10.1.1.60:554/axis-media/media.amp?videocodec=h264&resolution=640x480" -acodec copy -vcodec copy "/tmp/test.mp4"
Answer the question
In order to leave comments, you need to log in
The problem is in the mp4 format, which cannot be streamed.
"muxer does not support non seekable output".
You can use ogg or webm.
Or cut the stream into mp4 pieces and feed them to the player - but that's another story.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question