[英]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.