Search code examples
videovideo-streamingmedia-playergstreamerlive-streaming

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

this is the command in 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!


Solution

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