繁体   English   中英

用于 srtp 流的 GStreamer 管道的 ffmpeg 命令

[英]ffmpeg command to GStreamer pipeline for srtp stream

我想将这个有效的 ffmpeg 命令转换为 GStreamer 管道,但我无法让它工作。 尝试使用 srtpenc 将密钥设置为缓冲区和 udpsink 的十六进制表示,并设置目标主机和端口。

我目前拥有的命令:

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

一些参考:

就像是:

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>>

需要帮助将 FFmpeg 命令转换为 GStreamer 命令,请

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

为了将来参考,这是我最后使用的管道:

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>>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM