<div dir="ltr">Hi. <div><br></div><div>I am new to C++ and FFmpeg and wanted to write application that streams video from camera (webcam at least) to some server.</div><div><br></div><div>I've seen <a href="https://trac.ffmpeg.org/wiki/StreamingGuide">StreamingGuide</a> and wanted to know how to implement it. </div><div>I think that basic flow is like this, please correct me if I'm wrong:</div><div><ol><li>Get input device AVInputFormat from libavdevice</li><li>Open that input with avformat_open_input</li><li>Find its streams' codecs</li><li>Get decoder with avcodec_find_decoder</li><li>Decode it somehow</li><li>Encode it for stream</li><li>Write data with muxer</li><li>Send muxed data to server</li></ol><div>So I imagine how to implement the first half of this list but not the second. </div></div><div><br></div><div>2 questions that I have are:<br></div><div><ol><li>Do I understand the streaming flow right? What are the nuances that I must consider? What modules/methods should I look into to implement it?</li><li>How can I do a preview of stream in a GUI using, for example, Qt Quick? Is an input device blocked by one of the processes (either FFmpeg or Qt)? If it is, should I somehow copy frames for GUI to show them for user or just reference it?</li></ol><div>Thanks in advance!</div></div><div><br></div><div>Kind regards,</div><div>Timur Guseynov</div></div>