Because I need to output the RTSP stream pulled from the GStreamer command line to my Python program, I use the fdsink
element to output the byte-stream from the pipeline.
The video can be displayed correctly by using the xvimagesink
element. The command line is as follows.
gst-launch-1.0 rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! queue2 ! rtph264depay ! capsfilter caps="video/x-h264, width=240, height=160" ! avdec_h264 ! videoconvert ! xvimagesink
Then I use fdsink
instead of the xvimagesink
element to output the byte stream from the pipeline and play it with ffplay. It can't display correct video. The command line is as follows.
gst-launch-1.0 rtspsrc location=rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mp4 ! queue2 ! rtph264depay ! capsfilter caps="video/x-h264, width=240, height=160" ! avdec_h264 ! videoconvert ! fdsink | ffplay -f rawvideo -pixel_format rgb24 -video_size 240*160 -i -
So is fdsink
element wrong or other elements wrong? Thank you for taking the time to help me solve the problem