Ffmpeg Testing Streaming to Stream
ffprobe -i rtsp://10.8.253.69:554/MediaInput/mpeg4
Output:
Input #0, rtsp, from 'rtsp://10.8.253.69:554/MediaInput/mpeg4':
Metadata:
title : Media Presentation
Duration: N/A, start: 0.600667, bitrate: N/A
Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1920x1080, 10 fps, 10 tbr, 90k tbn, 20 tbc
But, if your aim is to obtain raw YUV in OpenCV, the answer is "not possible".
OpenCV is hardcoded to convert every input format to BGR, so even if you will be able to open the raw input, it will automatically convert it to BGR before passing it. No chance to solve that, the only way is to use a different capture library or hack into OpenCV.
What you can do (to simulate YUV input) is to capture the avi, convert to YUV.
Following command works:
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -vf scale=640:-1 -vcodec libx264 -vb 150000 -g 60 -vprofile baseline -level 2.1 -acodec aac -ab 64000 -ar 48000 -ac 2 -vbsf h264_mp4toannexb -strict experimental -f mpegts udp://127.0.0.1:10000?pkt_size=1316
Tried the following commands but did not have great results:
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -id3v2_version 3 out.mp3
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -f avi -y out.avi
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -r 10 -f mulaw -f rstp rtp://127.0.0.1:1234
ffmpeg -i input.jpg -vf scale=640:-1 output_320.png
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -vf scale=640:-1 -f mp4 -y out.mp4
ffmpeg -i rtsp://10.8.253.69:554/ch0_0.h264 -vf scale=640:-1 -f rtsp -an rtsp://127.0.0.1:1935/live/myStream.sdp