GStreamer - change resolution for RSTP stream

813 Views Asked by At

It works to convert RTSP stream to flv stream, but I can't change resolution using below command

gst-launch-1.0  rtspsrc location=$RTSP_SOURCE latency=0  ! rtpbin ! rtph264depay ! h264parse ! avdec_h264 ! videoconvert ! videoscale ! video-x/raw,width=640,height=640 ! x264enc ! h264parse ! flvmux streamable=true ! rtmpsink  location=$RTMP_SERVER

The pipeline shows an error saying that it could not link videoscale0 to x264enc0, neither element can handle caps video-x/raw, width=(int)640, height=(int)640

1

There are 1 best solutions below

1
Florian Zwoch On

The media type should be video/x-raw and not video-x/raw.