[FFmpeg-user] image2pipe to RTMP issues ("faster than realtime")
the.energetic at gmail.com
Tue May 18 18:02:57 EEST 2021
My goal is to stream to YouTube Live via RTMP as output, using the following 2 inputs:
1) Icecast audio stream... ffprobe output: Stream #0:0: Audio: mp3, 44100 Hz, stereo, fltp, 128 kb/s
2) Headless chrome startScreencast api which is recording a webpage. Based on my knowledge it appears Chrome sends roughly 10 FPS, but without being certain, I assume this frame rate could vary based on page load, etc.
According to YouTube, these are the requirements for 720p @ 30:
- Resolution: 1280x720
- CBR encoding
- Bitrate Range: 1,500-4,000 Kbps
- 2 second keyframe
Issue #1) I’m getting the following error from YouTube currently: "Your encoder is sending data faster than realtime (you must send 1 second of video for each second)”
This error is the primary issue I’m trying to solve, but I have listed several sub-issues that my intuition tell me MAY be wrong as well. My understanding of video/ffmpeg is not in my expertise, so there could be many gross inefficiencies or bad approaches in my command. I would gladly welcome any critiques or suggestions for any other issues that stand out that I’m not seeing.
Issue #2) I remember reading somewhere that I may need to set an explicit framerate on the audio so it’s not “locked” to the video. Is this correct, and how would I do that?
Issue #3) I have seen several examples of RTMP streaming explicitly setting -threads 0. Is this recommended for live/realtime streaming? If so, how do I input them into the command?
Issue #5) Any other glaring issues you see I would love to hear them. I essentially crafted this command as a golden retriever would play with a tennis ball.
Below are my current flags (they are in exact order, but I added line breaks and comment headings for easier reading). Thank you!
// input audio
// input video
More information about the ffmpeg-user