6

I'm trying to stream video from the camera module using ffserver. My server configuration is

HTTPPort 8090
HTTPBindAddress 0.0.0.0
MaxHTTPConnections 8
MaxClients 4
MaxBandwidth 1000
CustomLog -
#NoDaemon

<Feed feed1.ffm>
    File /tmp/feed1.ffm
    FileMaxSize 5M
    ACL allow 127.0.0.1
</Feed>

<Stream live.flv>
    Feed feed1.ffm
    NoAudio
</Stream>

##################################################################
# Special streams
##################################################################
<Stream stat.html>
    Format status
    # Only allow local people to get the status
    ACL allow localhost
    ACL allow 192.168.0.0 192.168.255.255
</Stream>

# Redirect index.html to the appropriate site
<Redirect index.html>
    URL http://www.ffmpeg.org/
</Redirect>
##################################################################

I run

ffserver -f server.conf &

and then

raspivid -t 0 -w 640 -h 480 -b 1024000 -fps 5 -ih -n -o - | \
  ffmpeg -i - -c:v copy -r 5 -an -f flv -override_ffserver \
  http://localhost:8090/feed1.ffm

However ffmpeg complains

[flv @ 0x215e520] Timestamps are unset in a packet for stream 0. This is deprecated and will stop working in the future. Fix your code to set the timestamps properly
Thu Mar  3 02:58:36 2016 127.0.0.1 - - [POST] "/feed1.ffm HTTP/1.1" 200 276
av_interleaved_write_frame(): Connection reset by peer
[flv @ 0x215e520] Failed to update header with correct duration.
[flv @ 0x215e520] Failed to update header with correct filesize.
Error writing trailer of http://localhost:8090/feed1.ffm: Connection reset by peer

and then quit.

How do I fix this?

BTW, I tested raspivid and ffmpeg with something like

raspivid -t 0 -w 640 -h 480 -o - | ffmpeg -i - -c:v copy test.mkv

and it worked normally.

MetroWind
  • 161
  • 5

1 Answers1

1

My guess is that this issue is occurring because a format is not specified in your server configuration, as is done here and here.

For example, you could edit the <Stream> to include the swf format:

<Stream live.flv>
    Feed feed1.ffm
    Format swf
    NoAudio
</Stream>