[FFmpeg-user] Activating RTCP feedback with FFMpeg for VP8 rtp

Pierrick Grasland pierrick.grasland at gmail.com
Fri Aug 9 18:02:14 CEST 2013


Hello,

I'm trying to receive a vp8 / G711µ rtp stream with FFMpeg.

My SDP is the following :

v=0
o=- 1376063087593 1 IN IP4 127.0.0.1
s=-
t=0 0
m=audio 50008 RTP/AVP 0
c=IN IP4 192.168.2.196
a=rtcp:50009 IN IP4 192.168.2.196
a=rtpmap:0 PCMU/8000
a=sendrecv
m=video 50010 RTP/AVP 120
c=IN IP4 192.168.2.196
a=rtcp:50011 IN IP4 192.168.2.196
a=rtpmap:120 VP8/90000
a=sendrecv
a=rtcp-fb:* nack
a=rtcp-fb:* ccm fir


FFMpeg will correctly start, using the following command : ffmpeg
-reorder_queue_size 64 -analyzeduration 15000000 -probesize 50000000 -i
3.sdp -f webm {1}.webm -ss 00:00:01.000 -f image2 -vframes 1 {1}.jpg ({1}
is replaced by the correct output filename).

ffmpeg version N-51976-g8f3c440 Copyright (c) 2000-2013 the FFmpeg
developers
built on Apr 25 2013 19:24:31 with gcc 4.4.5 (Debian 4.4.5-8)
configuration: --enable-gpl --enable-libtheora --enable-libvorbis
--enable-libvpx --enable-nonfree --enable-version3 --enable-libopus
--enable-libx264
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 53.101 /  3. 53.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100


[sdp @ 0x218b800] Estimating duration from bitrate, this may be inaccurate
Guessed Channel Layout for  Input Stream #0.0 : mono
Input #0, sdp, from
'/home/pierrick/wsrtc-distribution-0.8.8-ZeWall-r8899/sdp/3.sdp':
  Metadata:
    title           : -
  Duration: 00:00:00.04, start: 0.000000, bitrate: 63 kb/s
    Stream #0:0: Audio: pcm_mulaw, 8000 Hz, mono, s16, 64 kb/s
    Stream #0:1: Video: vp8, yuv420p, 480x640, 90k tbr, 90k tbn, 90k tbc
[auto-inserted scaler 0 @ 0x21f0d00] The <w>:<h>:flags=<flags> option
syntax is deprecated. Use either <w>:<h>:<flags> or
w=<w>:h=<h>:flags=<flags>.
[image2 @ 0x218f880] Frame rate very high for a muxer not efficiently
supporting it.
Please consider specifying a lower framerate, a different muxer or -vsync 2
[libvpx @ 0x21efd00] v1.0.0
Output #0, webm, to 'call_fx_1_3_2013-08-09_17-44-47.webm':
  Metadata:
    title           : -
    encoder         : Lavf55.2.100
    Stream #0:0: Video: vp8, yuv420p, 480x640, q=-1--1, 200 kb/s, 1k tbn,
90k tbc
    Stream #0:1: Audio: vorbis, 8000 Hz, mono, fltp
Output #1, image2, to 'call_fx_1_3_2013-08-09_17-44-47.jpg':
  Metadata:
    title           : -
    encoder         : Lavf55.2.100
    Stream #1:0: Video: mjpeg, yuvj420p, 480x640, q=2-31, 200 kb/s, 90k
tbn, 90k tbc
Stream mapping:
  Stream #0:1 -> #0:0 (vp8 -> libvpx)
  Stream #0:0 -> #0:1 (pcm_mulaw -> libvorbis)
  Stream #0:1 -> #1:0 (vp8 -> mjpeg)
Press [q] to stop, [?] for help

For some minutes (between 30 s and 3 minutes), this works fine, generating
this kind of output :

frame= 3868 fps= 27 q=0.0 q=0.0 size=    4044kB time=00:02:21.86 bitrate=
233.5kbits/s dup=0 drop=3837
frame= 3885 fps= 27 q=0.0 q=0.0 size=    4057kB time=00:02:22.44 bitrate=
233.3kbits/s dup=0 drop=3854
frame= 3900 fps= 27 q=0.0 q=0.0 size=    4067kB time=00:02:22.98 bitrate=
233.0kbits/s dup=0 drop=3869
frame= 3906 fps= 27 q=0.0 q=0.0 size=    4071kB time=00:02:23.53 bitrate=
232.4kbits/s dup=0 drop=3875


But, after a delay, I'm encountering a packet loss (due to using WiFi) and
FFMpeg generate one of the following message :
- Received no start marker; dropping frame
- Missed a picture, sequence broken.

The output will now be this :

frame= 3907 fps= 27 q=0.0 q=0.0 size=    4072kB time=00:02:24.03 bitrate=
231.6kbits/s dup=0 drop=3876
frame= 3907 fps= 27 q=0.0 q=0.0 size=    4072kB time=00:02:24.54 bitrate=
230.8kbits/s dup=0 drop=3876
frame= 3907 fps= 27 q=0.0 q=0.0 size=    4072kB time=00:02:25.05 bitrate=
230.0kbits/s dup=0 drop=3876
frame= 3907 fps= 27 q=0.0 q=0.0 size=    4072kB time=00:02:25.60 bitrate=
229.1kbits/s dup=0 drop=3876

And my webm file show a freeze at this time, and doesn't appear to restart
correctly after (freeze can be up to several minutes).


Analyzing my network with wireshark will show that my loss are limited to
one or two packets only, but the wrong one.

I found with google that I can use RTCP feedback for VP8, which seems to be
possible with FFMpeg :

http://ffmpeg.org/pipermail/ffmpeg-cvslog/2013-January/059123.html
http://ffmpeg.org/doxygen/trunk/structRTSPStream.html#a9f61d90f147f37ed608f1d151fdcdde8

How can I activate RTCP feedback ? Does this support NACK / PLI / FIR
request ?

Regards,
-- 
Pierrick Grasland


More information about the ffmpeg-user mailing list