Using ffmpeg from QtMultimedia to set RTP as container media format
-
wrote on 22 Jul 2023, 00:07 last edited by raulgd
Hi,
I'm creating an application that requires RTP as media format container for streaming, but QMediaFormat doesn't have it as an option, although I know it's supported by the ffmpeg libraries as a media format.
How can I integrate that media format if my backend is ffmpeg, I wouldn't have to have to use ffmpeg besides QtMultimedia knowing it also uses it.
Cheers
-
Hi,
Which version of Qt are you using ?
-
AFAIR, you can play RTP streams directly by using the URL of the source.
-
wrote on 29 Jul 2023, 05:16 last edited by
@SGaist I need to produce them, not play them, that's why I want to encode through QMediaFormat.
I need to produce a video stream out of the desktop and another from the camera, and encode it in AVC with RTP as container for transmission. -
@SGaist I need to produce them, not play them, that's why I want to encode through QMediaFormat.
I need to produce a video stream out of the desktop and another from the camera, and encode it in AVC with RTP as container for transmission.Sorry ! I misread your requirement. I currently don't think that it's possible through QtMultimedia. It might be a feature request to be made for the ffmpeg backend. AFAIK, the current list of supported format come from what is supported on each platform.
-
Sorry ! I misread your requirement. I currently don't think that it's possible through QtMultimedia. It might be a feature request to be made for the ffmpeg backend. AFAIK, the current list of supported format come from what is supported on each platform.
wrote on 30 Jul 2023, 02:34 last edited by@SGaist thanks for the reply... Although ffmpeg does support RTP, I Don't see if it's available on all supported platforms or only on some.
As an alternative, I found this library https://github.com/ultravideo/uvgRTP I'll see if I can make something of it and integrate it with QtMultimedia, apparently if I get a stream of H264 (AVC) or H265 it will wrap it into (S)RTP, although only works on Windows, Mac and Linux, it would be cool if I get it to work also on iOS and Android (the platforms covered by my Qt subscription).
Maybe I'll keep this open, if I manage to get it working it could help someone else.
1/7