[FFmpeg-user] ffplay + rtsp vs. ffmpeg + rtsp

Sébastien GILLES segilles04 at yahoo.fr
Thu Jun 14 17:57:59 CEST 2012

Hi Folks,

I noticed a strange behaviour with ffplay reading an RTSP stream (which in
my case delivers MPEG-TS containing H264 or other). 

If I run: ./ffplay
then after a successful codec detection and initial frame pulling, RTP
packets are missed, H264 falls down and image freezes randomly. The video
then keeps jitterring. 

I then click in the ffplay window (triggering a stream_seek()), the video
then stumble 1sec and then runs perfectly smoothly ! It seems like this
forces some kind of frame/packet drop which helps ffplay recover. 

If run ./ffmpeg
-vcodec copy -t 10 -y file.ts, things work fine: there are a few warnings
but the stream reading and encoding work like a charm. 

I got into this because I am integrating live555 and ffmpeg: in my setup, TS
packets are pulled from the RTSP stream by live555 and pushed to ffmpeg for
demuxing. I experience the same issues as with ffplay (codec detection and
initial frame pulling works fine, but things deteriorate after 10s roughly).

So basically my questions are:
- is anyone aware of issues with ffplay not reading properly RTSP streams
that ffmpeg supports ? Are not both programs using the same reading/access
routines ? 
- why would a forced stream_seek() (through mouse click) fix the reading
issue of ffplay ? 
- before passing TS packets to ffmpeg (I am using an AVIOAllocContext
object), is there any kind of TS packet reordering needed ?


=== my config:
ffplay version 0.10.3 Copyright (c) 2003-2012 the FFmpeg developers
  built on Jun 14 2012 16:38:06 with gcc 4.6.3
  configuration: --enable-decoder=h264 --enable-decoder=mjpeg --enable-gpl
--enable-decoder=h264 --enable-decoder=mjpeg --enable-network
--enable-protocol=tcp --enable-demuxer=rtsp --enable-ffplay --disable-yasm
--disable-zlib --disable-bzlib --disable-vda
  libavutil      51. 35.100 / 51. 35.100
  libavcodec     53. 61.100 / 53. 61.100
  libavformat    53. 32.100 / 53. 32.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 61.100 /  2. 61.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  6.100 /  0.  6.100
  libpostproc    52.  0.100 / 52.  0.100

View this message in context: http://ffmpeg-users.933282.n4.nabble.com/ffplay-rtsp-vs-ffmpeg-rtsp-tp4650912.html
Sent from the FFmpeg-users mailing list archive at Nabble.com.

More information about the ffmpeg-user mailing list