[FFmpeg-trac] #748(avformat:new): av_read_frame() returns error while streaming mp3

FFmpeg trac at avcodec.org
Wed Dec 14 19:07:49 CET 2011

#748: av_read_frame() returns error while streaming mp3
             Reporter:  blarson      |                    Owner:
                 Type:  defect       |                   Status:  new
             Priority:  normal       |                Component:  avformat
              Version:  0.8.7        |               Resolution:
             Keywords:               |               Blocked By:
  av_read_frame, ffplay              |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |

Comment (by Cigaes):

 -i is just the option to select the input URL. -re tells ffmpeg to work
 slower than it could to emulate the speed of the contents itself.

 If you control the web server, then you really must fix it, it will cause
 other problems than that, and fixing it will help you regulate your

 But you need _also_ to work around the problem in your program. For that,
 you need two things:

 - A bigger buffer than the small one inside lavf: you do not need the
 whole file, but mobile apps should be able to handle a few seconds of
 network hiccup.

 - A reconnect feature: if the stream ends before it should, create a new
 one and seek to the last position.

 Note that both the buffer and the reconnect would IMHO be valuable
 additions to ffmpeg's API.

Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/748#comment:7>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker

More information about the FFmpeg-trac mailing list