dv1 / gstrtpfec

RTP forward error correction encoding plugin for GStreamer 0.10.36
GNU Lesser General Public License v2.1
13 stars 8 forks source link

Pipeline examples needed #1

Open ilya-a-sergeyev opened 9 years ago

ilya-a-sergeyev commented 9 years ago

I want to try to use gstrtpfec plugin, but my pipeline gst-launch v4l2src device=/dev/video0 ! "video/x-raw-yuv,width=320,heigh=240,framerate=15/1" ! queue ! x264enc bitrate=500 ! rtph264pay ! rtpfecenc ! multiudpsink do not work. What i do wrong?

rstanislav commented 9 years ago

Yeah, this plugin is very nice but there is no info about how to use it - it would be nice if Dv1 could comment on how to use it.

dv1 commented 9 years ago

Sorry, I am currently very busy in other projects. The plugins produce out-of-band FEC packets that need to be transmitted through a separate port. Like this:

Sender: gst-launch audiotestsrc ! opusenc ! rtpopuspay ! rtpfecenc name=fec fec.src ! queue ! udpsink host=127.0.0.1 port=15000 fec.fec ! queue ! udpsink host=127.0.0.1 port=15001

Receiver: gst-launch rtpfecdec name=fec ! gstrtpjitterbuffer ! rtpopusdepay ! opusdec ! alsasink udpsrc port=15000 ! fec.src udpsrc port=15001 ! fec.fec

I cannot test these pipelines right now, since I have no GStreamer 0.10 installation here.

I've been working on and off on a successor for these plugins based on the IETF FECFrame architecture, which is better suited for these tasks anyway.

cnasenbe commented 9 years ago

I just tested the pipelines provided by dv1, and there is just one little error in the receiver pipeline. I think it is supposed to be "fec.sink" instead of "fec.src".

This worked for me (caps have to be adjusted as the receiver prints out the information for GstUDPSink:udpsink0 and GstUDPSink:udpsink1 by the sender): Sender: gst-launch-0.10 -v audiotestsrc ! opusenc ! rtpopuspay ! rtpfecenc name=fec fec.src ! queue ! udpsink host=teller port=15000 fec.fec ! queue ! udpsink host=localhost port=15001

Receiver: gst-launch-0.10 -v rtpfecdec name=fec ! gstrtpjitterbuffer ! rtpopusdepay ! opusdec ! alsasink udpsrc port=15000 caps="application/x-rtp, media=(string)audio, clock-rate=(int)48000, encoding-name=(string)X-GST-OPUS-DRAFT-SPITTKA-00, payload=(int)96, ssrc=(uint)950073154, clock-base=(uint)639610336, seqnum-base=(uint)55488" ! fec.sink udpsrc port=15001 caps="application/x-rtp, media=(string)audio, payload=(int)99, clock-rate=(int)48000, encoding-name=(string)parityfec" ! fec.fec

Another example for raw video transmission (RFC 4175) and 2D Parity FEC: (Same for caps as above) Sender: gst-launch-0.10 -v videotestsrc ! video/x-raw-rgb,format=(string)RGB,width=500,height=500,framerate=5/1 ! ffmpegcolorspace ! rtpvrawpay ! rtpfecenc name=fec fec.src ! queue ! udpsink host=localhost port=15000 fec.fec ! queue ! udpsink host=localhost port=15001

Receiver: gst-launch-0.10 rtpfecdec name=fec ! gstrtpjitterbuffer ! rtpvrawdepay ! ffmpegcolorspace ! fpsdisplaysink udpsrc port=15000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)RAW, sampling=(string)RGB, depth=(string)8, width=(string)500, height=(string)500, colorimetry=(string)SMPTE240M, payload=(int)96, ssrc=(uint)190765108, clock-base=(uint)1626056930, seqnum-base=(uint)49901" ! fec.sink udpsrc port=15001 caps="application/x-rtp, media=(string)video, payload=(int)99, clock-rate=(int)90000, encoding-name=(string)parityfec" ! fec.fec

Thanks for the work you put into the plugin!

NinoGi commented 8 years ago

Hi, I would like to hear this program with 2D parity and LDPC, someone has already tried? how can I change it?

dv1 commented 8 years ago

First: this plugin is abandoned, since I am not doing anything with 0.10 anymore. I started a successor here: https://github.com/dv1/gstfecframe . Its Reed-Solomon FECFRAME implementation is working, but has issues when used together with rtpjitterbuffer. Second: LDPC could in theory be implemented, but for packet based communications, I question its use. There are not nearly enough symbols per second to benefit from the advantages of LDPC or raptor codes etc.

NinoGi commented 8 years ago

Thank you for your answer. I'm using this plugin to send a video, and it works very well. Can I have an example of the command client-server for plugin gstfecframe ?

it is possible to implement 2D parity matrix in gstrtpfec or gstfecframe?

openserli commented 7 years ago

@NinoGi hi have you try this plugin ? how many rtp lost when you test it?