FORUMS: list search recent posts

Buffer underflow, delay and many interruptions

COW Forums : FFmpeg

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Grischa Stanjek
Buffer underflow, delay and many interruptions
on Feb 21, 2011 at 11:47:54 pm

Hey there!
I'm using ffmpeg to transcode a mpeg stream via rtsp into a flv stream. It's a webcam which should be part of a website. Unfortunately the playback is not smooth. It's delayed and interrupting every few seconds... I also get a buffer underflow.
Here is my code and output:

# ffmpeg -an -r 5 -vcodec mpeg4 -i rtsp://****.dyndns.tv:554/live.sdp -vcodec flv -sameq -r 5 -an http://127.0.0.1:8090/feed1.ffm
FFmpeg version 0.6.1, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 28 2011 04:42:21 with gcc 4.3.2
configuration: --prefix=/usr/local --enable-gpl --enable-nonfree
libavutil 50.15. 1 / 50.15. 1
libavcodec 52.72. 2 / 52.72. 2
libavformat 52.64. 2 / 52.64. 2
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.11. 0 / 0.11. 0
[rtsp @ 0x2e9d440]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 3000.00 (3000/1)
Input #0, rtsp, from 'rtsp://****.dyndns.tv:554/live.sdp':
Metadata:
title : RTSP server
Duration: N/A, start: 0.015333, bitrate: N/A
Stream #0.0: Video: mpeg4, yuv420p, 352x288 [PAR 1:1 DAR 11:9], 3k tbr, 90k tbn, 1k tbc
Output #0, ffm, to 'http://127.0.0.1:8090/feed1.ffm':
Metadata:
encoder : Lavf52.64.2
Stream #0.0: Video: flv, yuv420p, 352x288, q=2-31, 256 kb/s, 1000k tbn, 5 tbc
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[flv @ 0x2ea5460]rc buffer underflow
frame= 2502 fps= 5 q=2.0 size= 2172kB time=500.40 bitrate= 35.6kbits/s dup=1494 drop=9983


Any ideas? Thanks for your help!


Return to posts index

Michael Rampe
Re: Buffer underflow, delay and many interruptions
on Mar 3, 2011 at 9:27:06 pm

[Grischa Stanjek] "Unfortunately the playback is not smooth. It's delayed and interrupting every few seconds... I also get a buffer underflow."

Have you tried different bitrates?
Have you tried different codecs?
Have you tried different framerates?

Buffer underflow means there is too much information, ie. cannot be encoded.

I would try to specify a [higher] bitrate or -qmax instead of using -sameq as this might fix your buffering problem.

Michael


Return to posts index

Steven Nagels
Re: Buffer underflow, delay and many interruptions
on Apr 8, 2013 at 3:12:22 pm

Hi all,

I realize this is a very late reply but I found a solution for this problem and want to put it out there.
We also had this error popping up every time we would use FFmpeg and later found out that this was due to a problem of the program to access the webcam at sufficient speeds. We were using a cheap USB hub to combine the webcam, a USB mouse and a USB keyboard to one USB slot. In many cases, these hubs are still using the USB 1.1 protocol, which caused a bottleneck in data transport from webcam to program and thus was the origin of the buffer underflow problems...

In short: make sure your webcam is connected directly to your system (without hub's in between) when confronted with this buffer underflow problem!

Kind regards


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]