opencv-ffmpeg-rtmp-stream | OpenCV FFMpeg Live Video Stream over RTMP protocol | Video Utils library
kandi X-RAY | opencv-ffmpeg-rtmp-stream Summary
kandi X-RAY | opencv-ffmpeg-rtmp-stream Summary
Example of live video streaming over RTMP protocol using OpenCV and FFMpeg. For streaming without using OpenCV check ffmpeg-webcam-rtmp-stream repository.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of opencv-ffmpeg-rtmp-stream
opencv-ffmpeg-rtmp-stream Key Features
opencv-ffmpeg-rtmp-stream Examples and Code Snippets
Community Discussions
Trending Discussions on opencv-ffmpeg-rtmp-stream
QUESTION
I would like to stream live video from webcam using OpenCV using H264 codec and converting that to FLV then stream over RTMP server and catch the stream in browser with flv.js. Basically I have everything working except that I cannot read stream in flv.js. I can open stream with ffplay
so I think at least most of the things are set correctly.
My current implementation:
...ANSWER
Answered 2018-Feb-05 at 09:28I solve this issue myself.
Main reason why this wasn't working as expected is that AVStream extradata (sps and pps headers) was empty. I needed to manually copy extradata
and extradata_size
from AVCodecContext (not sure why this isn't done automatically). After I done this I saw picture in flv.js
for the first time. Then I just needed to calculate frame->pts
correctly to get video stream working correctly. I am attaching whole working code below in case anyone else encounters same issue.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install opencv-ffmpeg-rtmp-stream
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page