我需要帮助将一个ffmpeg命令转换成一个gstreamer管道。

huangapple go评论55阅读模式
英文:

I need help converting a ffmpeg command to a gstreamer pipeline

问题

我正在尝试使用下面的命令将一个RTSP输入流转换为MPEGTS流:

ffmpeg -i rtsp://{{rtspUrl}} -f mpegts -codec:v mpeg1video -r 30 -

我需要将这个ffmpeg命令转换为一个GStreamer管道,以执行与ffmpeg命令相同的操作。我对ffmpeg和GStreamer都不太了解。提前感谢您的帮助。

我希望减少ffmpeg引起的CPU消耗,因此需要转向GStreamer以能够使用硬件加速。

英文:

I am trying to convert a rtsp input stream to a mpegts stream using the command below

ffmpeg -i rtsp://{{rtspUrl}} -f mpegts -codec:v mpeg1video -r 30 -

I need to convert this ffmpeg command to a gstreamer pipeline which will do the same thing as the ffmpeg command, I am a noob with both ffmpeg and gstreamer. Thanks in advance for your help.

I want to reduce the cpu consumption caused by ffmpeg and hence need to move onto gstreamer to be able to use hardware acceleration.

答案1

得分: 0

Well i have managed to get a pipeline running well and efficiently

gst-launch-1.0 rtspsrc location=rtsp://url latency=0 ! queue ! rtph264depay ! h264parse ! v4l2h264dec ! imxvideoconvert_g2d ! videoconvert ! videorate max-rate=30 ! videoscale ! video/x-raw, width=800, height=600 ! avenc_mpeg1video ! mpegtsmux ! fdsink

I am using IMX hardware decoders here, you may replace them with a suitable option for your case.

I hope this is useful for someone else too.

英文:

Well i have managed to get a pipeline running well and efficiently

gst-launch-1.0 rtspsrc location=rtsp://url latency=0 ! queue ! rtph264depay ! h264parse ! v4l2h264dec ! imxvideoconvert_g2d ! videoconvert ! videorate max-rate=30 ! videoscale ! video/x-raw, width=800, height=600 ! avenc_mpeg1video ! mpegtsmux ! fdsink

I am using IMX hardware decoders here, you may replace them with a suitable option for your case.

I hope this is useful for someone else too.

huangapple
  • 本文由 发表于 2023年3月1日 13:05:51
  • 转载请务必保留本文链接:https://go.coder-hub.com/75599772.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定