Ask Your Question

denis.istu's profile - activity

2018-03-07 01:47:45 -0600 received badge  Supporter (source)
2018-03-07 01:47:43 -0600 marked best answer How do i use videowriter with ffmpeg for streaming?

Documentation at https://docs.opencv.org/master/d0/da7... states, that "OpenCV can use the FFmpeg library (http://ffmpeg.org/) as backend to record, convert and stream audio and video".

I wonder how can i use ffmpeg as backend to stream video? for example i have ffmpeg command that works if i pipe cv::Mat from program stdout to ffmpeg stdin

myprogram.exe | ffmpeg -f rawvideo -pixel_format bgr24 -video_size 640x480 -framerate 30 -i - -vcodec libx264 -tune zerolatency -b 6000k -f mpegts udp://127.0.0.1:5000

so how can i shortcut it and have same pipe inside myprogram? for example for CAP_GSTREAMER one can write gstreamer pipe in videowriter cv::Videowriter writer; writer.open("appsrc ! etc...", cv::CAP_GSTREAMER, fourcc, fps, size);

2018-03-07 01:47:43 -0600 received badge  Scholar (source)
2018-03-02 03:59:09 -0600 asked a question How do i use videowriter with ffmpeg for streaming?

How do i use videowriter with ffmpeg for streaming? Documentation at https://docs.opencv.org/master/d0/da7/videoio_overv