New submission from LÉVAI Dániel <[email protected]>:

After starting ffserver with a simple ffserver.conf attached below, it 
starts fine, and begins to accept connections. I can view the stat.html 
and see the requests on stdout.
However, when I try to feed ffserver with some media, it hangs, the web 
interface becomes unresponsive, I can not request the media with a 
player, cpu load hits the roof, and I must kill ffserver to stop this.
(It won't start working again even after I stop the ffmpeg feeding process)

$ strace ffserver
[...]
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, eve......etc...

$ ffmpeg -r 15 -s 160x112 -i /some/video.flv \
        http://127.0.0.1:8090/videocam.ffm

Then ffserver's strace output looks like this:
[...]
poll([{fd=3, events=POLLIN}], 1, 1000)  = 0 (Timeout)
poll([{fd=3, events=POLLIN}], 1, 1000)  = 1 ([{fd=3, revents=POLLIN}])
accept(3, {sa_family=AF_INET, sin_port=htons(41688), 
sin_addr=inet_addr("127.0.0.1")}, [4294967312]) = 4
fcntl(4, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(4, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, 1000) = 1 
([{fd=4, revents=POLLIN}])
recvfrom(4, "G"..., 1, 0, NULL, NULL)   = 1
recvfrom(4, "E"..., 1, 0, NULL, NULL)   = 1
recvfrom(4, "T"..., 1, 0, NULL, NULL)   = 1
recvfrom(4, " "..., 1, 0, NULL, NULL)   = 1
recvfrom(4, "/"..., 1, 0, NULL, NULL)   = 1
recvfrom(4, "v"..., 1, 0, NULL, NULL)   = 1
recvfrom(4, "i"..., 1, 0, NULL, NULL)   = 1
[...]
open("/mnt/data/.videocam_feed.ffm", O_RDONLY) = 5
lseek(5, 0, SEEK_SET)                   = 0
read(5, "FFM1\0\0\20\0\0\0\0\0\0\0\20\0\0\0\0\1\0\0N 
\0\0\0\5\0\0\0N "..., 4096) = 4096
lseek(5, 0, 0x10000 /* SEEK_??? */)     = -1 EINVAL (Invalid argument)
lseek(5, -1, SEEK_END)                  = 4095
lseek(5, 4096, SEEK_SET)                = 4096
lseek(5, 4096, SEEK_SET)                = 4096
lseek(5, 4100, SEEK_SET)                = 4100
read(5, ""..., 4096)                    = 0
lseek(5, 0, SEEK_SET)                   = 0
lseek(5, 4, SEEK_SET)                   = 4
read(5, "\0\0\20\0\0\0\0\0\0\0\20\0\0\0\0\1\0\0N \0\0\0\5\0\0\0N 
\0\0\0\0"..., 4096) = 4092
brk(0x1ef4000)                          = 0x1ef4000
^C--- SIGINT (Interrupt) @ 0 (0) ---

I hit CTRL+C to stop the ffserver process.

The .videocam_feed.ffm file continously stays the same size (4KiB):
$ ls -l /mnt/data/.videocam_feed.ffm
-rw-r----- [..] 4096 [..] /mnt/data/.videocam_feed.ffm

BTW, it doesn't seem to matter, what file format or videocodec I specify in
ffserver.conf.

---------------#ffserver.conf#---------------
Port 8090
#BindAddress 0.0.0.0
MaxHTTPConnections 2000
MaxClients 1000
MaxBandwidth 1000 # kbit/sec
CustomLog -
NoDaemon

<Feed videocam.ffm>
File /mnt/data/.videocam_feed.ffm
FileMaxSize 200M
ACL allow 127.0.0.1
</Feed>

<Stream videocam.flv>
Feed videocam.ffm

Format flv

VideoBitRate 20
VideoBufferSize 40
VideoFrameRate 15
VideoSize 160x112
VideoGopSize 30
VideoCodec flv

NoAudio

ACL allow 127.0.0.1
ACL allow 192.168.0.1
ACL allow 192.168.0.13
</Stream>

##################################################################
# Special streams
[...]
---------------#ffserver.conf#---------------

----------
messages: 4131
priority: normal
status: new
substatus: new
title: ffserver hangs when trying to feed it
type: bug

____________________________________________________
FFmpeg issue tracker <[email protected]>
<https://roundup.ffmpeg.org/roundup/ffmpeg/issue815>
____________________________________________________

Reply via email to