Opened 10 years ago

Closed 7 years ago

#4309 closed defect (invalid)

audio becomes delayed after a couple of days

Reported by: ill Owned by:
Priority: normal Component: ffserver
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: After a couple of days of using ffmpeg to stream a webcam, the audio gradually becomes more and more delayed, up to 20 seconds, until it seems to cut out entirely. I tried adding -af "aresample=async=1000" but that doesn't work.
How to reproduce: run ffmpeg

% ffmpeg -i input ... output
ffmpeg version
built on ...

Patches should be submitted to the ffmpeg-devel mailing list and not this bug tracker.

ffserver version N-69420-g2ff7e81 Copyright (c) 2000-2015 the FFmpeg developers

built on Feb 1 2015 15:24:03 with gcc 4.8 (SUSE Linux)
configuration: --enable-libfreetype --enable-libfontconfig --enable-libpulse
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.101 / 56. 21.101
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 9.102 / 5. 9.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100

/etc/ffserver.conf:5: Port option is deprecated. Use HTTPPort instead.
/etc/ffserver.conf:9: BindAddress option is deprecated. Use HTTPBindAddress instead.
/etc/ffserver.conf:60: Setting default value for video bit rate tolerance = 1000000. Use NoDefaults to disable it.
/etc/ffserver.conf:60: Setting default value for video rate control equation = texqComp. Use NoDefaults to disable it.
/etc/ffserver.conf:60: Setting default value for video max rate = 8000000. Use NoDefaults to disable it.
/etc/ffserver.conf:60: Setting default value for video buffer size = 8000000. Use NoDefaults to disable it.
/etc/ffserver.conf:83: Setting default value for video bit rate = 64000. Use NoDefaults to disable it.
/etc/ffserver.conf:83: Setting default value for video bit rate tolerance = 32000. Use NoDefaults to disable it.
/etc/ffserver.conf:83: Setting default value for video rate control equation = tex
qComp. Use NoDefaults to disable it.
/etc/ffserver.conf:83: Setting default value for video max rate = 128000. Use NoDefaults to disable it.
/etc/ffserver.conf:83: Setting default value for video buffer size = 128000. Use NoDefaults to disable it.
/etc/ffserver.conf:95: Setting default value for video bit rate = 64000. Use NoDefaults to disable it.
/etc/ffserver.conf:95: Setting default value for video bit rate tolerance = 64000. Use NoDefaults to disable it.
/etc/ffserver.conf:95: Setting default value for video rate control equation = texqComp. Use NoDefaults to disable it.
/etc/ffserver.conf:95: Setting default value for video max rate = 128000. Use NoDefaults to disable it.
/etc/ffserver.conf:95: Setting default value for video buffer size = 128000. Use NoDefaults to disable it.
Sat Feb 14 11:26:25 2015 FFserver started.

~/src/ffmpeg/ffmpeg -f pulse -i default -f video4linux2 -input_format mjpeg -s 960x720 -r 5 -i /dev/video0 -map 0:a -map 1:v http://127.0.0.1:8090/cam.ffm -f segment -segment_time 3600 -segment_atclocktime 1 -reset_timestamps 1 -r 5 -s 640x480 -af "aresample=async=1000" -vf "drawtext='fontfile=/usr/share/fonts/truetype/DejaVuSans.ttf:fontcolor=white:fontsize=30:x=1:y=2:shadowx=1:shadowy=1:text=%{localtime\:%Y-%m-%d %H

\:%M

\:%S}'" -strftime 1 "/media/cam/%Y-%m-%d_%H-%M.avi"
ffmpeg version N-69420-g2ff7e81 Copyright (c) 2000-2015 the FFmpeg developers

built on Feb 1 2015 15:24:03 with gcc 4.8 (SUSE Linux)
configuration: --enable-libfreetype --enable-libfontconfig --enable-libpulse
libavutil 54. 18.100 / 54. 18.100
libavcodec 56. 21.101 / 56. 21.101
libavformat 56. 19.100 / 56. 19.100
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 9.102 / 5. 9.102
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 1.100 / 1. 1.100

Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, pulse, from 'default':

Duration: N/A, start: 1423938496.797812, bitrate: 1536 kb/s

Stream #0:0: Audio: pcm_s16le, 48000 Hz, 2 channels, s16, 1536 kb/s

Input #1, video4linux2,v4l2, from '/dev/video0':

Duration: N/A, start: 1107087.285069, bitrate: N/A

Stream #1:0: Video: mjpeg, yuvj422p(pc, bt470bg/unknown/unknown), 960x720, 0 kb/s, 5 fps, 5 tbr, 1000k tbn, 1000k tbc

[swscaler @ 0x3784b80] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x3770760] deprecated pixel format used, make sure you did set range correctly
[swscaler @ 0x37f71c0] deprecated pixel format used, make sure you did set range correctly
Output #0, ffm, to 'http://127.0.0.1:8090/cam.ffm':

Metadata:

creation_time : now
encoder : Lavf56.19.100
Stream #0:0: Video: flv1 (flv), yuv420p, 960x720, q=5-15, 4000 kb/s, 5 fps, 1000k tbn, 5 tbc
Metadata:

encoder : Lavc56.21.101 flv

Stream #0:1: Video: mjpeg, yuvj422p(pc), 960x720, q=1-5, 64 kb/s, 5 fps, 1000k tbn, 2 tbc
Metadata:

encoder : Lavc56.21.101 mjpeg

Stream #0:2: Video: mjpeg, yuvj422p(pc), 480x320, q=10-20, 64 kb/s, 5 fps, 1000k tbn, 1 tbc
Metadata:

encoder : Lavc56.21.101 mjpeg

Output #1, segment, to '/media/cam/%Y-%m-%d_%H-%M.avi':

Metadata:

encoder : Lavf56.19.100
Stream #1:0: Video: mpeg4, yuv420p, 640x480, q=2-31, 200 kb/s, 5 fps, 5 tbn, 5 tbc
Metadata:

encoder : Lavc56.21.101 mpeg4

Stream #1:1: Audio: ac3, 48000 Hz, stereo, fltp, 192 kb/s
Metadata:

encoder : Lavc56.21.101 ac3

Stream mapping:

Stream #1:0 -> #0:0 (mjpeg (native) -> flv1 (flv))
Stream #1:0 -> #0:1 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #0:2 (mjpeg (native) -> mjpeg (native))
Stream #1:0 -> #1:0 (mjpeg (native) -> mpeg4 (native))
Stream #0:0 -> #1:1 (pcm_s16le (native) -> ac3 (native))

Press [q] to stop, ? for help
[mjpeg @ 0x37c55a0] rc buffer underflow
[mjpeg @ 0x37cc340] rc buffer underflow
[mjpeg @ 0x37c55a0] rc buffer underflow

Last message repeated 1 times

frame= 4 fps=0.0 q=2.0 q=31.2 q=13.9 q=2.0 size= 308kB time=00:00:02.00 bitrate=1261.6kbits/s dup=0 drop=1 [mjpeg @ 0x37c55a0] rc buffer underflow
frame= 6 fps=6.0 q=2.0 q=31.4 q=14.3 q=2.0 size= 324kB time=00:00:03.00 bitrate= 884.7kbits/s dup=0 drop=3 [mjpeg @ 0x37c55a0] rc buffer underflow

Change History (3)

comment:1 by Michael Niedermayer, 10 years ago

Keywords: ffserver added

comment:2 by Elon Musk, 9 years ago

Component: undeterminedffserver
Keywords: ffserver removed

comment:3 by Rostislav Pehlivanov, 7 years ago

Resolution: invalid
Status: newclosed

ffserver was removed from git master, closing bug as invalid.
If issue still happens with ffmpeg feel free to reopen the bug

Note: See TracTickets for help on using tickets.