简体   繁体   English

如何使用带有翻转选项的gst-launch流媒体直播视频

[英]how to stream a live video using gst-launch with fliping option

I am trying to steam a live video which I am playing from a server .. this server uses Gstreamer so I figured let me use gst-launch to play it. 我正在尝试从服务器播放实时视频,该服务器使用Gstreamer,所以我想让我使用gst-launch来播放它。 Now I need to play it and at the same time flip the video because the streaming I am getting is upside down. 现在,我需要播放它,同时翻转视频,因为我得到的流媒体颠倒了。 I have successfully done that using vlc, but not so using gst-launch !!! 我已经成功地使用vlc做到了这一点,但是使用gst-launch却没有!

this is the command in gstreamer : 这是gstreamer中的命令:

gst-launch  playbin uri=file:///home/Desktop/video.sdp ! videoflip method=clockwise ! ffmpegcolorspace ! ximagesink

and I get this error: 我得到这个错误:

WARNING: erroneous pipeline: could not link playbin0 to videoflip0

Also, I would like to ask if anyone know how to reduce the latency in a live streaming and avoid the lagging in buffering! 此外,我想问问是否有人知道如何减少实时流的延迟并避免缓冲滞后!

You can try 你可以试试

gst-launch uridecodebin uri=file:///home/Desktop/video.sdp ! ffmpegcolorspace ! videoflip method=clockwise ! ffmpegcolorspace ! autovideosink

Uridecodebin will parse and decode your input until raw format, while playbin is a full pipeline and has no pads to link to, it will handle decoding (it uses uridecodebin internally) and displaying the media to you. Uridecodebin将解析并解码您的输入直到原始格式,而playbin是完整的管道并且没有可链接的填充板,它将处理解码(内部使用uridecodebin)并向您显示媒体。 It has to be used as standalone element. 它必须用作独立元素。 You can try this, though: 您可以尝试以下操作:

gst-launch playbin2 uri=file:///home/Desktop/video.sdp video-sink="videoflip method=clockwise ! ffmpegcolorspace ! autovideosink"

It might work, too. 它也可能起作用。

try it : gst-launch filesrc location=/home/Desktop/video.sdp ! 尝试一下:gst-launch filesrc location = / home / Desktop / video.sdp! sdpdemux ! sdpdemux! videoflip method=vertical-flip ! videoflip method = vertical-flip! ffmpegcolorspace ! ffmpegcolorspace! ximagesink ximagesink

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

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