Muhammet Ilendemli
Muhammet Ilendemli

Reputation: 126

ffmpeg command to GStreamer pipeline for srtp stream

I would like to convert this working ffmpeg command to a GStreamer pipeline but I couldn't manage to get it working. Tried using srtpenc toset the key to a hex representation of the buffer and udpsink with the target host and port set.

The command I currently have:

ffmpeg -re -i <<rtspurl>> -map 0:0 -vcodec h264_omx -pix_fmt yuv420p \
  -r 30 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 300k \
  -bufsize 300k -payload_type 99 -ssrc <<ssrc>> \
  -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 \
  -srtp_out_params <<base64key>> srtp://<<targetip>>:<<targetport>>?rtcpport=<<targetport>>&localrtcpport=<<targetport>>&pkt_size=1378

Some references:

Upvotes: 0

Views: 2614

Answers (3)

Ahmed Saber
Ahmed Saber

Reputation: 9

need help to convert FFmpeg command to GStreamer command, please

ffmpeg -i m3u8 url -c copy -bsf:a aac_adtstoasc -t 00:00:10 001stream.mp4

Upvotes: 0

Muhammet Ilendemli
Muhammet Ilendemli

Reputation: 126

For future reference, here is the pipeline i used in the end:

gst-launch-1.0 rtspsrc location=<<rtsp url>> latency=0 ! \
  videoconvert ! \
  videoscale ! \
  videorate ! \
  video/x-raw, height=<<height>>, width=<<width>>, framerate=<<fps>>/1 !\
  v4l2h264enc ! \
  rtph264pay pt=99 mtu=1378 ssrc=<<ssrc>> ! \
  srtpenc key=<<key in hex>> ! \
  udpsink host=<<targetip>> port=<<targetport>>

Upvotes: 1

Olivier Cr&#234;te
Olivier Cr&#234;te

Reputation: 11

Something like:

gst-launch-1.0 uridecodebin uri=<<rtsp url>> ! videoconvert ! videoscale ! \
  videorate ! video/x-raw, height=720, width=1270, framerate=30/1 ! \
  omxh264enc b-frames=0 target-bitrate=300000 ! \
  rtph264pay pt=99 mtu=1378 ssrc=<<ssrc>> ! srtpenc key=<<key in hex>> ! \
  udpsink host=<<targetip>> port=<<targetport>>

Upvotes: 1

Related Questions